opensheet-core 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.
@@ -0,0 +1,60 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ${{ matrix.os }}
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ os: [ubuntu-latest, macos-latest, windows-latest]
16
+ python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install Rust
25
+ uses: dtolnay/rust-toolchain@stable
26
+
27
+ - name: Build and install
28
+ run: |
29
+ pip install maturin pytest
30
+ maturin build --out dist
31
+ pip install --find-links dist opensheet-core
32
+
33
+ - name: Run Python tests
34
+ run: pytest tests/ -v
35
+
36
+ - name: Run Rust tests
37
+ run: cargo test --no-default-features
38
+
39
+ lint:
40
+ runs-on: ubuntu-latest
41
+ steps:
42
+ - uses: actions/checkout@v4
43
+
44
+ - uses: actions/setup-python@v5
45
+ with:
46
+ python-version: "3.12"
47
+
48
+ - name: Install Rust
49
+ uses: dtolnay/rust-toolchain@stable
50
+ with:
51
+ components: clippy, rustfmt
52
+
53
+ - name: Check formatting
54
+ run: cargo fmt --check
55
+
56
+ - name: Clippy
57
+ run: cargo clippy --no-default-features -- -D warnings
58
+
59
+ - name: Rust tests
60
+ run: cargo test --no-default-features
@@ -0,0 +1,90 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ build-wheels:
13
+ runs-on: ${{ matrix.os }}
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ include:
18
+ # Linux x86_64
19
+ - os: ubuntu-latest
20
+ target: x86_64
21
+ # Linux aarch64
22
+ - os: ubuntu-latest
23
+ target: aarch64
24
+ # macOS x86_64 (cross-compile from ARM)
25
+ - os: macos-latest
26
+ target: x86_64
27
+ # macOS Apple Silicon
28
+ - os: macos-latest
29
+ target: aarch64
30
+ # Windows x86_64
31
+ - os: windows-latest
32
+ target: x64
33
+ steps:
34
+ - uses: actions/checkout@v4
35
+
36
+ - uses: actions/setup-python@v5
37
+ with:
38
+ python-version: "3.12"
39
+
40
+ - name: Build wheels
41
+ uses: PyO3/maturin-action@v1
42
+ with:
43
+ target: ${{ matrix.target }}
44
+ args: --release --out dist --find-interpreter
45
+ manylinux: auto
46
+
47
+ - name: Upload wheels
48
+ uses: actions/upload-artifact@v4
49
+ with:
50
+ name: wheels-${{ matrix.os }}-${{ matrix.target }}
51
+ path: dist
52
+
53
+ build-sdist:
54
+ runs-on: ubuntu-latest
55
+ steps:
56
+ - uses: actions/checkout@v4
57
+
58
+ - name: Build sdist
59
+ uses: PyO3/maturin-action@v1
60
+ with:
61
+ command: sdist
62
+ args: --out dist
63
+
64
+ - name: Upload sdist
65
+ uses: actions/upload-artifact@v4
66
+ with:
67
+ name: wheels-sdist
68
+ path: dist
69
+
70
+ publish:
71
+ needs: [build-wheels, build-sdist]
72
+ runs-on: ubuntu-latest
73
+ environment:
74
+ name: pypi
75
+ url: https://pypi.org/p/opensheet-core
76
+ permissions:
77
+ id-token: write
78
+ steps:
79
+ - name: Download all artifacts
80
+ uses: actions/download-artifact@v4
81
+ with:
82
+ pattern: wheels-*
83
+ merge-multiple: true
84
+ path: dist
85
+
86
+ - name: Publish to PyPI
87
+ uses: PyO3/maturin-action@v1
88
+ with:
89
+ command: upload
90
+ args: --non-interactive --skip-existing dist/*
@@ -0,0 +1,30 @@
1
+ # Rust
2
+ target/
3
+ Cargo.lock
4
+
5
+ # Python
6
+ __pycache__/
7
+ *.py[cod]
8
+ *.egg-info/
9
+ *.egg
10
+ dist/
11
+ build/
12
+ *.so
13
+ *.dylib
14
+ *.pyd
15
+ *.dSYM/
16
+
17
+ # Virtual environments
18
+ .venv/
19
+ venv/
20
+ env/
21
+
22
+ # IDE
23
+ .vscode/
24
+ .idea/
25
+ *.swp
26
+ *.swo
27
+
28
+ # OS
29
+ .DS_Store
30
+ Thumbs.db
@@ -0,0 +1,317 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "adler2"
7
+ version = "2.0.1"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
10
+
11
+ [[package]]
12
+ name = "arbitrary"
13
+ version = "1.4.2"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1"
16
+ dependencies = [
17
+ "derive_arbitrary",
18
+ ]
19
+
20
+ [[package]]
21
+ name = "bumpalo"
22
+ version = "3.20.2"
23
+ source = "registry+https://github.com/rust-lang/crates.io-index"
24
+ checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
25
+
26
+ [[package]]
27
+ name = "cfg-if"
28
+ version = "1.0.4"
29
+ source = "registry+https://github.com/rust-lang/crates.io-index"
30
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
31
+
32
+ [[package]]
33
+ name = "crc32fast"
34
+ version = "1.5.0"
35
+ source = "registry+https://github.com/rust-lang/crates.io-index"
36
+ checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
37
+ dependencies = [
38
+ "cfg-if",
39
+ ]
40
+
41
+ [[package]]
42
+ name = "crossbeam-utils"
43
+ version = "0.8.21"
44
+ source = "registry+https://github.com/rust-lang/crates.io-index"
45
+ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
46
+
47
+ [[package]]
48
+ name = "derive_arbitrary"
49
+ version = "1.4.2"
50
+ source = "registry+https://github.com/rust-lang/crates.io-index"
51
+ checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a"
52
+ dependencies = [
53
+ "proc-macro2",
54
+ "quote",
55
+ "syn",
56
+ ]
57
+
58
+ [[package]]
59
+ name = "displaydoc"
60
+ version = "0.2.5"
61
+ source = "registry+https://github.com/rust-lang/crates.io-index"
62
+ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
63
+ dependencies = [
64
+ "proc-macro2",
65
+ "quote",
66
+ "syn",
67
+ ]
68
+
69
+ [[package]]
70
+ name = "equivalent"
71
+ version = "1.0.2"
72
+ source = "registry+https://github.com/rust-lang/crates.io-index"
73
+ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
74
+
75
+ [[package]]
76
+ name = "flate2"
77
+ version = "1.1.9"
78
+ source = "registry+https://github.com/rust-lang/crates.io-index"
79
+ checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
80
+ dependencies = [
81
+ "crc32fast",
82
+ "miniz_oxide",
83
+ ]
84
+
85
+ [[package]]
86
+ name = "hashbrown"
87
+ version = "0.16.1"
88
+ source = "registry+https://github.com/rust-lang/crates.io-index"
89
+ checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
90
+
91
+ [[package]]
92
+ name = "heck"
93
+ version = "0.5.0"
94
+ source = "registry+https://github.com/rust-lang/crates.io-index"
95
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
96
+
97
+ [[package]]
98
+ name = "indexmap"
99
+ version = "2.13.0"
100
+ source = "registry+https://github.com/rust-lang/crates.io-index"
101
+ checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017"
102
+ dependencies = [
103
+ "equivalent",
104
+ "hashbrown",
105
+ ]
106
+
107
+ [[package]]
108
+ name = "libc"
109
+ version = "0.2.183"
110
+ source = "registry+https://github.com/rust-lang/crates.io-index"
111
+ checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
112
+
113
+ [[package]]
114
+ name = "log"
115
+ version = "0.4.29"
116
+ source = "registry+https://github.com/rust-lang/crates.io-index"
117
+ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
118
+
119
+ [[package]]
120
+ name = "memchr"
121
+ version = "2.8.0"
122
+ source = "registry+https://github.com/rust-lang/crates.io-index"
123
+ checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
124
+
125
+ [[package]]
126
+ name = "miniz_oxide"
127
+ version = "0.8.9"
128
+ source = "registry+https://github.com/rust-lang/crates.io-index"
129
+ checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
130
+ dependencies = [
131
+ "adler2",
132
+ "simd-adler32",
133
+ ]
134
+
135
+ [[package]]
136
+ name = "once_cell"
137
+ version = "1.21.4"
138
+ source = "registry+https://github.com/rust-lang/crates.io-index"
139
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
140
+
141
+ [[package]]
142
+ name = "opensheet-core"
143
+ version = "0.1.0"
144
+ dependencies = [
145
+ "pyo3",
146
+ "quick-xml",
147
+ "zip",
148
+ ]
149
+
150
+ [[package]]
151
+ name = "portable-atomic"
152
+ version = "1.13.1"
153
+ source = "registry+https://github.com/rust-lang/crates.io-index"
154
+ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
155
+
156
+ [[package]]
157
+ name = "proc-macro2"
158
+ version = "1.0.106"
159
+ source = "registry+https://github.com/rust-lang/crates.io-index"
160
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
161
+ dependencies = [
162
+ "unicode-ident",
163
+ ]
164
+
165
+ [[package]]
166
+ name = "pyo3"
167
+ version = "0.28.2"
168
+ source = "registry+https://github.com/rust-lang/crates.io-index"
169
+ checksum = "cf85e27e86080aafd5a22eae58a162e133a589551542b3e5cee4beb27e54f8e1"
170
+ dependencies = [
171
+ "libc",
172
+ "once_cell",
173
+ "portable-atomic",
174
+ "pyo3-build-config",
175
+ "pyo3-ffi",
176
+ "pyo3-macros",
177
+ ]
178
+
179
+ [[package]]
180
+ name = "pyo3-build-config"
181
+ version = "0.28.2"
182
+ source = "registry+https://github.com/rust-lang/crates.io-index"
183
+ checksum = "8bf94ee265674bf76c09fa430b0e99c26e319c945d96ca0d5a8215f31bf81cf7"
184
+ dependencies = [
185
+ "target-lexicon",
186
+ ]
187
+
188
+ [[package]]
189
+ name = "pyo3-ffi"
190
+ version = "0.28.2"
191
+ source = "registry+https://github.com/rust-lang/crates.io-index"
192
+ checksum = "491aa5fc66d8059dd44a75f4580a2962c1862a1c2945359db36f6c2818b748dc"
193
+ dependencies = [
194
+ "libc",
195
+ "pyo3-build-config",
196
+ ]
197
+
198
+ [[package]]
199
+ name = "pyo3-macros"
200
+ version = "0.28.2"
201
+ source = "registry+https://github.com/rust-lang/crates.io-index"
202
+ checksum = "f5d671734e9d7a43449f8480f8b38115df67bef8d21f76837fa75ee7aaa5e52e"
203
+ dependencies = [
204
+ "proc-macro2",
205
+ "pyo3-macros-backend",
206
+ "quote",
207
+ "syn",
208
+ ]
209
+
210
+ [[package]]
211
+ name = "pyo3-macros-backend"
212
+ version = "0.28.2"
213
+ source = "registry+https://github.com/rust-lang/crates.io-index"
214
+ checksum = "22faaa1ce6c430a1f71658760497291065e6450d7b5dc2bcf254d49f66ee700a"
215
+ dependencies = [
216
+ "heck",
217
+ "proc-macro2",
218
+ "pyo3-build-config",
219
+ "quote",
220
+ "syn",
221
+ ]
222
+
223
+ [[package]]
224
+ name = "quick-xml"
225
+ version = "0.37.5"
226
+ source = "registry+https://github.com/rust-lang/crates.io-index"
227
+ checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb"
228
+ dependencies = [
229
+ "memchr",
230
+ ]
231
+
232
+ [[package]]
233
+ name = "quote"
234
+ version = "1.0.45"
235
+ source = "registry+https://github.com/rust-lang/crates.io-index"
236
+ checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
237
+ dependencies = [
238
+ "proc-macro2",
239
+ ]
240
+
241
+ [[package]]
242
+ name = "simd-adler32"
243
+ version = "0.3.9"
244
+ source = "registry+https://github.com/rust-lang/crates.io-index"
245
+ checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214"
246
+
247
+ [[package]]
248
+ name = "syn"
249
+ version = "2.0.117"
250
+ source = "registry+https://github.com/rust-lang/crates.io-index"
251
+ checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
252
+ dependencies = [
253
+ "proc-macro2",
254
+ "quote",
255
+ "unicode-ident",
256
+ ]
257
+
258
+ [[package]]
259
+ name = "target-lexicon"
260
+ version = "0.13.5"
261
+ source = "registry+https://github.com/rust-lang/crates.io-index"
262
+ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
263
+
264
+ [[package]]
265
+ name = "thiserror"
266
+ version = "2.0.18"
267
+ source = "registry+https://github.com/rust-lang/crates.io-index"
268
+ checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
269
+ dependencies = [
270
+ "thiserror-impl",
271
+ ]
272
+
273
+ [[package]]
274
+ name = "thiserror-impl"
275
+ version = "2.0.18"
276
+ source = "registry+https://github.com/rust-lang/crates.io-index"
277
+ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
278
+ dependencies = [
279
+ "proc-macro2",
280
+ "quote",
281
+ "syn",
282
+ ]
283
+
284
+ [[package]]
285
+ name = "unicode-ident"
286
+ version = "1.0.24"
287
+ source = "registry+https://github.com/rust-lang/crates.io-index"
288
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
289
+
290
+ [[package]]
291
+ name = "zip"
292
+ version = "2.4.2"
293
+ source = "registry+https://github.com/rust-lang/crates.io-index"
294
+ checksum = "fabe6324e908f85a1c52063ce7aa26b68dcb7eb6dbc83a2d148403c9bc3eba50"
295
+ dependencies = [
296
+ "arbitrary",
297
+ "crc32fast",
298
+ "crossbeam-utils",
299
+ "displaydoc",
300
+ "flate2",
301
+ "indexmap",
302
+ "memchr",
303
+ "thiserror",
304
+ "zopfli",
305
+ ]
306
+
307
+ [[package]]
308
+ name = "zopfli"
309
+ version = "0.8.3"
310
+ source = "registry+https://github.com/rust-lang/crates.io-index"
311
+ checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249"
312
+ dependencies = [
313
+ "bumpalo",
314
+ "crc32fast",
315
+ "log",
316
+ "simd-adler32",
317
+ ]
@@ -0,0 +1,20 @@
1
+ [package]
2
+ name = "opensheet-core"
3
+ version = "0.1.0"
4
+ edition = "2021"
5
+ description = "A fast, memory-efficient spreadsheet I/O core"
6
+ license = "MIT"
7
+ readme = "README.md"
8
+
9
+ [lib]
10
+ name = "opensheet_core"
11
+ crate-type = ["cdylib", "rlib"]
12
+
13
+ [features]
14
+ default = ["extension-module"]
15
+ extension-module = ["pyo3/extension-module"]
16
+
17
+ [dependencies]
18
+ pyo3 = "0.28"
19
+ zip = { version = "2", default-features = false, features = ["deflate"] }
20
+ quick-xml = "0.37"
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 0xNadr
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.