rust-pgn-reader-python-binding 2.5.0__tar.gz → 2.5.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/Cargo.lock +1 -1
- {rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/Cargo.toml +1 -1
- {rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/PKG-INFO +1 -1
- {rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/src/lib.rs +15 -11
- {rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/src/test.py +1 -0
- {rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/.github/workflows/CI.yml +0 -0
- {rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/.gitignore +0 -0
- {rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/README.md +0 -0
- {rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/benches/parquet_bench.rs +0 -0
- {rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/pyproject.toml +0 -0
- {rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/src/bench.py +0 -0
- {rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/src/bench_parquet.py +0 -0
- {rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/src/bench_parquet_parallel.py +0 -0
- {rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/src/comment_parsing.rs +0 -0
- {rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/src/example_rowgroup.py +0 -0
- {rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/src/example_str.py +0 -0
|
@@ -1229,7 +1229,7 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
|
|
1229
1229
|
|
|
1230
1230
|
[[package]]
|
|
1231
1231
|
name = "rust_pgn_reader_python_binding"
|
|
1232
|
-
version = "2.5.
|
|
1232
|
+
version = "2.5.1"
|
|
1233
1233
|
dependencies = [
|
|
1234
1234
|
"arrow",
|
|
1235
1235
|
"criterion",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rust_pgn_reader_python_binding
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.1
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
@@ -89,6 +89,18 @@ impl MoveExtractor {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
fn push_castling_bitboards(&mut self) {
|
|
93
|
+
let castling_bitboard = self.pos.castles().castling_rights();
|
|
94
|
+
let castling_rights = (
|
|
95
|
+
castling_bitboard.contains(shakmaty::Square::A1),
|
|
96
|
+
castling_bitboard.contains(shakmaty::Square::H1),
|
|
97
|
+
castling_bitboard.contains(shakmaty::Square::A8),
|
|
98
|
+
castling_bitboard.contains(shakmaty::Square::H8),
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
self.castling_rights.push(castling_rights);
|
|
102
|
+
}
|
|
103
|
+
|
|
92
104
|
fn update_position_status(&mut self) {
|
|
93
105
|
// TODO this checks legal_moves() a bunch of times
|
|
94
106
|
self.position_status = Some(PositionStatus {
|
|
@@ -124,6 +136,8 @@ impl Visitor for MoveExtractor {
|
|
|
124
136
|
self.comments.clear();
|
|
125
137
|
self.evals.clear();
|
|
126
138
|
self.clock_times.clear();
|
|
139
|
+
|
|
140
|
+
self.push_castling_bitboards();
|
|
127
141
|
}
|
|
128
142
|
|
|
129
143
|
fn san(&mut self, san_plus: SanPlus) {
|
|
@@ -133,17 +147,7 @@ impl Visitor for MoveExtractor {
|
|
|
133
147
|
self.pos.play_unchecked(&m);
|
|
134
148
|
let uci = UciMove::from_standard(&m);
|
|
135
149
|
self.moves.push(uci.to_string());
|
|
136
|
-
|
|
137
|
-
// println!("castling {:?}", self.pos.castles());
|
|
138
|
-
let castling_bitboard = self.pos.castles().castling_rights();
|
|
139
|
-
let castling_rights = (
|
|
140
|
-
castling_bitboard.contains(shakmaty::Square::A1),
|
|
141
|
-
castling_bitboard.contains(shakmaty::Square::H1),
|
|
142
|
-
castling_bitboard.contains(shakmaty::Square::A8),
|
|
143
|
-
castling_bitboard.contains(shakmaty::Square::H8),
|
|
144
|
-
);
|
|
145
|
-
|
|
146
|
-
self.castling_rights.push(castling_rights);
|
|
150
|
+
self.push_castling_bitboards();
|
|
147
151
|
}
|
|
148
152
|
Err(err) => {
|
|
149
153
|
eprintln!("error in game: {} {}", err, san_plus);
|
|
@@ -462,6 +462,7 @@ class TestPgnExtraction(unittest.TestCase):
|
|
|
462
462
|
(True, True, True, True),
|
|
463
463
|
(True, True, True, True),
|
|
464
464
|
(True, True, True, True),
|
|
465
|
+
(True, True, True, True),
|
|
465
466
|
(True, False, True, True),
|
|
466
467
|
(True, False, True, True),
|
|
467
468
|
(True, False, True, True),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/pyproject.toml
RENAMED
|
File without changes
|
|
File without changes
|
{rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/src/bench_parquet.py
RENAMED
|
File without changes
|
|
File without changes
|
{rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/src/comment_parsing.rs
RENAMED
|
File without changes
|
|
File without changes
|
{rust_pgn_reader_python_binding-2.5.0 → rust_pgn_reader_python_binding-2.5.1}/src/example_str.py
RENAMED
|
File without changes
|