rust-pgn-reader-python-binding 2.5.3__tar.gz → 2.5.5__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.3 → rust_pgn_reader_python_binding-2.5.5}/Cargo.lock +3 -10
- {rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/Cargo.toml +2 -2
- {rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/PKG-INFO +1 -1
- {rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/src/comment_parsing.rs +24 -18
- {rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/.github/workflows/CI.yml +0 -0
- {rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/.gitignore +0 -0
- {rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/README.md +0 -0
- {rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/benches/parquet_bench.rs +0 -0
- {rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/pyproject.toml +0 -0
- {rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/src/bench.py +0 -0
- {rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/src/bench_parquet.py +0 -0
- {rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/src/bench_parquet_parallel.py +0 -0
- {rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/src/example_rowgroup.py +0 -0
- {rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/src/example_str.py +0 -0
- {rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/src/lib.rs +0 -0
- {rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/src/test.py +0 -0
|
@@ -871,12 +871,6 @@ dependencies = [
|
|
|
871
871
|
"autocfg",
|
|
872
872
|
]
|
|
873
873
|
|
|
874
|
-
[[package]]
|
|
875
|
-
name = "minimal-lexical"
|
|
876
|
-
version = "0.2.1"
|
|
877
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
878
|
-
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
|
879
|
-
|
|
880
874
|
[[package]]
|
|
881
875
|
name = "miniz_oxide"
|
|
882
876
|
version = "0.8.8"
|
|
@@ -894,12 +888,11 @@ checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
|
|
|
894
888
|
|
|
895
889
|
[[package]]
|
|
896
890
|
name = "nom"
|
|
897
|
-
version = "
|
|
891
|
+
version = "8.0.0"
|
|
898
892
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
899
|
-
checksum = "
|
|
893
|
+
checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405"
|
|
900
894
|
dependencies = [
|
|
901
895
|
"memchr",
|
|
902
|
-
"minimal-lexical",
|
|
903
896
|
]
|
|
904
897
|
|
|
905
898
|
[[package]]
|
|
@@ -1235,7 +1228,7 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
|
|
1235
1228
|
|
|
1236
1229
|
[[package]]
|
|
1237
1230
|
name = "rust_pgn_reader_python_binding"
|
|
1238
|
-
version = "2.5.
|
|
1231
|
+
version = "2.5.5"
|
|
1239
1232
|
dependencies = [
|
|
1240
1233
|
"arrow",
|
|
1241
1234
|
"criterion",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "rust_pgn_reader_python_binding"
|
|
3
|
-
version = "2.5.
|
|
3
|
+
version = "2.5.5"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
|
|
6
6
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
@@ -13,7 +13,7 @@ crate-type = ["lib", "cdylib"]
|
|
|
13
13
|
pyo3 = "0.25.0"
|
|
14
14
|
shakmaty = "0.27"
|
|
15
15
|
pgn-reader = "0.26.0"
|
|
16
|
-
nom = "
|
|
16
|
+
nom = "8.0"
|
|
17
17
|
rayon = "1.10"
|
|
18
18
|
num_cpus = "1.17"
|
|
19
19
|
|
|
@@ -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.5
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
{rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/src/comment_parsing.rs
RENAMED
|
@@ -4,8 +4,8 @@ use nom::{
|
|
|
4
4
|
character::complete::{char, digit1},
|
|
5
5
|
combinator::{map, opt, recognize},
|
|
6
6
|
multi::{many0, many1},
|
|
7
|
-
sequence::{delimited, pair, preceded
|
|
8
|
-
IResult,
|
|
7
|
+
sequence::{delimited, pair, preceded},
|
|
8
|
+
IResult, Parser,
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
#[derive(Debug, PartialEq)]
|
|
@@ -41,31 +41,35 @@ pub fn parse_comments(input: &str) -> IResult<&str, Vec<CommentContent>> {
|
|
|
41
41
|
_ => unreachable!(),
|
|
42
42
|
}),
|
|
43
43
|
map(text, |s| CommentContent::Text(s.to_string())),
|
|
44
|
-
)))
|
|
44
|
+
)))
|
|
45
|
+
.parse(input)
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
/// Parser for a tag
|
|
48
49
|
fn tag_parser(input: &str) -> IResult<&str, String> {
|
|
49
50
|
delimited(
|
|
50
|
-
|
|
51
|
+
(char('['), char('%')),
|
|
51
52
|
alt((eval_parser, clk_parser)),
|
|
52
53
|
char(']'),
|
|
53
|
-
)
|
|
54
|
+
)
|
|
55
|
+
.parse(input)
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
/// Parser for an eval tag
|
|
57
59
|
fn eval_parser(input: &str) -> IResult<&str, String> {
|
|
58
60
|
map(
|
|
59
|
-
|
|
61
|
+
(tag("eval"), spacing, alt((signed_number, mate_eval))),
|
|
60
62
|
|(_, _, value)| format!("[eval {}]", value),
|
|
61
|
-
)
|
|
63
|
+
)
|
|
64
|
+
.parse(input)
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
/// Parser for a clk tag
|
|
65
68
|
fn clk_parser(input: &str) -> IResult<&str, String> {
|
|
66
|
-
map(
|
|
69
|
+
map((tag("clk"), spacing, time_value), |(_, _, value)| {
|
|
67
70
|
format!("[clk {}]", value)
|
|
68
|
-
})
|
|
71
|
+
})
|
|
72
|
+
.parse(input)
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
/// Parser for a signed number
|
|
@@ -76,21 +80,22 @@ fn signed_number(input: &str) -> IResult<&str, String> {
|
|
|
76
80
|
recognize(pair(digit1, opt(preceded(char('.'), digit1)))),
|
|
77
81
|
)),
|
|
78
82
|
|s: &str| s.to_string(),
|
|
79
|
-
)
|
|
83
|
+
)
|
|
84
|
+
.parse(input)
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
fn mate_eval(input: &str) -> IResult<&str, String> {
|
|
83
|
-
let signed_integer = recognize(
|
|
88
|
+
let signed_integer = recognize((
|
|
84
89
|
opt(char('-')), // Optional minus sign
|
|
85
90
|
digit1, // One or more digits
|
|
86
|
-
))
|
|
87
|
-
map(preceded(char('#'), signed_integer), String::from)(input)
|
|
91
|
+
));
|
|
92
|
+
map(preceded(char('#'), signed_integer), String::from).parse(input)
|
|
88
93
|
}
|
|
89
94
|
|
|
90
95
|
/// Parser for a time value
|
|
91
96
|
fn time_value(input: &str) -> IResult<&str, String> {
|
|
92
97
|
map(
|
|
93
|
-
|
|
98
|
+
(
|
|
94
99
|
digit1, // Hours
|
|
95
100
|
char(':'), // Colon separator
|
|
96
101
|
digit1, // Minutes
|
|
@@ -100,22 +105,23 @@ fn time_value(input: &str) -> IResult<&str, String> {
|
|
|
100
105
|
char('.'), // Dot separator
|
|
101
106
|
digit1, // Fractional seconds
|
|
102
107
|
)),
|
|
103
|
-
)
|
|
108
|
+
),
|
|
104
109
|
|(h, _, m, _, s, frac)| match frac {
|
|
105
110
|
Some(f) => format!("{}:{}:{}.{}", h, m, s, f),
|
|
106
111
|
None => format!("{}:{}:{}", h, m, s),
|
|
107
112
|
},
|
|
108
|
-
)
|
|
113
|
+
)
|
|
114
|
+
.parse(input)
|
|
109
115
|
}
|
|
110
116
|
|
|
111
117
|
/// Parser for text (any characters except '[' and ']')
|
|
112
118
|
fn text(input: &str) -> IResult<&str, &str> {
|
|
113
|
-
is_not("[]")(input)
|
|
119
|
+
is_not("[]").parse(input)
|
|
114
120
|
}
|
|
115
121
|
|
|
116
122
|
/// Parser for spacing (one or more spaces)
|
|
117
123
|
fn spacing(input: &str) -> IResult<&str, &str> {
|
|
118
|
-
recognize(many1(char(' ')))(input)
|
|
124
|
+
recognize(many1(char(' '))).parse(input)
|
|
119
125
|
}
|
|
120
126
|
|
|
121
127
|
#[cfg(test)]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/pyproject.toml
RENAMED
|
File without changes
|
|
File without changes
|
{rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/src/bench_parquet.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rust_pgn_reader_python_binding-2.5.3 → rust_pgn_reader_python_binding-2.5.5}/src/example_str.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|