rust-pgn-reader-python-binding 1.0.0__tar.gz → 1.1.0__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-1.0.0 → rust_pgn_reader_python_binding-1.1.0}/Cargo.lock +1 -1
- {rust_pgn_reader_python_binding-1.0.0 → rust_pgn_reader_python_binding-1.1.0}/Cargo.toml +1 -1
- {rust_pgn_reader_python_binding-1.0.0 → rust_pgn_reader_python_binding-1.1.0}/PKG-INFO +1 -1
- {rust_pgn_reader_python_binding-1.0.0 → rust_pgn_reader_python_binding-1.1.0}/src/comment_parsing.rs +13 -3
- {rust_pgn_reader_python_binding-1.0.0 → rust_pgn_reader_python_binding-1.1.0}/src/lib.rs +1 -1
- {rust_pgn_reader_python_binding-1.0.0 → rust_pgn_reader_python_binding-1.1.0}/.github/workflows/CI.yml +0 -0
- {rust_pgn_reader_python_binding-1.0.0 → rust_pgn_reader_python_binding-1.1.0}/.gitignore +0 -0
- {rust_pgn_reader_python_binding-1.0.0 → rust_pgn_reader_python_binding-1.1.0}/README.md +0 -0
- {rust_pgn_reader_python_binding-1.0.0 → rust_pgn_reader_python_binding-1.1.0}/pyproject.toml +0 -0
- {rust_pgn_reader_python_binding-1.0.0 → rust_pgn_reader_python_binding-1.1.0}/src/bench.py +0 -0
- {rust_pgn_reader_python_binding-1.0.0 → rust_pgn_reader_python_binding-1.1.0}/src/bench_parquet.py +0 -0
- {rust_pgn_reader_python_binding-1.0.0 → rust_pgn_reader_python_binding-1.1.0}/src/example.py +0 -0
- {rust_pgn_reader_python_binding-1.0.0 → rust_pgn_reader_python_binding-1.1.0}/src/test.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rust_pgn_reader_python_binding
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.0
|
|
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-1.0.0 → rust_pgn_reader_python_binding-1.1.0}/src/comment_parsing.rs
RENAMED
|
@@ -12,7 +12,7 @@ use nom::{
|
|
|
12
12
|
pub enum CommentContent {
|
|
13
13
|
Text(String),
|
|
14
14
|
Eval(f64),
|
|
15
|
-
ClkTime((u32,
|
|
15
|
+
ClkTime((u32, u8, f64)),
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
pub fn parse_comments(input: &str) -> IResult<&str, Vec<CommentContent>> {
|
|
@@ -133,7 +133,7 @@ mod tests {
|
|
|
133
133
|
vec![
|
|
134
134
|
CommentContent::Eval(123.0),
|
|
135
135
|
CommentContent::Text(" some text ".to_string()),
|
|
136
|
-
CommentContent::ClkTime((12, 34, 56))
|
|
136
|
+
CommentContent::ClkTime((12, 34, 56.0))
|
|
137
137
|
]
|
|
138
138
|
);
|
|
139
139
|
assert_eq!(remaining, "");
|
|
@@ -148,13 +148,23 @@ mod tests {
|
|
|
148
148
|
assert_eq!(
|
|
149
149
|
parsed,
|
|
150
150
|
vec![
|
|
151
|
-
CommentContent::ClkTime((12, 34, 56)),
|
|
151
|
+
CommentContent::ClkTime((12, 34, 56.0)),
|
|
152
152
|
CommentContent::Text(" some text ".to_string())
|
|
153
153
|
]
|
|
154
154
|
);
|
|
155
155
|
assert_eq!(remaining, "");
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
+
#[test]
|
|
159
|
+
fn test_comment_fractional_sec() {
|
|
160
|
+
let input = "[%clk 12:34:56.0123]";
|
|
161
|
+
let result = parse_comments(input);
|
|
162
|
+
assert!(result.is_ok());
|
|
163
|
+
let (remaining, parsed) = result.unwrap();
|
|
164
|
+
assert_eq!(parsed, vec![CommentContent::ClkTime((12, 34, 56.0123)),]);
|
|
165
|
+
assert_eq!(remaining, "");
|
|
166
|
+
}
|
|
167
|
+
|
|
158
168
|
#[test]
|
|
159
169
|
fn test_tag_parser() {
|
|
160
170
|
let input = "[%eval 123]";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rust_pgn_reader_python_binding-1.0.0 → rust_pgn_reader_python_binding-1.1.0}/pyproject.toml
RENAMED
|
File without changes
|
|
File without changes
|
{rust_pgn_reader_python_binding-1.0.0 → rust_pgn_reader_python_binding-1.1.0}/src/bench_parquet.py
RENAMED
|
File without changes
|
{rust_pgn_reader_python_binding-1.0.0 → rust_pgn_reader_python_binding-1.1.0}/src/example.py
RENAMED
|
File without changes
|
|
File without changes
|