shr-parser 0.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.
- shr_parser-0.1.0/.github/workflows/CI.yml +169 -0
- shr_parser-0.1.0/.gitignore +72 -0
- shr_parser-0.1.0/Cargo.lock +474 -0
- shr_parser-0.1.0/Cargo.toml +13 -0
- shr_parser-0.1.0/PKG-INFO +7 -0
- shr_parser-0.1.0/pyproject.toml +15 -0
- shr_parser-0.1.0/rust-toolchain.toml +2 -0
- shr_parser-0.1.0/src/lib.rs +20 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# This file is autogenerated by maturin v1.6.0
|
|
2
|
+
# To update, run
|
|
3
|
+
#
|
|
4
|
+
# maturin generate-ci github
|
|
5
|
+
#
|
|
6
|
+
name: CI
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
- master
|
|
13
|
+
tags:
|
|
14
|
+
- '*'
|
|
15
|
+
pull_request:
|
|
16
|
+
workflow_dispatch:
|
|
17
|
+
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
linux:
|
|
23
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
24
|
+
strategy:
|
|
25
|
+
matrix:
|
|
26
|
+
platform:
|
|
27
|
+
- runner: ubuntu-latest
|
|
28
|
+
target: x86_64
|
|
29
|
+
- runner: ubuntu-latest
|
|
30
|
+
target: x86
|
|
31
|
+
- runner: ubuntu-latest
|
|
32
|
+
target: aarch64
|
|
33
|
+
- runner: ubuntu-latest
|
|
34
|
+
target: armv7
|
|
35
|
+
- runner: ubuntu-latest
|
|
36
|
+
target: s390x
|
|
37
|
+
- runner: ubuntu-latest
|
|
38
|
+
target: ppc64le
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v4
|
|
41
|
+
- uses: actions/setup-python@v5
|
|
42
|
+
with:
|
|
43
|
+
python-version: 3.x
|
|
44
|
+
- name: Build wheels
|
|
45
|
+
uses: PyO3/maturin-action@v1
|
|
46
|
+
with:
|
|
47
|
+
target: ${{ matrix.platform.target }}
|
|
48
|
+
args: --release --out dist --find-interpreter
|
|
49
|
+
sccache: 'true'
|
|
50
|
+
manylinux: auto
|
|
51
|
+
- name: Upload wheels
|
|
52
|
+
uses: actions/upload-artifact@v4
|
|
53
|
+
with:
|
|
54
|
+
name: wheels-linux-${{ matrix.platform.target }}
|
|
55
|
+
path: dist
|
|
56
|
+
|
|
57
|
+
musllinux:
|
|
58
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
59
|
+
strategy:
|
|
60
|
+
matrix:
|
|
61
|
+
platform:
|
|
62
|
+
- runner: ubuntu-latest
|
|
63
|
+
target: x86_64
|
|
64
|
+
- runner: ubuntu-latest
|
|
65
|
+
target: x86
|
|
66
|
+
- runner: ubuntu-latest
|
|
67
|
+
target: aarch64
|
|
68
|
+
- runner: ubuntu-latest
|
|
69
|
+
target: armv7
|
|
70
|
+
steps:
|
|
71
|
+
- uses: actions/checkout@v4
|
|
72
|
+
- uses: actions/setup-python@v5
|
|
73
|
+
with:
|
|
74
|
+
python-version: 3.x
|
|
75
|
+
- name: Build wheels
|
|
76
|
+
uses: PyO3/maturin-action@v1
|
|
77
|
+
with:
|
|
78
|
+
target: ${{ matrix.platform.target }}
|
|
79
|
+
args: --release --out dist --find-interpreter
|
|
80
|
+
sccache: 'true'
|
|
81
|
+
manylinux: musllinux_1_2
|
|
82
|
+
- name: Upload wheels
|
|
83
|
+
uses: actions/upload-artifact@v4
|
|
84
|
+
with:
|
|
85
|
+
name: wheels-musllinux-${{ matrix.platform.target }}
|
|
86
|
+
path: dist
|
|
87
|
+
|
|
88
|
+
windows:
|
|
89
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
90
|
+
strategy:
|
|
91
|
+
matrix:
|
|
92
|
+
platform:
|
|
93
|
+
- runner: windows-latest
|
|
94
|
+
target: x64
|
|
95
|
+
- runner: windows-latest
|
|
96
|
+
target: x86
|
|
97
|
+
steps:
|
|
98
|
+
- uses: actions/checkout@v4
|
|
99
|
+
- uses: actions/setup-python@v5
|
|
100
|
+
with:
|
|
101
|
+
python-version: 3.x
|
|
102
|
+
architecture: ${{ matrix.platform.target }}
|
|
103
|
+
- name: Build wheels
|
|
104
|
+
uses: PyO3/maturin-action@v1
|
|
105
|
+
with:
|
|
106
|
+
target: ${{ matrix.platform.target }}
|
|
107
|
+
args: --release --out dist --find-interpreter
|
|
108
|
+
sccache: 'true'
|
|
109
|
+
- name: Upload wheels
|
|
110
|
+
uses: actions/upload-artifact@v4
|
|
111
|
+
with:
|
|
112
|
+
name: wheels-windows-${{ matrix.platform.target }}
|
|
113
|
+
path: dist
|
|
114
|
+
|
|
115
|
+
macos:
|
|
116
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
117
|
+
strategy:
|
|
118
|
+
matrix:
|
|
119
|
+
platform:
|
|
120
|
+
- runner: macos-12
|
|
121
|
+
target: x86_64
|
|
122
|
+
- runner: macos-14
|
|
123
|
+
target: aarch64
|
|
124
|
+
steps:
|
|
125
|
+
- uses: actions/checkout@v4
|
|
126
|
+
- uses: actions/setup-python@v5
|
|
127
|
+
with:
|
|
128
|
+
python-version: 3.x
|
|
129
|
+
- name: Build wheels
|
|
130
|
+
uses: PyO3/maturin-action@v1
|
|
131
|
+
with:
|
|
132
|
+
target: ${{ matrix.platform.target }}
|
|
133
|
+
args: --release --out dist --find-interpreter
|
|
134
|
+
sccache: 'true'
|
|
135
|
+
- name: Upload wheels
|
|
136
|
+
uses: actions/upload-artifact@v4
|
|
137
|
+
with:
|
|
138
|
+
name: wheels-macos-${{ matrix.platform.target }}
|
|
139
|
+
path: dist
|
|
140
|
+
|
|
141
|
+
sdist:
|
|
142
|
+
runs-on: ubuntu-latest
|
|
143
|
+
steps:
|
|
144
|
+
- uses: actions/checkout@v4
|
|
145
|
+
- name: Build sdist
|
|
146
|
+
uses: PyO3/maturin-action@v1
|
|
147
|
+
with:
|
|
148
|
+
command: sdist
|
|
149
|
+
args: --out dist
|
|
150
|
+
- name: Upload sdist
|
|
151
|
+
uses: actions/upload-artifact@v4
|
|
152
|
+
with:
|
|
153
|
+
name: wheels-sdist
|
|
154
|
+
path: dist
|
|
155
|
+
|
|
156
|
+
release:
|
|
157
|
+
name: Release
|
|
158
|
+
runs-on: ubuntu-latest
|
|
159
|
+
if: "startsWith(github.ref, 'refs/tags/')"
|
|
160
|
+
needs: [linux, musllinux, windows, macos, sdist]
|
|
161
|
+
steps:
|
|
162
|
+
- uses: actions/download-artifact@v4
|
|
163
|
+
- name: Publish to PyPI
|
|
164
|
+
uses: PyO3/maturin-action@v1
|
|
165
|
+
env:
|
|
166
|
+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
|
167
|
+
with:
|
|
168
|
+
command: upload
|
|
169
|
+
args: --non-interactive --skip-existing wheels-*/*
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/target
|
|
2
|
+
|
|
3
|
+
# Byte-compiled / optimized / DLL files
|
|
4
|
+
__pycache__/
|
|
5
|
+
.pytest_cache/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
|
|
8
|
+
# C extensions
|
|
9
|
+
*.so
|
|
10
|
+
|
|
11
|
+
# Distribution / packaging
|
|
12
|
+
.Python
|
|
13
|
+
.venv/
|
|
14
|
+
env/
|
|
15
|
+
bin/
|
|
16
|
+
build/
|
|
17
|
+
develop-eggs/
|
|
18
|
+
dist/
|
|
19
|
+
eggs/
|
|
20
|
+
lib/
|
|
21
|
+
lib64/
|
|
22
|
+
parts/
|
|
23
|
+
sdist/
|
|
24
|
+
var/
|
|
25
|
+
include/
|
|
26
|
+
man/
|
|
27
|
+
venv/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
|
|
32
|
+
# Installer logs
|
|
33
|
+
pip-log.txt
|
|
34
|
+
pip-delete-this-directory.txt
|
|
35
|
+
pip-selfcheck.json
|
|
36
|
+
|
|
37
|
+
# Unit test / coverage reports
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.coverage
|
|
41
|
+
.cache
|
|
42
|
+
nosetests.xml
|
|
43
|
+
coverage.xml
|
|
44
|
+
|
|
45
|
+
# Translations
|
|
46
|
+
*.mo
|
|
47
|
+
|
|
48
|
+
# Mr Developer
|
|
49
|
+
.mr.developer.cfg
|
|
50
|
+
.project
|
|
51
|
+
.pydevproject
|
|
52
|
+
|
|
53
|
+
# Rope
|
|
54
|
+
.ropeproject
|
|
55
|
+
|
|
56
|
+
# Django stuff:
|
|
57
|
+
*.log
|
|
58
|
+
*.pot
|
|
59
|
+
|
|
60
|
+
.DS_Store
|
|
61
|
+
|
|
62
|
+
# Sphinx documentation
|
|
63
|
+
docs/_build/
|
|
64
|
+
|
|
65
|
+
# PyCharm
|
|
66
|
+
.idea/
|
|
67
|
+
|
|
68
|
+
# VSCode
|
|
69
|
+
.vscode/
|
|
70
|
+
|
|
71
|
+
# Pyenv
|
|
72
|
+
.python-version
|
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 3
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "autocfg"
|
|
7
|
+
version = "1.3.0"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "bitflags"
|
|
13
|
+
version = "2.6.0"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
|
|
16
|
+
|
|
17
|
+
[[package]]
|
|
18
|
+
name = "byteorder"
|
|
19
|
+
version = "1.5.0"
|
|
20
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
+
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
|
22
|
+
|
|
23
|
+
[[package]]
|
|
24
|
+
name = "cfg-if"
|
|
25
|
+
version = "1.0.0"
|
|
26
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
27
|
+
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
28
|
+
|
|
29
|
+
[[package]]
|
|
30
|
+
name = "crossbeam-deque"
|
|
31
|
+
version = "0.8.5"
|
|
32
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
33
|
+
checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
|
|
34
|
+
dependencies = [
|
|
35
|
+
"crossbeam-epoch",
|
|
36
|
+
"crossbeam-utils",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
[[package]]
|
|
40
|
+
name = "crossbeam-epoch"
|
|
41
|
+
version = "0.9.18"
|
|
42
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
43
|
+
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
|
|
44
|
+
dependencies = [
|
|
45
|
+
"crossbeam-utils",
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
[[package]]
|
|
49
|
+
name = "crossbeam-utils"
|
|
50
|
+
version = "0.8.20"
|
|
51
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
52
|
+
checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
|
|
53
|
+
|
|
54
|
+
[[package]]
|
|
55
|
+
name = "either"
|
|
56
|
+
version = "1.13.0"
|
|
57
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
58
|
+
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
|
|
59
|
+
|
|
60
|
+
[[package]]
|
|
61
|
+
name = "heck"
|
|
62
|
+
version = "0.4.1"
|
|
63
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
64
|
+
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
|
|
65
|
+
|
|
66
|
+
[[package]]
|
|
67
|
+
name = "indoc"
|
|
68
|
+
version = "2.0.5"
|
|
69
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
70
|
+
checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
|
|
71
|
+
|
|
72
|
+
[[package]]
|
|
73
|
+
name = "libc"
|
|
74
|
+
version = "0.2.155"
|
|
75
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
76
|
+
checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
|
|
77
|
+
|
|
78
|
+
[[package]]
|
|
79
|
+
name = "lock_api"
|
|
80
|
+
version = "0.4.12"
|
|
81
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
82
|
+
checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
|
|
83
|
+
dependencies = [
|
|
84
|
+
"autocfg",
|
|
85
|
+
"scopeguard",
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
[[package]]
|
|
89
|
+
name = "matrixmultiply"
|
|
90
|
+
version = "0.3.8"
|
|
91
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
92
|
+
checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2"
|
|
93
|
+
dependencies = [
|
|
94
|
+
"autocfg",
|
|
95
|
+
"rawpointer",
|
|
96
|
+
]
|
|
97
|
+
|
|
98
|
+
[[package]]
|
|
99
|
+
name = "memmap"
|
|
100
|
+
version = "0.7.0"
|
|
101
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
102
|
+
checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b"
|
|
103
|
+
dependencies = [
|
|
104
|
+
"libc",
|
|
105
|
+
"winapi",
|
|
106
|
+
]
|
|
107
|
+
|
|
108
|
+
[[package]]
|
|
109
|
+
name = "memoffset"
|
|
110
|
+
version = "0.9.1"
|
|
111
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
112
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
113
|
+
dependencies = [
|
|
114
|
+
"autocfg",
|
|
115
|
+
]
|
|
116
|
+
|
|
117
|
+
[[package]]
|
|
118
|
+
name = "ndarray"
|
|
119
|
+
version = "0.15.6"
|
|
120
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
121
|
+
checksum = "adb12d4e967ec485a5f71c6311fe28158e9d6f4bc4a447b474184d0f91a8fa32"
|
|
122
|
+
dependencies = [
|
|
123
|
+
"matrixmultiply",
|
|
124
|
+
"num-complex",
|
|
125
|
+
"num-integer",
|
|
126
|
+
"num-traits",
|
|
127
|
+
"rawpointer",
|
|
128
|
+
]
|
|
129
|
+
|
|
130
|
+
[[package]]
|
|
131
|
+
name = "num-complex"
|
|
132
|
+
version = "0.4.6"
|
|
133
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
134
|
+
checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
|
|
135
|
+
dependencies = [
|
|
136
|
+
"num-traits",
|
|
137
|
+
]
|
|
138
|
+
|
|
139
|
+
[[package]]
|
|
140
|
+
name = "num-integer"
|
|
141
|
+
version = "0.1.46"
|
|
142
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
143
|
+
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
|
|
144
|
+
dependencies = [
|
|
145
|
+
"num-traits",
|
|
146
|
+
]
|
|
147
|
+
|
|
148
|
+
[[package]]
|
|
149
|
+
name = "num-traits"
|
|
150
|
+
version = "0.2.19"
|
|
151
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
152
|
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
|
153
|
+
dependencies = [
|
|
154
|
+
"autocfg",
|
|
155
|
+
]
|
|
156
|
+
|
|
157
|
+
[[package]]
|
|
158
|
+
name = "once_cell"
|
|
159
|
+
version = "1.19.0"
|
|
160
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
161
|
+
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
|
|
162
|
+
|
|
163
|
+
[[package]]
|
|
164
|
+
name = "parking_lot"
|
|
165
|
+
version = "0.12.3"
|
|
166
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
167
|
+
checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
|
|
168
|
+
dependencies = [
|
|
169
|
+
"lock_api",
|
|
170
|
+
"parking_lot_core",
|
|
171
|
+
]
|
|
172
|
+
|
|
173
|
+
[[package]]
|
|
174
|
+
name = "parking_lot_core"
|
|
175
|
+
version = "0.9.10"
|
|
176
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
177
|
+
checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
|
|
178
|
+
dependencies = [
|
|
179
|
+
"cfg-if",
|
|
180
|
+
"libc",
|
|
181
|
+
"redox_syscall",
|
|
182
|
+
"smallvec",
|
|
183
|
+
"windows-targets",
|
|
184
|
+
]
|
|
185
|
+
|
|
186
|
+
[[package]]
|
|
187
|
+
name = "portable-atomic"
|
|
188
|
+
version = "1.6.0"
|
|
189
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
190
|
+
checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0"
|
|
191
|
+
|
|
192
|
+
[[package]]
|
|
193
|
+
name = "proc-macro2"
|
|
194
|
+
version = "1.0.86"
|
|
195
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
196
|
+
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
|
|
197
|
+
dependencies = [
|
|
198
|
+
"unicode-ident",
|
|
199
|
+
]
|
|
200
|
+
|
|
201
|
+
[[package]]
|
|
202
|
+
name = "pyo3"
|
|
203
|
+
version = "0.21.2"
|
|
204
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
205
|
+
checksum = "a5e00b96a521718e08e03b1a622f01c8a8deb50719335de3f60b3b3950f069d8"
|
|
206
|
+
dependencies = [
|
|
207
|
+
"cfg-if",
|
|
208
|
+
"indoc",
|
|
209
|
+
"libc",
|
|
210
|
+
"memoffset",
|
|
211
|
+
"parking_lot",
|
|
212
|
+
"portable-atomic",
|
|
213
|
+
"pyo3-build-config",
|
|
214
|
+
"pyo3-ffi",
|
|
215
|
+
"pyo3-macros",
|
|
216
|
+
"unindent",
|
|
217
|
+
]
|
|
218
|
+
|
|
219
|
+
[[package]]
|
|
220
|
+
name = "pyo3-build-config"
|
|
221
|
+
version = "0.21.2"
|
|
222
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
223
|
+
checksum = "7883df5835fafdad87c0d888b266c8ec0f4c9ca48a5bed6bbb592e8dedee1b50"
|
|
224
|
+
dependencies = [
|
|
225
|
+
"once_cell",
|
|
226
|
+
"target-lexicon",
|
|
227
|
+
]
|
|
228
|
+
|
|
229
|
+
[[package]]
|
|
230
|
+
name = "pyo3-ffi"
|
|
231
|
+
version = "0.21.2"
|
|
232
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
233
|
+
checksum = "01be5843dc60b916ab4dad1dca6d20b9b4e6ddc8e15f50c47fe6d85f1fb97403"
|
|
234
|
+
dependencies = [
|
|
235
|
+
"libc",
|
|
236
|
+
"pyo3-build-config",
|
|
237
|
+
]
|
|
238
|
+
|
|
239
|
+
[[package]]
|
|
240
|
+
name = "pyo3-macros"
|
|
241
|
+
version = "0.21.2"
|
|
242
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
243
|
+
checksum = "77b34069fc0682e11b31dbd10321cbf94808394c56fd996796ce45217dfac53c"
|
|
244
|
+
dependencies = [
|
|
245
|
+
"proc-macro2",
|
|
246
|
+
"pyo3-macros-backend",
|
|
247
|
+
"quote",
|
|
248
|
+
"syn",
|
|
249
|
+
]
|
|
250
|
+
|
|
251
|
+
[[package]]
|
|
252
|
+
name = "pyo3-macros-backend"
|
|
253
|
+
version = "0.21.2"
|
|
254
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
255
|
+
checksum = "08260721f32db5e1a5beae69a55553f56b99bd0e1c3e6e0a5e8851a9d0f5a85c"
|
|
256
|
+
dependencies = [
|
|
257
|
+
"heck",
|
|
258
|
+
"proc-macro2",
|
|
259
|
+
"pyo3-build-config",
|
|
260
|
+
"quote",
|
|
261
|
+
"syn",
|
|
262
|
+
]
|
|
263
|
+
|
|
264
|
+
[[package]]
|
|
265
|
+
name = "quote"
|
|
266
|
+
version = "1.0.36"
|
|
267
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
268
|
+
checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
|
|
269
|
+
dependencies = [
|
|
270
|
+
"proc-macro2",
|
|
271
|
+
]
|
|
272
|
+
|
|
273
|
+
[[package]]
|
|
274
|
+
name = "rawpointer"
|
|
275
|
+
version = "0.2.1"
|
|
276
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
277
|
+
checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
|
|
278
|
+
|
|
279
|
+
[[package]]
|
|
280
|
+
name = "rayon"
|
|
281
|
+
version = "1.10.0"
|
|
282
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
283
|
+
checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
|
|
284
|
+
dependencies = [
|
|
285
|
+
"either",
|
|
286
|
+
"rayon-core",
|
|
287
|
+
]
|
|
288
|
+
|
|
289
|
+
[[package]]
|
|
290
|
+
name = "rayon-core"
|
|
291
|
+
version = "1.12.1"
|
|
292
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
293
|
+
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
|
|
294
|
+
dependencies = [
|
|
295
|
+
"crossbeam-deque",
|
|
296
|
+
"crossbeam-utils",
|
|
297
|
+
]
|
|
298
|
+
|
|
299
|
+
[[package]]
|
|
300
|
+
name = "redox_syscall"
|
|
301
|
+
version = "0.5.2"
|
|
302
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
303
|
+
checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd"
|
|
304
|
+
dependencies = [
|
|
305
|
+
"bitflags",
|
|
306
|
+
]
|
|
307
|
+
|
|
308
|
+
[[package]]
|
|
309
|
+
name = "scopeguard"
|
|
310
|
+
version = "1.2.0"
|
|
311
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
312
|
+
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
|
313
|
+
|
|
314
|
+
[[package]]
|
|
315
|
+
name = "serde"
|
|
316
|
+
version = "1.0.204"
|
|
317
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
318
|
+
checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12"
|
|
319
|
+
dependencies = [
|
|
320
|
+
"serde_derive",
|
|
321
|
+
]
|
|
322
|
+
|
|
323
|
+
[[package]]
|
|
324
|
+
name = "serde_derive"
|
|
325
|
+
version = "1.0.204"
|
|
326
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
327
|
+
checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222"
|
|
328
|
+
dependencies = [
|
|
329
|
+
"proc-macro2",
|
|
330
|
+
"quote",
|
|
331
|
+
"syn",
|
|
332
|
+
]
|
|
333
|
+
|
|
334
|
+
[[package]]
|
|
335
|
+
name = "shr_parser"
|
|
336
|
+
version = "1.0.2"
|
|
337
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
338
|
+
checksum = "09bf0ab251108292e99ca047c2781781b2a603e23a6212db6e6a6075aae4f8e4"
|
|
339
|
+
dependencies = [
|
|
340
|
+
"byteorder",
|
|
341
|
+
"memmap",
|
|
342
|
+
"ndarray",
|
|
343
|
+
"rayon",
|
|
344
|
+
"serde",
|
|
345
|
+
]
|
|
346
|
+
|
|
347
|
+
[[package]]
|
|
348
|
+
name = "shr_parser_bindings"
|
|
349
|
+
version = "0.1.0"
|
|
350
|
+
dependencies = [
|
|
351
|
+
"pyo3",
|
|
352
|
+
"shr_parser",
|
|
353
|
+
]
|
|
354
|
+
|
|
355
|
+
[[package]]
|
|
356
|
+
name = "smallvec"
|
|
357
|
+
version = "1.13.2"
|
|
358
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
359
|
+
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
|
|
360
|
+
|
|
361
|
+
[[package]]
|
|
362
|
+
name = "syn"
|
|
363
|
+
version = "2.0.70"
|
|
364
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
365
|
+
checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16"
|
|
366
|
+
dependencies = [
|
|
367
|
+
"proc-macro2",
|
|
368
|
+
"quote",
|
|
369
|
+
"unicode-ident",
|
|
370
|
+
]
|
|
371
|
+
|
|
372
|
+
[[package]]
|
|
373
|
+
name = "target-lexicon"
|
|
374
|
+
version = "0.12.15"
|
|
375
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
376
|
+
checksum = "4873307b7c257eddcb50c9bedf158eb669578359fb28428bef438fec8e6ba7c2"
|
|
377
|
+
|
|
378
|
+
[[package]]
|
|
379
|
+
name = "unicode-ident"
|
|
380
|
+
version = "1.0.12"
|
|
381
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
382
|
+
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
|
383
|
+
|
|
384
|
+
[[package]]
|
|
385
|
+
name = "unindent"
|
|
386
|
+
version = "0.2.3"
|
|
387
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
388
|
+
checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce"
|
|
389
|
+
|
|
390
|
+
[[package]]
|
|
391
|
+
name = "winapi"
|
|
392
|
+
version = "0.3.9"
|
|
393
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
394
|
+
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
|
395
|
+
dependencies = [
|
|
396
|
+
"winapi-i686-pc-windows-gnu",
|
|
397
|
+
"winapi-x86_64-pc-windows-gnu",
|
|
398
|
+
]
|
|
399
|
+
|
|
400
|
+
[[package]]
|
|
401
|
+
name = "winapi-i686-pc-windows-gnu"
|
|
402
|
+
version = "0.4.0"
|
|
403
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
404
|
+
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
|
405
|
+
|
|
406
|
+
[[package]]
|
|
407
|
+
name = "winapi-x86_64-pc-windows-gnu"
|
|
408
|
+
version = "0.4.0"
|
|
409
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
410
|
+
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
|
411
|
+
|
|
412
|
+
[[package]]
|
|
413
|
+
name = "windows-targets"
|
|
414
|
+
version = "0.52.6"
|
|
415
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
416
|
+
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
|
417
|
+
dependencies = [
|
|
418
|
+
"windows_aarch64_gnullvm",
|
|
419
|
+
"windows_aarch64_msvc",
|
|
420
|
+
"windows_i686_gnu",
|
|
421
|
+
"windows_i686_gnullvm",
|
|
422
|
+
"windows_i686_msvc",
|
|
423
|
+
"windows_x86_64_gnu",
|
|
424
|
+
"windows_x86_64_gnullvm",
|
|
425
|
+
"windows_x86_64_msvc",
|
|
426
|
+
]
|
|
427
|
+
|
|
428
|
+
[[package]]
|
|
429
|
+
name = "windows_aarch64_gnullvm"
|
|
430
|
+
version = "0.52.6"
|
|
431
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
432
|
+
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
|
433
|
+
|
|
434
|
+
[[package]]
|
|
435
|
+
name = "windows_aarch64_msvc"
|
|
436
|
+
version = "0.52.6"
|
|
437
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
438
|
+
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
|
439
|
+
|
|
440
|
+
[[package]]
|
|
441
|
+
name = "windows_i686_gnu"
|
|
442
|
+
version = "0.52.6"
|
|
443
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
444
|
+
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
|
445
|
+
|
|
446
|
+
[[package]]
|
|
447
|
+
name = "windows_i686_gnullvm"
|
|
448
|
+
version = "0.52.6"
|
|
449
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
450
|
+
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
|
451
|
+
|
|
452
|
+
[[package]]
|
|
453
|
+
name = "windows_i686_msvc"
|
|
454
|
+
version = "0.52.6"
|
|
455
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
456
|
+
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
|
457
|
+
|
|
458
|
+
[[package]]
|
|
459
|
+
name = "windows_x86_64_gnu"
|
|
460
|
+
version = "0.52.6"
|
|
461
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
462
|
+
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
|
463
|
+
|
|
464
|
+
[[package]]
|
|
465
|
+
name = "windows_x86_64_gnullvm"
|
|
466
|
+
version = "0.52.6"
|
|
467
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
468
|
+
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
|
469
|
+
|
|
470
|
+
[[package]]
|
|
471
|
+
name = "windows_x86_64_msvc"
|
|
472
|
+
version = "0.52.6"
|
|
473
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
474
|
+
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "shr_parser_bindings"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
edition = "2021"
|
|
5
|
+
|
|
6
|
+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
7
|
+
[lib]
|
|
8
|
+
name = "shr_parser"
|
|
9
|
+
crate-type = ["cdylib"]
|
|
10
|
+
|
|
11
|
+
[dependencies]
|
|
12
|
+
pyo3 = "0.21.1"
|
|
13
|
+
shr_parser = "1.0.2"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: shr_parser
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Classifier: Programming Language :: Rust
|
|
5
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
7
|
+
Requires-Python: >=3.8
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["maturin>=1.6,<2.0"]
|
|
3
|
+
build-backend = "maturin"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "shr_parser"
|
|
7
|
+
requires-python = ">=3.8"
|
|
8
|
+
classifiers = [
|
|
9
|
+
"Programming Language :: Rust",
|
|
10
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
11
|
+
"Programming Language :: Python :: Implementation :: PyPy",
|
|
12
|
+
]
|
|
13
|
+
dynamic = ["version"]
|
|
14
|
+
[tool.maturin]
|
|
15
|
+
features = ["pyo3/extension-module"]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
use std::path::PathBuf;
|
|
2
|
+
use pyo3::prelude::*;
|
|
3
|
+
use ::shr_parser::{SHRParser, SHRParsingType};
|
|
4
|
+
|
|
5
|
+
#[pyfunction]
|
|
6
|
+
pub fn parse_file(file_path: String, parsing_type: i32) -> PyResult<String> {
|
|
7
|
+
let path = PathBuf::from(file_path);
|
|
8
|
+
let parsing_type = SHRParsingType::try_from(parsing_type)
|
|
9
|
+
.map_err(|_| pyo3::exceptions::PyValueError::new_err("Invalid parsing type"))?;
|
|
10
|
+
let parser = SHRParser::new(path, parsing_type)
|
|
11
|
+
.map_err(|_| pyo3::exceptions::PyIOError::new_err("Failed to parse the file"))?;
|
|
12
|
+
|
|
13
|
+
Ok(parser.to_str())
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
#[pymodule]
|
|
17
|
+
fn shr_parser(_py: Python, m: &PyModule) -> PyResult<()> {
|
|
18
|
+
m.add_function(wrap_pyfunction!(parse_file, m)?)?;
|
|
19
|
+
Ok(())
|
|
20
|
+
}
|