python-calamine 0.2.2__tar.gz → 0.2.3__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.2.2 → python_calamine-0.2.3}/.github/workflows/CI.yml +10 -9
- {python_calamine-0.2.2 → python_calamine-0.2.3}/Cargo.lock +15 -15
- {python_calamine-0.2.2 → python_calamine-0.2.3}/Cargo.toml +1 -1
- {python_calamine-0.2.2 → python_calamine-0.2.3}/PKG-INFO +1 -1
- {python_calamine-0.2.2 → python_calamine-0.2.3}/poetry.lock +51 -41
- {python_calamine-0.2.2 → python_calamine-0.2.3}/pyproject.toml +2 -2
- {python_calamine-0.2.2 → python_calamine-0.2.3}/python/python_calamine/_python_calamine.pyi +16 -0
- python_calamine-0.2.3/renovate.json +6 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/src/types/cell.rs +1 -1
- {python_calamine-0.2.2 → python_calamine-0.2.3}/src/types/sheet.rs +53 -1
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/test_base.py +24 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/.gitignore +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/.pre-commit-config.yaml +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/LICENSE +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/README.md +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/build.rs +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/python/python_calamine/__init__.py +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/python/python_calamine/pandas.py +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/python/python_calamine/py.typed +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/src/lib.rs +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/src/types/mod.rs +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/src/types/workbook.rs +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/src/utils.rs +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/__init__.py +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/conftest.py +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/data/any_sheets.ods +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/data/any_sheets.xls +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/data/any_sheets.xlsb +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/data/any_sheets.xlsx +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/data/base.ods +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/data/base.xls +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/data/base.xlsb +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/data/base.xlsx +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/data/empty_file.ods +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/data/empty_file.xlsb +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/data/empty_file.xlsx +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/data/password.ods +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/data/password.xls +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/data/password.xlsb +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/data/password.xlsx +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/test_pandas.py +0 -0
- {python_calamine-0.2.2 → python_calamine-0.2.3}/tests/test_sheet_type.py +0 -0
|
@@ -78,7 +78,7 @@ jobs:
|
|
|
78
78
|
|
|
79
79
|
- id: cache-py
|
|
80
80
|
name: cache python
|
|
81
|
-
uses: actions/cache@
|
|
81
|
+
uses: actions/cache@v4
|
|
82
82
|
with:
|
|
83
83
|
path: ${{ env.pythonLocation }}
|
|
84
84
|
key: >
|
|
@@ -116,11 +116,11 @@ jobs:
|
|
|
116
116
|
- name: cache rust
|
|
117
117
|
uses: Swatinem/rust-cache@v2
|
|
118
118
|
|
|
119
|
-
- uses: actions/setup-python@
|
|
119
|
+
- uses: actions/setup-python@v5
|
|
120
120
|
with:
|
|
121
121
|
python-version: '3.11'
|
|
122
122
|
|
|
123
|
-
- uses: actions/cache@
|
|
123
|
+
- uses: actions/cache@v4
|
|
124
124
|
id: cache-py
|
|
125
125
|
name: cache python
|
|
126
126
|
with:
|
|
@@ -210,7 +210,7 @@ jobs:
|
|
|
210
210
|
- uses: actions/checkout@v4
|
|
211
211
|
|
|
212
212
|
- name: set up python
|
|
213
|
-
uses: actions/setup-python@
|
|
213
|
+
uses: actions/setup-python@v5
|
|
214
214
|
with:
|
|
215
215
|
python-version: '3.11'
|
|
216
216
|
architecture: ${{ matrix.python-architecture || 'x64' }}
|
|
@@ -237,9 +237,9 @@ jobs:
|
|
|
237
237
|
|
|
238
238
|
- run: twine check --strict dist/*
|
|
239
239
|
|
|
240
|
-
- uses: actions/upload-artifact@
|
|
240
|
+
- uses: actions/upload-artifact@v4
|
|
241
241
|
with:
|
|
242
|
-
name: wheels
|
|
242
|
+
name: wheels-${{ matrix.platform || matrix.os }}-${{ matrix.target }}-${{ matrix.manylinux || 'auto' }}
|
|
243
243
|
path: dist
|
|
244
244
|
|
|
245
245
|
release:
|
|
@@ -251,17 +251,18 @@ jobs:
|
|
|
251
251
|
- uses: actions/checkout@v4
|
|
252
252
|
|
|
253
253
|
- name: set up python
|
|
254
|
-
uses: actions/setup-python@
|
|
254
|
+
uses: actions/setup-python@v5
|
|
255
255
|
with:
|
|
256
256
|
python-version: '3.10'
|
|
257
257
|
|
|
258
258
|
- run: pip install -U twine
|
|
259
259
|
|
|
260
260
|
- name: get dist artifacts
|
|
261
|
-
uses: actions/download-artifact@
|
|
261
|
+
uses: actions/download-artifact@v4
|
|
262
262
|
with:
|
|
263
|
-
name: wheels
|
|
264
263
|
path: dist
|
|
264
|
+
pattern: wheels-*
|
|
265
|
+
merge-multiple: true
|
|
265
266
|
|
|
266
267
|
- run: twine check dist/*
|
|
267
268
|
|
|
@@ -425,9 +425,9 @@ dependencies = [
|
|
|
425
425
|
|
|
426
426
|
[[package]]
|
|
427
427
|
name = "pyo3"
|
|
428
|
-
version = "0.22.
|
|
428
|
+
version = "0.22.2"
|
|
429
429
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
430
|
-
checksum = "
|
|
430
|
+
checksum = "831e8e819a138c36e212f3af3fd9eeffed6bf1510a805af35b0edee5ffa59433"
|
|
431
431
|
dependencies = [
|
|
432
432
|
"cfg-if",
|
|
433
433
|
"chrono",
|
|
@@ -444,9 +444,9 @@ dependencies = [
|
|
|
444
444
|
|
|
445
445
|
[[package]]
|
|
446
446
|
name = "pyo3-build-config"
|
|
447
|
-
version = "0.22.
|
|
447
|
+
version = "0.22.2"
|
|
448
448
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
449
|
-
checksum = "
|
|
449
|
+
checksum = "1e8730e591b14492a8945cdff32f089250b05f5accecf74aeddf9e8272ce1fa8"
|
|
450
450
|
dependencies = [
|
|
451
451
|
"once_cell",
|
|
452
452
|
"python3-dll-a",
|
|
@@ -455,9 +455,9 @@ dependencies = [
|
|
|
455
455
|
|
|
456
456
|
[[package]]
|
|
457
457
|
name = "pyo3-ffi"
|
|
458
|
-
version = "0.22.
|
|
458
|
+
version = "0.22.2"
|
|
459
459
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
460
|
-
checksum = "
|
|
460
|
+
checksum = "5e97e919d2df92eb88ca80a037969f44e5e70356559654962cbb3316d00300c6"
|
|
461
461
|
dependencies = [
|
|
462
462
|
"libc",
|
|
463
463
|
"pyo3-build-config",
|
|
@@ -474,9 +474,9 @@ dependencies = [
|
|
|
474
474
|
|
|
475
475
|
[[package]]
|
|
476
476
|
name = "pyo3-macros"
|
|
477
|
-
version = "0.22.
|
|
477
|
+
version = "0.22.2"
|
|
478
478
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
479
|
-
checksum = "
|
|
479
|
+
checksum = "eb57983022ad41f9e683a599f2fd13c3664d7063a3ac5714cae4b7bee7d3f206"
|
|
480
480
|
dependencies = [
|
|
481
481
|
"proc-macro2",
|
|
482
482
|
"pyo3-macros-backend",
|
|
@@ -486,9 +486,9 @@ dependencies = [
|
|
|
486
486
|
|
|
487
487
|
[[package]]
|
|
488
488
|
name = "pyo3-macros-backend"
|
|
489
|
-
version = "0.22.
|
|
489
|
+
version = "0.22.2"
|
|
490
490
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
491
|
-
checksum = "
|
|
491
|
+
checksum = "ec480c0c51ddec81019531705acac51bcdbeae563557c982aa8263bb96880372"
|
|
492
492
|
dependencies = [
|
|
493
493
|
"heck",
|
|
494
494
|
"proc-macro2",
|
|
@@ -499,7 +499,7 @@ dependencies = [
|
|
|
499
499
|
|
|
500
500
|
[[package]]
|
|
501
501
|
name = "python-calamine"
|
|
502
|
-
version = "0.2.
|
|
502
|
+
version = "0.2.3"
|
|
503
503
|
dependencies = [
|
|
504
504
|
"calamine",
|
|
505
505
|
"chrono",
|
|
@@ -650,18 +650,18 @@ dependencies = [
|
|
|
650
650
|
|
|
651
651
|
[[package]]
|
|
652
652
|
name = "thiserror"
|
|
653
|
-
version = "1.0.
|
|
653
|
+
version = "1.0.63"
|
|
654
654
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
655
|
-
checksum = "
|
|
655
|
+
checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
|
|
656
656
|
dependencies = [
|
|
657
657
|
"thiserror-impl",
|
|
658
658
|
]
|
|
659
659
|
|
|
660
660
|
[[package]]
|
|
661
661
|
name = "thiserror-impl"
|
|
662
|
-
version = "1.0.
|
|
662
|
+
version = "1.0.63"
|
|
663
663
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
664
|
-
checksum = "
|
|
664
|
+
checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
|
|
665
665
|
dependencies = [
|
|
666
666
|
"proc-macro2",
|
|
667
667
|
"quote",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# This file is automatically @generated by Poetry 1.
|
|
1
|
+
# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
|
|
2
2
|
|
|
3
3
|
[[package]]
|
|
4
4
|
name = "cfgv"
|
|
@@ -114,24 +114,24 @@ files = [
|
|
|
114
114
|
|
|
115
115
|
[[package]]
|
|
116
116
|
name = "maturin"
|
|
117
|
-
version = "1.
|
|
118
|
-
description = "Build and publish crates with pyo3,
|
|
117
|
+
version = "1.7.0"
|
|
118
|
+
description = "Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages"
|
|
119
119
|
optional = false
|
|
120
120
|
python-versions = ">=3.7"
|
|
121
121
|
files = [
|
|
122
|
-
{file = "maturin-1.
|
|
123
|
-
{file = "maturin-1.
|
|
124
|
-
{file = "maturin-1.
|
|
125
|
-
{file = "maturin-1.
|
|
126
|
-
{file = "maturin-1.
|
|
127
|
-
{file = "maturin-1.
|
|
128
|
-
{file = "maturin-1.
|
|
129
|
-
{file = "maturin-1.
|
|
130
|
-
{file = "maturin-1.
|
|
131
|
-
{file = "maturin-1.
|
|
132
|
-
{file = "maturin-1.
|
|
133
|
-
{file = "maturin-1.
|
|
134
|
-
{file = "maturin-1.
|
|
122
|
+
{file = "maturin-1.7.0-py3-none-linux_armv6l.whl", hash = "sha256:15fe7920391a128897714f6ed38ebbc771150410b795a55cefca73f089d5aecb"},
|
|
123
|
+
{file = "maturin-1.7.0-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:87a1fae70f1a6ad694832c735abf9f010edc4971c5cf89d2e7a54651a1a3792a"},
|
|
124
|
+
{file = "maturin-1.7.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6fd312c56846d3cafa7c45e362d96b526170e79b9adb5b8ea02a10c88906069c"},
|
|
125
|
+
{file = "maturin-1.7.0-py3-none-manylinux_2_12_i686.manylinux2010_i686.musllinux_1_1_i686.whl", hash = "sha256:928b82ceba924b1642c53f6684271e814b5ce5049cb4d35ff36bed078837eb83"},
|
|
126
|
+
{file = "maturin-1.7.0-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl", hash = "sha256:7460122333971b2492154c102d2981ae337ae0486dde7f4df7e645d724de59a5"},
|
|
127
|
+
{file = "maturin-1.7.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:1f521ebe0344db8260df0d12779aefc06c1f763cd654151cf4a238fe14f65dc1"},
|
|
128
|
+
{file = "maturin-1.7.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl", hash = "sha256:0af4f2a4cfb99206d414dec138dd3aac3f506eb8928b7e38dfac570461b393d6"},
|
|
129
|
+
{file = "maturin-1.7.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.musllinux_1_1_ppc64le.whl", hash = "sha256:29187d5c3e1e166c14eaadc63a8adc25b6bbb3e5b055d1bc87f6ca92b4b6e331"},
|
|
130
|
+
{file = "maturin-1.7.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e9cd5b992b6c131c5f47c85e7bc266bf5bf94f29720856678431ce6c91b726df"},
|
|
131
|
+
{file = "maturin-1.7.0-py3-none-win32.whl", hash = "sha256:c1ae0b4162fb1152aea83098bf1b66a7bf6dd73fd1b108e6c4e22160118a997c"},
|
|
132
|
+
{file = "maturin-1.7.0-py3-none-win_amd64.whl", hash = "sha256:2bd8227e020a9308c076253f29224c53b08b2a4ed41fcd94b4eb9349684fcfe7"},
|
|
133
|
+
{file = "maturin-1.7.0-py3-none-win_arm64.whl", hash = "sha256:7c05226547778f31b73d48a19d11f57792bcc44f4047b84c73ea66cae2e62473"},
|
|
134
|
+
{file = "maturin-1.7.0.tar.gz", hash = "sha256:1ba5277dd7832dc6181d69a005182b97b3520945825058484ffd9296f2efb59c"},
|
|
135
135
|
]
|
|
136
136
|
|
|
137
137
|
[package.dependencies]
|
|
@@ -139,7 +139,7 @@ tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
|
|
|
139
139
|
|
|
140
140
|
[package.extras]
|
|
141
141
|
patchelf = ["patchelf"]
|
|
142
|
-
zig = ["ziglang (>=0.10.0,<0.
|
|
142
|
+
zig = ["ziglang (>=0.10.0,<0.13.0)"]
|
|
143
143
|
|
|
144
144
|
[[package]]
|
|
145
145
|
name = "nodeenv"
|
|
@@ -255,13 +255,13 @@ et-xmlfile = "*"
|
|
|
255
255
|
|
|
256
256
|
[[package]]
|
|
257
257
|
name = "packaging"
|
|
258
|
-
version = "23.
|
|
258
|
+
version = "23.2"
|
|
259
259
|
description = "Core utilities for Python packages"
|
|
260
260
|
optional = false
|
|
261
261
|
python-versions = ">=3.7"
|
|
262
262
|
files = [
|
|
263
|
-
{file = "packaging-23.
|
|
264
|
-
{file = "packaging-23.
|
|
263
|
+
{file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"},
|
|
264
|
+
{file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"},
|
|
265
265
|
]
|
|
266
266
|
|
|
267
267
|
[[package]]
|
|
@@ -301,8 +301,8 @@ files = [
|
|
|
301
301
|
[package.dependencies]
|
|
302
302
|
numpy = [
|
|
303
303
|
{version = ">=1.20.3", markers = "python_version < \"3.10\""},
|
|
304
|
-
{version = ">=1.21.0", markers = "python_version >= \"3.10\" and python_version < \"3.11\""},
|
|
305
304
|
{version = ">=1.23.2", markers = "python_version >= \"3.11\""},
|
|
305
|
+
{version = ">=1.21.0", markers = "python_version >= \"3.10\" and python_version < \"3.11\""},
|
|
306
306
|
]
|
|
307
307
|
odfpy = {version = ">=1.4.1", optional = true, markers = "extra == \"excel\""}
|
|
308
308
|
openpyxl = {version = ">=3.0.7", optional = true, markers = "extra == \"excel\""}
|
|
@@ -353,13 +353,13 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-co
|
|
|
353
353
|
|
|
354
354
|
[[package]]
|
|
355
355
|
name = "pluggy"
|
|
356
|
-
version = "1.
|
|
356
|
+
version = "1.5.0"
|
|
357
357
|
description = "plugin and hook calling mechanisms for python"
|
|
358
358
|
optional = false
|
|
359
359
|
python-versions = ">=3.8"
|
|
360
360
|
files = [
|
|
361
|
-
{file = "pluggy-1.
|
|
362
|
-
{file = "pluggy-1.
|
|
361
|
+
{file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"},
|
|
362
|
+
{file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"},
|
|
363
363
|
]
|
|
364
364
|
|
|
365
365
|
[package.extras]
|
|
@@ -368,13 +368,13 @@ testing = ["pytest", "pytest-benchmark"]
|
|
|
368
368
|
|
|
369
369
|
[[package]]
|
|
370
370
|
name = "pre-commit"
|
|
371
|
-
version = "3.
|
|
371
|
+
version = "3.5.0"
|
|
372
372
|
description = "A framework for managing and maintaining multi-language pre-commit hooks."
|
|
373
373
|
optional = false
|
|
374
374
|
python-versions = ">=3.8"
|
|
375
375
|
files = [
|
|
376
|
-
{file = "pre_commit-3.
|
|
377
|
-
{file = "pre_commit-3.
|
|
376
|
+
{file = "pre_commit-3.5.0-py2.py3-none-any.whl", hash = "sha256:841dc9aef25daba9a0238cd27984041fa0467b4199fc4852e27950664919f660"},
|
|
377
|
+
{file = "pre_commit-3.5.0.tar.gz", hash = "sha256:5804465c675b659b0862f07907f96295d490822a450c4c40e747d0b1c6ebcb32"},
|
|
378
378
|
]
|
|
379
379
|
|
|
380
380
|
[package.dependencies]
|
|
@@ -386,13 +386,13 @@ virtualenv = ">=20.10.0"
|
|
|
386
386
|
|
|
387
387
|
[[package]]
|
|
388
388
|
name = "pytest"
|
|
389
|
-
version = "
|
|
389
|
+
version = "8.2.2"
|
|
390
390
|
description = "pytest: simple powerful testing with Python"
|
|
391
391
|
optional = false
|
|
392
|
-
python-versions = ">=3.
|
|
392
|
+
python-versions = ">=3.8"
|
|
393
393
|
files = [
|
|
394
|
-
{file = "pytest-
|
|
395
|
-
{file = "pytest-
|
|
394
|
+
{file = "pytest-8.2.2-py3-none-any.whl", hash = "sha256:c434598117762e2bd304e526244f67bf66bbd7b5d6cf22138be51ff661980343"},
|
|
395
|
+
{file = "pytest-8.2.2.tar.gz", hash = "sha256:de4bb8104e201939ccdc688b27a89a7be2079b22e2bd2b07f806b6ba71117977"},
|
|
396
396
|
]
|
|
397
397
|
|
|
398
398
|
[package.dependencies]
|
|
@@ -400,11 +400,11 @@ colorama = {version = "*", markers = "sys_platform == \"win32\""}
|
|
|
400
400
|
exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""}
|
|
401
401
|
iniconfig = "*"
|
|
402
402
|
packaging = "*"
|
|
403
|
-
pluggy = ">=
|
|
404
|
-
tomli = {version = ">=1
|
|
403
|
+
pluggy = ">=1.5,<2.0"
|
|
404
|
+
tomli = {version = ">=1", markers = "python_version < \"3.11\""}
|
|
405
405
|
|
|
406
406
|
[package.extras]
|
|
407
|
-
|
|
407
|
+
dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"]
|
|
408
408
|
|
|
409
409
|
[[package]]
|
|
410
410
|
name = "python-dateutil"
|
|
@@ -454,6 +454,7 @@ files = [
|
|
|
454
454
|
{file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"},
|
|
455
455
|
{file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"},
|
|
456
456
|
{file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"},
|
|
457
|
+
{file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"},
|
|
457
458
|
{file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"},
|
|
458
459
|
{file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"},
|
|
459
460
|
{file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"},
|
|
@@ -461,8 +462,16 @@ files = [
|
|
|
461
462
|
{file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"},
|
|
462
463
|
{file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"},
|
|
463
464
|
{file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"},
|
|
465
|
+
{file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"},
|
|
464
466
|
{file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"},
|
|
465
467
|
{file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"},
|
|
468
|
+
{file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"},
|
|
469
|
+
{file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"},
|
|
470
|
+
{file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"},
|
|
471
|
+
{file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"},
|
|
472
|
+
{file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"},
|
|
473
|
+
{file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"},
|
|
474
|
+
{file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"},
|
|
466
475
|
{file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"},
|
|
467
476
|
{file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"},
|
|
468
477
|
{file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"},
|
|
@@ -479,6 +488,7 @@ files = [
|
|
|
479
488
|
{file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"},
|
|
480
489
|
{file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"},
|
|
481
490
|
{file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"},
|
|
491
|
+
{file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"},
|
|
482
492
|
{file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"},
|
|
483
493
|
{file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"},
|
|
484
494
|
{file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"},
|
|
@@ -486,6 +496,7 @@ files = [
|
|
|
486
496
|
{file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"},
|
|
487
497
|
{file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"},
|
|
488
498
|
{file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"},
|
|
499
|
+
{file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"},
|
|
489
500
|
{file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"},
|
|
490
501
|
{file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"},
|
|
491
502
|
{file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"},
|
|
@@ -493,19 +504,18 @@ files = [
|
|
|
493
504
|
|
|
494
505
|
[[package]]
|
|
495
506
|
name = "setuptools"
|
|
496
|
-
version = "
|
|
507
|
+
version = "70.0.0"
|
|
497
508
|
description = "Easily download, build, install, upgrade, and uninstall Python packages"
|
|
498
509
|
optional = false
|
|
499
510
|
python-versions = ">=3.8"
|
|
500
511
|
files = [
|
|
501
|
-
{file = "setuptools-
|
|
502
|
-
{file = "setuptools-
|
|
512
|
+
{file = "setuptools-70.0.0-py3-none-any.whl", hash = "sha256:54faa7f2e8d2d11bcd2c07bed282eef1046b5c080d1c32add737d7b5817b1ad4"},
|
|
513
|
+
{file = "setuptools-70.0.0.tar.gz", hash = "sha256:f211a66637b8fa059bb28183da127d4e86396c991a942b028c6650d4319c3fd0"},
|
|
503
514
|
]
|
|
504
515
|
|
|
505
516
|
[package.extras]
|
|
506
|
-
docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5
|
|
507
|
-
testing = ["build[virtualenv]", "filelock (>=3.4.0)", "
|
|
508
|
-
testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"]
|
|
517
|
+
docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"]
|
|
518
|
+
testing = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"]
|
|
509
519
|
|
|
510
520
|
[[package]]
|
|
511
521
|
name = "six"
|
|
@@ -601,4 +611,4 @@ files = [
|
|
|
601
611
|
[metadata]
|
|
602
612
|
lock-version = "2.0"
|
|
603
613
|
python-versions = "^3.8"
|
|
604
|
-
content-hash = "
|
|
614
|
+
content-hash = "6a743170b0e824cbc3ae6621caab28fe2faf1ca774ab274028c15a5ad76e5f1b"
|
|
@@ -34,7 +34,7 @@ python-source = "python"
|
|
|
34
34
|
|
|
35
35
|
[tool.poetry]
|
|
36
36
|
name = "python-calamine"
|
|
37
|
-
version = "0.2.
|
|
37
|
+
version = "0.2.3"
|
|
38
38
|
description = ""
|
|
39
39
|
authors = ["Dmitriy <dimastbk@proton.me>"]
|
|
40
40
|
|
|
@@ -45,5 +45,5 @@ packaging = "^23.1"
|
|
|
45
45
|
[tool.poetry.group.dev.dependencies]
|
|
46
46
|
maturin = "^1.0.1"
|
|
47
47
|
pre-commit = "^3.0.1"
|
|
48
|
-
pytest = "^
|
|
48
|
+
pytest = "^8.0.0"
|
|
49
49
|
pandas = {version = "^2.0.0", extras = ["excel"]}
|
|
@@ -72,6 +72,22 @@ class CalamineSheet:
|
|
|
72
72
|
For suppress this behaviour, set `skip_empty_area` to `False`.
|
|
73
73
|
"""
|
|
74
74
|
|
|
75
|
+
def iter_rows(
|
|
76
|
+
self,
|
|
77
|
+
) -> typing.Iterator[
|
|
78
|
+
list[
|
|
79
|
+
int
|
|
80
|
+
| float
|
|
81
|
+
| str
|
|
82
|
+
| bool
|
|
83
|
+
| datetime.time
|
|
84
|
+
| datetime.date
|
|
85
|
+
| datetime.datetime
|
|
86
|
+
| datetime.timedelta
|
|
87
|
+
]
|
|
88
|
+
]:
|
|
89
|
+
"""Retunrning data from sheet as iterator of lists."""
|
|
90
|
+
|
|
75
91
|
@typing.final
|
|
76
92
|
class CalamineWorkbook:
|
|
77
93
|
path: str | None
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
use std::fmt::Display;
|
|
2
2
|
use std::sync::Arc;
|
|
3
3
|
|
|
4
|
-
use calamine::{Data, Range, SheetType, SheetVisible};
|
|
4
|
+
use calamine::{Data, Range, Rows, SheetType, SheetVisible};
|
|
5
5
|
use pyo3::class::basic::CompareOp;
|
|
6
6
|
use pyo3::prelude::*;
|
|
7
7
|
use pyo3::types::PyList;
|
|
@@ -196,4 +196,56 @@ impl CalamineSheet {
|
|
|
196
196
|
}),
|
|
197
197
|
))
|
|
198
198
|
}
|
|
199
|
+
|
|
200
|
+
fn iter_rows(&self) -> CalamineCellIterator {
|
|
201
|
+
CalamineCellIterator::from_range(Arc::clone(&self.range))
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
#[pyclass]
|
|
206
|
+
pub struct CalamineCellIterator {
|
|
207
|
+
position: u32,
|
|
208
|
+
start: (u32, u32),
|
|
209
|
+
empty_row: Vec<CellValue>,
|
|
210
|
+
iter: Rows<'static, Data>,
|
|
211
|
+
#[allow(dead_code)]
|
|
212
|
+
range: Arc<Range<Data>>,
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
impl CalamineCellIterator {
|
|
216
|
+
fn from_range(range: Arc<Range<Data>>) -> CalamineCellIterator {
|
|
217
|
+
let empty_row = (0..range.width())
|
|
218
|
+
.map(|_| CellValue::String("".to_string()))
|
|
219
|
+
.collect();
|
|
220
|
+
CalamineCellIterator {
|
|
221
|
+
empty_row,
|
|
222
|
+
position: 0,
|
|
223
|
+
start: range.start().unwrap(),
|
|
224
|
+
iter: unsafe {
|
|
225
|
+
std::mem::transmute::<
|
|
226
|
+
calamine::Rows<'_, calamine::Data>,
|
|
227
|
+
calamine::Rows<'static, calamine::Data>,
|
|
228
|
+
>(range.rows())
|
|
229
|
+
},
|
|
230
|
+
range,
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
#[pymethods]
|
|
236
|
+
impl CalamineCellIterator {
|
|
237
|
+
fn __iter__(slf: PyRef<'_, Self>) -> PyRef<'_, Self> {
|
|
238
|
+
slf
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
fn __next__(mut slf: PyRefMut<'_, Self>) -> Option<Bound<'_, PyList>> {
|
|
242
|
+
slf.position += 1;
|
|
243
|
+
if slf.position > slf.start.0 {
|
|
244
|
+
slf.iter.next().map(|row| {
|
|
245
|
+
PyList::new_bound(slf.py(), row.iter().map(<&Data as Into<CellValue>>::into))
|
|
246
|
+
})
|
|
247
|
+
} else {
|
|
248
|
+
Some(PyList::new_bound(slf.py(), slf.empty_row.clone()))
|
|
249
|
+
}
|
|
250
|
+
}
|
|
199
251
|
}
|
|
@@ -180,6 +180,30 @@ def test_xlsx_read():
|
|
|
180
180
|
assert [] == reader.get_sheet_by_index(1).to_python(skip_empty_area=False)
|
|
181
181
|
|
|
182
182
|
|
|
183
|
+
def test_xlsx_iter_rows():
|
|
184
|
+
names = ["Sheet1", "Sheet2", "Sheet3"]
|
|
185
|
+
data = [
|
|
186
|
+
["", "", "", "", "", "", "", "", "", ""],
|
|
187
|
+
[
|
|
188
|
+
"String",
|
|
189
|
+
1,
|
|
190
|
+
1.1,
|
|
191
|
+
True,
|
|
192
|
+
False,
|
|
193
|
+
date(2010, 10, 10),
|
|
194
|
+
datetime(2010, 10, 10, 10, 10, 10),
|
|
195
|
+
time(10, 10, 10),
|
|
196
|
+
timedelta(hours=10, minutes=10, seconds=10, microseconds=100000),
|
|
197
|
+
timedelta(hours=255, minutes=10, seconds=10),
|
|
198
|
+
],
|
|
199
|
+
]
|
|
200
|
+
|
|
201
|
+
reader = CalamineWorkbook.from_object(PATH / "base.xlsx")
|
|
202
|
+
|
|
203
|
+
assert names == reader.sheet_names
|
|
204
|
+
assert data == list(reader.get_sheet_by_index(0).iter_rows())
|
|
205
|
+
|
|
206
|
+
|
|
183
207
|
def test_nrows():
|
|
184
208
|
reader = CalamineWorkbook.from_object(PATH / "base.xlsx")
|
|
185
209
|
sheet = reader.get_sheet_by_name("Sheet3")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|