python-calamine 0.7.0__tar.gz → 0.8.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.
- python_calamine-0.8.1/.github/pyodide/pylock.314.toml +57 -0
- python_calamine-0.8.1/.github/pyodide/requirements.in +7 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/.github/workflows/CI.yml +110 -15
- {python_calamine-0.7.0 → python_calamine-0.8.1}/Cargo.lock +10 -9
- {python_calamine-0.7.0 → python_calamine-0.8.1}/Cargo.toml +2 -2
- {python_calamine-0.7.0 → python_calamine-0.8.1}/PKG-INFO +1 -1
- {python_calamine-0.7.0 → python_calamine-0.8.1}/pyproject.toml +1 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/src/types/workbook.rs +16 -10
- python_calamine-0.8.1/uv.lock +1821 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/.github/dependabot.yml +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/.gitignore +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/.pre-commit-config.yaml +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/LICENSE +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/README.md +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/build.rs +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/python/python_calamine/__init__.py +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/python/python_calamine/_python_calamine.pyi +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/python/python_calamine/py.typed +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/src/lib.rs +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/src/types/cell.rs +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/src/types/errors.rs +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/src/types/mod.rs +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/src/types/sheet.rs +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/src/types/table.rs +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/__init__.py +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/conftest.py +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/data/any_sheets.ods +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/data/any_sheets.xls +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/data/any_sheets.xlsb +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/data/any_sheets.xlsx +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/data/base.ods +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/data/base.xls +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/data/base.xlsb +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/data/base.xlsx +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/data/empty_file.ods +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/data/empty_file.xlsb +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/data/empty_file.xlsx +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/data/issue139.xlsx +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/data/password.ods +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/data/password.xls +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/data/password.xlsb +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/data/password.xlsx +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/data/table-multiple.xlsx +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/test_base.py +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/test_pandas.py +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/test_sheet_type.py +0 -0
- {python_calamine-0.7.0 → python_calamine-0.8.1}/tests/test_tables.py +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
lock-version = "1.0"
|
|
2
|
+
created-by = "pip"
|
|
3
|
+
|
|
4
|
+
[[packages]]
|
|
5
|
+
name = "iniconfig"
|
|
6
|
+
version = "2.3.0"
|
|
7
|
+
|
|
8
|
+
[[packages.wheels]]
|
|
9
|
+
name = "iniconfig-2.3.0-py3-none-any.whl"
|
|
10
|
+
url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl"
|
|
11
|
+
|
|
12
|
+
[packages.wheels.hashes]
|
|
13
|
+
sha256 = "f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12"
|
|
14
|
+
|
|
15
|
+
[[packages]]
|
|
16
|
+
name = "packaging"
|
|
17
|
+
version = "26.2"
|
|
18
|
+
|
|
19
|
+
[[packages.wheels]]
|
|
20
|
+
name = "packaging-26.2-py3-none-any.whl"
|
|
21
|
+
url = "https://files.pythonhosted.org/packages/df/b2/87e62e8c3e2f4b32e5fe99e0b86d576da1312593b39f47d8ceef365e95ed/packaging-26.2-py3-none-any.whl"
|
|
22
|
+
|
|
23
|
+
[packages.wheels.hashes]
|
|
24
|
+
sha256 = "5fc45236b9446107ff2415ce77c807cee2862cb6fac22b8a73826d0693b0980e"
|
|
25
|
+
|
|
26
|
+
[[packages]]
|
|
27
|
+
name = "pluggy"
|
|
28
|
+
version = "1.6.0"
|
|
29
|
+
|
|
30
|
+
[[packages.wheels]]
|
|
31
|
+
name = "pluggy-1.6.0-py3-none-any.whl"
|
|
32
|
+
url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl"
|
|
33
|
+
|
|
34
|
+
[packages.wheels.hashes]
|
|
35
|
+
sha256 = "e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746"
|
|
36
|
+
|
|
37
|
+
[[packages]]
|
|
38
|
+
name = "pygments"
|
|
39
|
+
version = "2.20.0"
|
|
40
|
+
|
|
41
|
+
[[packages.wheels]]
|
|
42
|
+
name = "pygments-2.20.0-py3-none-any.whl"
|
|
43
|
+
url = "https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl"
|
|
44
|
+
|
|
45
|
+
[packages.wheels.hashes]
|
|
46
|
+
sha256 = "81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176"
|
|
47
|
+
|
|
48
|
+
[[packages]]
|
|
49
|
+
name = "pytest"
|
|
50
|
+
version = "9.1.1"
|
|
51
|
+
|
|
52
|
+
[[packages.wheels]]
|
|
53
|
+
name = "pytest-9.1.1-py3-none-any.whl"
|
|
54
|
+
url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl"
|
|
55
|
+
|
|
56
|
+
[packages.wheels.hashes]
|
|
57
|
+
sha256 = "37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Selected dependencies (including dev ones) to run the test suite with Pyodide.
|
|
2
|
+
# Dependencies should be installed from the derived `pylock.toml` file.
|
|
3
|
+
# To generate the lockfile, run `python -m pip lock -r requirements.in -o pylock.31x.toml`,
|
|
4
|
+
# in a Pyodide venv matching the target Python version. Such a venv can be created using
|
|
5
|
+
# `pyodide venv .venv-pyodide` (and this must be done from a Python venv matching the target
|
|
6
|
+
# Python version).
|
|
7
|
+
pytest~=9.0
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# some code from https://github.com/pydantic/pydantic-core/blob/d6e7890b36ef21cb28180a7f5b1479da2319012d/.github/workflows/ci.yml
|
|
2
|
+
# and https://github.com/pydantic/pydantic/blob/f59e929c999e8b2efc7b12fd0bc1685c1a186be3/.github/workflows/ci.yml
|
|
2
3
|
# MIT License, see author list by link
|
|
3
4
|
|
|
4
5
|
name: CI
|
|
@@ -11,6 +12,9 @@ on:
|
|
|
11
12
|
- "**"
|
|
12
13
|
pull_request: {}
|
|
13
14
|
|
|
15
|
+
env:
|
|
16
|
+
UV_FROZEN: true
|
|
17
|
+
|
|
14
18
|
permissions: {}
|
|
15
19
|
|
|
16
20
|
jobs:
|
|
@@ -28,15 +32,17 @@ jobs:
|
|
|
28
32
|
- "3.13"
|
|
29
33
|
- "3.14"
|
|
30
34
|
pandas-version:
|
|
31
|
-
- "2.2.*"
|
|
32
35
|
- "2.3.*"
|
|
36
|
+
- "3.0.*"
|
|
33
37
|
include:
|
|
34
38
|
# https://github.com/pandas-dev/pandas/issues/42509
|
|
35
39
|
- python-version: "pypy3.11"
|
|
36
40
|
pandas-version: "none"
|
|
37
|
-
# https://github.com/pandas-dev/pandas/issues/60016
|
|
38
41
|
- python-version: "3.14t"
|
|
39
|
-
pandas-version: "
|
|
42
|
+
pandas-version: "3.0.*"
|
|
43
|
+
exclude:
|
|
44
|
+
- python-version: "3.10"
|
|
45
|
+
pandas-version: "3.0.*"
|
|
40
46
|
|
|
41
47
|
runs-on: ubuntu-latest
|
|
42
48
|
|
|
@@ -44,7 +50,7 @@ jobs:
|
|
|
44
50
|
PYTHON: ${{ matrix.python-version }}
|
|
45
51
|
|
|
46
52
|
steps:
|
|
47
|
-
- uses: actions/checkout@
|
|
53
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
48
54
|
with:
|
|
49
55
|
persist-credentials: false
|
|
50
56
|
|
|
@@ -60,14 +66,14 @@ jobs:
|
|
|
60
66
|
key: v3
|
|
61
67
|
|
|
62
68
|
- name: set up python
|
|
63
|
-
uses: actions/setup-python@
|
|
69
|
+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
|
64
70
|
with:
|
|
65
71
|
python-version: ${{ matrix.python-version }}
|
|
66
72
|
allow-prereleases: true
|
|
67
73
|
|
|
68
74
|
- id: cache-py
|
|
69
75
|
name: cache python
|
|
70
|
-
uses: actions/cache@
|
|
76
|
+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
71
77
|
with:
|
|
72
78
|
path: ${{ env.pythonLocation }}
|
|
73
79
|
key: >
|
|
@@ -92,13 +98,50 @@ jobs:
|
|
|
92
98
|
|
|
93
99
|
- run: pytest
|
|
94
100
|
|
|
101
|
+
test-pyemscripten:
|
|
102
|
+
name: test ${{ matrix.python-version }} PyEmscripten
|
|
103
|
+
needs: [build-pyemscripten]
|
|
104
|
+
runs-on: ubuntu-latest
|
|
105
|
+
strategy:
|
|
106
|
+
fail-fast: false
|
|
107
|
+
matrix:
|
|
108
|
+
include:
|
|
109
|
+
- python-version: "3.14"
|
|
110
|
+
pylock-suffix: "314"
|
|
111
|
+
|
|
112
|
+
steps:
|
|
113
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
114
|
+
with:
|
|
115
|
+
persist-credentials: false
|
|
116
|
+
|
|
117
|
+
- name: install uv
|
|
118
|
+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
119
|
+
with:
|
|
120
|
+
python-version: ${{ matrix.python-version }}
|
|
121
|
+
enable-cache: true # zizmor: ignore[cache-poisoning] -- Job does not produce release artifacts and does not have sensitive permissions
|
|
122
|
+
|
|
123
|
+
- name: get dist artifacts
|
|
124
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
125
|
+
with:
|
|
126
|
+
name: python_calamine_pypi_files_pyemscripten_${{ matrix.python-version }}
|
|
127
|
+
path: dist
|
|
128
|
+
|
|
129
|
+
- run: |
|
|
130
|
+
uv sync --only-group pyodide-build
|
|
131
|
+
uv run pyodide venv .venv-pyodide
|
|
132
|
+
source .venv-pyodide/bin/activate
|
|
133
|
+
python -m pip install --upgrade pip>=26.1.1
|
|
134
|
+
python -m pip install -r .github/pyodide/pylock.${{ matrix.pylock-suffix }}.toml
|
|
135
|
+
python -m pip install python-calamine --no-index --no-deps --find-links dist
|
|
136
|
+
python -m pytest
|
|
137
|
+
|
|
95
138
|
lint:
|
|
96
139
|
permissions:
|
|
97
140
|
contents: read
|
|
98
141
|
runs-on: ubuntu-latest
|
|
99
142
|
|
|
100
143
|
steps:
|
|
101
|
-
- uses: actions/checkout@
|
|
144
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
102
145
|
with:
|
|
103
146
|
persist-credentials: false
|
|
104
147
|
|
|
@@ -110,11 +153,11 @@ jobs:
|
|
|
110
153
|
- name: cache rust
|
|
111
154
|
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
|
|
112
155
|
|
|
113
|
-
- uses: actions/setup-python@
|
|
156
|
+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
|
114
157
|
with:
|
|
115
158
|
python-version: "3.14"
|
|
116
159
|
|
|
117
|
-
- uses: actions/cache@
|
|
160
|
+
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
118
161
|
id: cache-py
|
|
119
162
|
name: cache python
|
|
120
163
|
with:
|
|
@@ -136,7 +179,7 @@ jobs:
|
|
|
136
179
|
# https://github.com/marketplace/actions/alls-green#why used for branch protection checks
|
|
137
180
|
check:
|
|
138
181
|
if: always()
|
|
139
|
-
needs: [test, lint]
|
|
182
|
+
needs: [test, test-pyemscripten, lint]
|
|
140
183
|
runs-on: ubuntu-latest
|
|
141
184
|
steps:
|
|
142
185
|
- name: Decide whether the needed jobs succeeded or failed
|
|
@@ -214,12 +257,12 @@ jobs:
|
|
|
214
257
|
|
|
215
258
|
runs-on: ${{ matrix.runs-on || format('{0}-latest', (matrix.os == 'linux' && 'ubuntu') || matrix.os) }}
|
|
216
259
|
steps:
|
|
217
|
-
- uses: actions/checkout@
|
|
260
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
218
261
|
with:
|
|
219
262
|
persist-credentials: false
|
|
220
263
|
|
|
221
264
|
- name: set up python
|
|
222
|
-
uses: actions/setup-python@
|
|
265
|
+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
|
223
266
|
with:
|
|
224
267
|
python-version: "3.14"
|
|
225
268
|
|
|
@@ -253,8 +296,60 @@ jobs:
|
|
|
253
296
|
name: wheels-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.manylinux || 'auto' }}
|
|
254
297
|
path: dist
|
|
255
298
|
|
|
299
|
+
build-pyemscripten:
|
|
300
|
+
name: build PyEmscripten (${{ matrix.python-version }})
|
|
301
|
+
runs-on: ubuntu-latest
|
|
302
|
+
strategy:
|
|
303
|
+
fail-fast: false
|
|
304
|
+
matrix:
|
|
305
|
+
include:
|
|
306
|
+
- python-version: "3.14"
|
|
307
|
+
steps:
|
|
308
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
309
|
+
with:
|
|
310
|
+
persist-credentials: false
|
|
311
|
+
|
|
312
|
+
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
313
|
+
with:
|
|
314
|
+
python-version: ${{ matrix.python-version }}
|
|
315
|
+
enable-cache: ${{ !startsWith(github.ref, 'refs/tags/') }} # zizmor: ignore[cache-poisoning]
|
|
316
|
+
|
|
317
|
+
- run: uv sync --only-group pyodide-build
|
|
318
|
+
|
|
319
|
+
- name: Get pyodide config
|
|
320
|
+
id: pyodide-config
|
|
321
|
+
run: |
|
|
322
|
+
echo "rust-toolchain=$(uv run pyodide config get rust_toolchain)" >> "$GITHUB_OUTPUT"
|
|
323
|
+
echo "emscripten-version=$(uv run pyodide config get emscripten_version)" >> "$GITHUB_OUTPUT"
|
|
324
|
+
echo "pyodide-abi-version=$(uv run pyodide config get pyodide_abi_version)" >> "$GITHUB_OUTPUT"
|
|
325
|
+
echo "rustflags=$(uv run pyodide config get rustflags)" >> "$GITHUB_OUTPUT"
|
|
326
|
+
|
|
327
|
+
- uses: emscripten-core/setup-emsdk@4528d102f7230f0e7b276855c01ea1159be0e984 # v16
|
|
328
|
+
with:
|
|
329
|
+
version: ${{ steps.pyodide-config.outputs.emscripten-version }}
|
|
330
|
+
no-cache: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
331
|
+
|
|
332
|
+
- name: Build wheels
|
|
333
|
+
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
|
334
|
+
# Unclear how to avoid manually specifying this yet (https://github.com/PyO3/maturin/issues/3189):
|
|
335
|
+
env:
|
|
336
|
+
CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUSTFLAGS: ${{ steps.pyodide-config.outputs.rustflags }}
|
|
337
|
+
MATURIN_PYEMSCRIPTEN_PLATFORM_VERSION: ${{ steps.pyodide-config.outputs.pyodide-abi-version }}
|
|
338
|
+
with:
|
|
339
|
+
target: wasm32-unknown-emscripten
|
|
340
|
+
args: --release --out dist --interpreter ${{ matrix.python-version }}
|
|
341
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} # zizmor: ignore[cache-poisoning]
|
|
342
|
+
rust-toolchain: ${{ steps.pyodide-config.outputs.rust-toolchain }}
|
|
343
|
+
|
|
344
|
+
- run: ls -lh dist/
|
|
345
|
+
|
|
346
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
347
|
+
with:
|
|
348
|
+
name: python_calamine_pypi_files_pyemscripten_${{ matrix.python-version }}
|
|
349
|
+
path: dist
|
|
350
|
+
|
|
256
351
|
release:
|
|
257
|
-
needs: [build, check]
|
|
352
|
+
needs: [build, build-pyemscripten, check]
|
|
258
353
|
if: success() && startsWith(github.ref, 'refs/tags/')
|
|
259
354
|
|
|
260
355
|
runs-on: ubuntu-latest
|
|
@@ -278,7 +373,7 @@ jobs:
|
|
|
278
373
|
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1.14
|
|
279
374
|
|
|
280
375
|
gh-release:
|
|
281
|
-
needs: [build, check]
|
|
376
|
+
needs: [build, build-pyemscripten, check]
|
|
282
377
|
if: success() && startsWith(github.ref, 'refs/tags/')
|
|
283
378
|
|
|
284
379
|
runs-on: ubuntu-latest
|
|
@@ -295,7 +390,7 @@ jobs:
|
|
|
295
390
|
merge-multiple: true
|
|
296
391
|
|
|
297
392
|
- name: Upload to GitHub
|
|
298
|
-
uses: softprops/action-gh-release@
|
|
393
|
+
uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1
|
|
299
394
|
with:
|
|
300
395
|
generate_release_notes: true
|
|
301
396
|
files: |
|
|
@@ -19,11 +19,12 @@ dependencies = [
|
|
|
19
19
|
|
|
20
20
|
[[package]]
|
|
21
21
|
name = "atoi_simd"
|
|
22
|
-
version = "0.
|
|
22
|
+
version = "0.18.1"
|
|
23
23
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
24
|
-
checksum = "
|
|
24
|
+
checksum = "f3cdb3708a128e559a30fb830e8a77a5022ee6902806925c216658652b452a44"
|
|
25
25
|
dependencies = [
|
|
26
26
|
"debug_unsafe",
|
|
27
|
+
"rustversion",
|
|
27
28
|
]
|
|
28
29
|
|
|
29
30
|
[[package]]
|
|
@@ -46,9 +47,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
|
|
46
47
|
|
|
47
48
|
[[package]]
|
|
48
49
|
name = "calamine"
|
|
49
|
-
version = "0.
|
|
50
|
+
version = "0.36.0"
|
|
50
51
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
51
|
-
checksum = "
|
|
52
|
+
checksum = "6975084f43060e56343ffba7f9731fa52a7dcf2e1cd8e2459fd4c6bf4a1bff59"
|
|
52
53
|
dependencies = [
|
|
53
54
|
"atoi_simd",
|
|
54
55
|
"byteorder",
|
|
@@ -372,7 +373,7 @@ dependencies = [
|
|
|
372
373
|
|
|
373
374
|
[[package]]
|
|
374
375
|
name = "python-calamine"
|
|
375
|
-
version = "0.
|
|
376
|
+
version = "0.8.1"
|
|
376
377
|
dependencies = [
|
|
377
378
|
"calamine",
|
|
378
379
|
"chrono",
|
|
@@ -383,9 +384,9 @@ dependencies = [
|
|
|
383
384
|
|
|
384
385
|
[[package]]
|
|
385
386
|
name = "quick-xml"
|
|
386
|
-
version = "0.
|
|
387
|
+
version = "0.41.0"
|
|
387
388
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
388
|
-
checksum = "
|
|
389
|
+
checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1"
|
|
389
390
|
dependencies = [
|
|
390
391
|
"encoding_rs",
|
|
391
392
|
"memchr",
|
|
@@ -588,9 +589,9 @@ dependencies = [
|
|
|
588
589
|
|
|
589
590
|
[[package]]
|
|
590
591
|
name = "zip"
|
|
591
|
-
version = "
|
|
592
|
+
version = "8.6.0"
|
|
592
593
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
593
|
-
checksum = "
|
|
594
|
+
checksum = "2d04a6b5381502aa6087c94c669499eb1602eb9c5e8198e534de571f7154809b"
|
|
594
595
|
dependencies = [
|
|
595
596
|
"crc32fast",
|
|
596
597
|
"flate2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "python-calamine"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.8.1"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ name = "python_calamine"
|
|
|
9
9
|
crate-type = ["cdylib"]
|
|
10
10
|
|
|
11
11
|
[dependencies]
|
|
12
|
-
calamine = { version = "0.
|
|
12
|
+
calamine = { version = "0.36.0", features = ["chrono"] }
|
|
13
13
|
pyo3 = { version = "0.29.0", features = [
|
|
14
14
|
"extension-module",
|
|
15
15
|
"chrono",
|
|
@@ -79,23 +79,29 @@ impl SheetsEnum {
|
|
|
79
79
|
) -> Result<Option<Vec<calamine::Dimensions>>, Error> {
|
|
80
80
|
match self {
|
|
81
81
|
SheetsEnum::File(f) => match f {
|
|
82
|
-
Sheets::Xls(xls_f) =>
|
|
82
|
+
Sheets::Xls(xls_f) => xls_f
|
|
83
|
+
.merge_cells_by_sheet_name(name)
|
|
84
|
+
.map(Some)
|
|
85
|
+
.map_err(CalamineCrateError::Xls)
|
|
86
|
+
.map_err(Error::Calamine),
|
|
83
87
|
Sheets::Xlsx(xlsx_f) => xlsx_f
|
|
84
|
-
.
|
|
85
|
-
.
|
|
88
|
+
.merge_cells_by_sheet_name(name)
|
|
89
|
+
.map(Some)
|
|
86
90
|
.map_err(CalamineCrateError::Xlsx)
|
|
87
|
-
.map_err(Error::Calamine)
|
|
88
|
-
.map(|inner| inner.or(Some(Vec::new()))),
|
|
91
|
+
.map_err(Error::Calamine),
|
|
89
92
|
_ => Ok(None),
|
|
90
93
|
},
|
|
91
94
|
SheetsEnum::FileLike(f) => match f {
|
|
92
|
-
Sheets::Xls(xls_f) =>
|
|
95
|
+
Sheets::Xls(xls_f) => xls_f
|
|
96
|
+
.merge_cells_by_sheet_name(name)
|
|
97
|
+
.map(Some)
|
|
98
|
+
.map_err(CalamineCrateError::Xls)
|
|
99
|
+
.map_err(Error::Calamine),
|
|
93
100
|
Sheets::Xlsx(xlsx_f) => xlsx_f
|
|
94
|
-
.
|
|
95
|
-
.
|
|
101
|
+
.merge_cells_by_sheet_name(name)
|
|
102
|
+
.map(Some)
|
|
96
103
|
.map_err(CalamineCrateError::Xlsx)
|
|
97
|
-
.map_err(Error::Calamine)
|
|
98
|
-
.map(|inner| inner.or(Some(Vec::new()))),
|
|
104
|
+
.map_err(Error::Calamine),
|
|
99
105
|
_ => Ok(None),
|
|
100
106
|
},
|
|
101
107
|
SheetsEnum::None => Err(Error::WorkbookClosed),
|