python-calamine 0.2.2__tar.gz → 0.3.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.
Files changed (46) hide show
  1. python_calamine-0.3.0/.github/workflows/CI.yml +275 -0
  2. {python_calamine-0.2.2 → python_calamine-0.3.0}/Cargo.lock +144 -155
  3. {python_calamine-0.2.2 → python_calamine-0.3.0}/Cargo.toml +5 -5
  4. {python_calamine-0.2.2 → python_calamine-0.3.0}/PKG-INFO +2 -1
  5. python_calamine-0.3.0/poetry.lock +552 -0
  6. {python_calamine-0.2.2 → python_calamine-0.3.0}/pyproject.toml +5 -6
  7. {python_calamine-0.2.2 → python_calamine-0.3.0}/python/python_calamine/__init__.py +2 -0
  8. {python_calamine-0.2.2 → python_calamine-0.3.0}/python/python_calamine/_python_calamine.pyi +77 -26
  9. python_calamine-0.3.0/renovate.json +6 -0
  10. {python_calamine-0.2.2 → python_calamine-0.3.0}/src/lib.rs +3 -2
  11. {python_calamine-0.2.2 → python_calamine-0.3.0}/src/types/cell.rs +1 -1
  12. python_calamine-0.2.2/src/types/mod.rs → python_calamine-0.3.0/src/types/errors.rs +7 -6
  13. python_calamine-0.3.0/src/types/mod.rs +10 -0
  14. {python_calamine-0.2.2 → python_calamine-0.3.0}/src/types/sheet.rs +53 -1
  15. {python_calamine-0.2.2 → python_calamine-0.3.0}/src/types/workbook.rs +42 -6
  16. python_calamine-0.3.0/src/utils.rs +55 -0
  17. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/test_base.py +47 -1
  18. python_calamine-0.2.2/.github/workflows/CI.yml +0 -272
  19. python_calamine-0.2.2/poetry.lock +0 -604
  20. python_calamine-0.2.2/src/utils.rs +0 -46
  21. {python_calamine-0.2.2 → python_calamine-0.3.0}/.gitignore +0 -0
  22. {python_calamine-0.2.2 → python_calamine-0.3.0}/.pre-commit-config.yaml +0 -0
  23. {python_calamine-0.2.2 → python_calamine-0.3.0}/LICENSE +0 -0
  24. {python_calamine-0.2.2 → python_calamine-0.3.0}/README.md +0 -0
  25. {python_calamine-0.2.2 → python_calamine-0.3.0}/build.rs +0 -0
  26. {python_calamine-0.2.2 → python_calamine-0.3.0}/python/python_calamine/pandas.py +0 -0
  27. {python_calamine-0.2.2 → python_calamine-0.3.0}/python/python_calamine/py.typed +0 -0
  28. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/__init__.py +0 -0
  29. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/conftest.py +0 -0
  30. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/data/any_sheets.ods +0 -0
  31. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/data/any_sheets.xls +0 -0
  32. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/data/any_sheets.xlsb +0 -0
  33. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/data/any_sheets.xlsx +0 -0
  34. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/data/base.ods +0 -0
  35. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/data/base.xls +0 -0
  36. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/data/base.xlsb +0 -0
  37. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/data/base.xlsx +0 -0
  38. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/data/empty_file.ods +0 -0
  39. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/data/empty_file.xlsb +0 -0
  40. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/data/empty_file.xlsx +0 -0
  41. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/data/password.ods +0 -0
  42. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/data/password.xls +0 -0
  43. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/data/password.xlsb +0 -0
  44. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/data/password.xlsx +0 -0
  45. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/test_pandas.py +0 -0
  46. {python_calamine-0.2.2 → python_calamine-0.3.0}/tests/test_sheet_type.py +0 -0
@@ -0,0 +1,275 @@
1
+ # some code from https://github.com/pydantic/pydantic-core/blob/d6e7890b36ef21cb28180a7f5b1479da2319012d/.github/workflows/ci.yml
2
+ # MIT License, see author list by link
3
+
4
+ name: CI
5
+
6
+ on:
7
+ push:
8
+ branches:
9
+ - main
10
+ tags:
11
+ - "**"
12
+ pull_request: {}
13
+
14
+ jobs:
15
+ test:
16
+ name: test ${{ matrix.python-version }} pandas ${{ matrix.pandas-version }} ${{ matrix.disable-gil && 'free-threaded' || '' }}
17
+ strategy:
18
+ fail-fast: false
19
+ matrix:
20
+ python-version:
21
+ - "3.9"
22
+ - "3.10"
23
+ - "3.11"
24
+ - "3.12"
25
+ pandas-version:
26
+ - "2.1.*"
27
+ - "2.2.*"
28
+ include:
29
+ - python-version: "3.8"
30
+ pandas-version: "none"
31
+ # https://github.com/pandas-dev/pandas/issues/42509
32
+ - python-version: "pypy3.8"
33
+ pandas-version: "none"
34
+ # https://github.com/pandas-dev/pandas/issues/42509
35
+ - python-version: "pypy3.9"
36
+ pandas-version: "none"
37
+ # https://github.com/pandas-dev/pandas/issues/42509
38
+ - python-version: "pypy3.10"
39
+ pandas-version: "none"
40
+ - python-version: "3.13"
41
+ pandas-version: "2.2.*"
42
+ # https://github.com/pandas-dev/pandas/issues/60016
43
+ - python-version: "3.13"
44
+ pandas-version: "none"
45
+ disable-gil: true
46
+
47
+ runs-on: ubuntu-latest
48
+
49
+ env:
50
+ PYTHON: ${{ matrix.python-version }}
51
+
52
+ steps:
53
+ - uses: actions/checkout@v4
54
+
55
+ - name: install rust stable
56
+ uses: dtolnay/rust-toolchain@master
57
+ with:
58
+ toolchain: stable
59
+
60
+ - id: cache-rust
61
+ name: cache rust
62
+ uses: Swatinem/rust-cache@v2
63
+ with:
64
+ key: v3
65
+
66
+ - name: set up python
67
+ uses: actions/setup-python@v5
68
+ if: "${{ !matrix.disable-gil }}"
69
+ with:
70
+ python-version: ${{ matrix.python-version }}
71
+ allow-prereleases: true
72
+
73
+ - name: set up python (free-threaded)
74
+ uses: deadsnakes/action@v3.2.0
75
+ if: "${{ matrix.disable-gil }}"
76
+ with:
77
+ python-version: ${{ matrix.python-version }}
78
+ nogil: ${{ matrix.disable-gil }}
79
+
80
+ - id: cache-py
81
+ name: cache python
82
+ uses: actions/cache@v4
83
+ if: "${{ !matrix.disable-gil }}"
84
+ with:
85
+ path: ${{ env.pythonLocation }}
86
+ key: >
87
+ py
88
+ ${{ runner.os }}
89
+ ${{ env.pythonLocation }}
90
+
91
+ - run: |
92
+ if [ ${{ matrix.pandas-version }} == 'none' ]; then
93
+ pip install pytest
94
+ else
95
+ pip install pytest pandas[excel]==${{ matrix.pandas-version }}
96
+ fi
97
+ if: steps.cache-py.outputs.cache-hit != 'true'
98
+
99
+ - run: pip install -e .
100
+ env:
101
+ RUST_BACKTRACE: 1
102
+
103
+ - run: pip freeze
104
+
105
+ - if: "${{ matrix.disable-gil }}"
106
+ continue-on-error: true
107
+ run: pytest
108
+
109
+ - if: "${{ !matrix.disable-gil }}"
110
+ continue-on-error: false
111
+ run: pytest
112
+
113
+ lint:
114
+ runs-on: ubuntu-latest
115
+
116
+ steps:
117
+ - uses: actions/checkout@v4
118
+
119
+ - name: install rust stable
120
+ uses: dtolnay/rust-toolchain@stable
121
+ with:
122
+ components: rustfmt, clippy
123
+
124
+ - name: cache rust
125
+ uses: Swatinem/rust-cache@v2
126
+
127
+ - uses: actions/setup-python@v5
128
+ with:
129
+ python-version: "3.11"
130
+
131
+ - uses: actions/cache@v4
132
+ id: cache-py
133
+ name: cache python
134
+ with:
135
+ path: ${{ env.pythonLocation }}
136
+ key: >
137
+ py
138
+ ${{ env.pythonLocation }}
139
+
140
+ - run: pip install pre-commit
141
+ if: steps.cache-py.outputs.cache-hit != 'true'
142
+
143
+ - run: pip install .
144
+ if: steps.cache-py.outputs.cache-hit != 'true'
145
+
146
+ - run: pip freeze
147
+
148
+ - run: pre-commit run --all-files
149
+
150
+ # https://github.com/marketplace/actions/alls-green#why used for branch protection checks
151
+ check:
152
+ if: always()
153
+ needs: [test, lint]
154
+ runs-on: ubuntu-latest
155
+ steps:
156
+ - name: Decide whether the needed jobs succeeded or failed
157
+ uses: re-actors/alls-green@release/v1
158
+ with:
159
+ jobs: ${{ toJSON(needs) }}
160
+
161
+ build:
162
+ name: build on ${{ matrix.platform || matrix.os }} (${{ matrix.target }} - ${{ matrix.manylinux || 'auto' }})
163
+ if: success()
164
+ strategy:
165
+ fail-fast: false
166
+ matrix:
167
+ os: [ubuntu, macos, windows]
168
+ target: [x86_64, aarch64]
169
+ manylinux: [auto]
170
+ include:
171
+ - os: ubuntu
172
+ platform: linux
173
+ - os: windows
174
+ ls: dir
175
+ - os: windows
176
+ ls: dir
177
+ target: i686
178
+ python-architecture: x86
179
+ interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
180
+ - os: windows
181
+ ls: dir
182
+ target: aarch64
183
+ interpreter: 3.11 3.12 3.13
184
+ - os: ubuntu
185
+ platform: linux
186
+ target: i686
187
+ - os: ubuntu
188
+ platform: linux
189
+ target: aarch64
190
+ - os: ubuntu
191
+ platform: linux
192
+ target: armv7
193
+ interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
194
+ # musllinux
195
+ - os: ubuntu
196
+ platform: linux
197
+ target: x86_64
198
+ manylinux: musllinux_1_1
199
+ - os: ubuntu
200
+ platform: linux
201
+ target: aarch64
202
+ manylinux: musllinux_1_1
203
+ - os: ubuntu
204
+ platform: linux
205
+ target: ppc64le
206
+ interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
207
+ - os: ubuntu
208
+ platform: linux
209
+ target: s390x
210
+ interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
211
+ exclude:
212
+ # Windows on arm64 only supports Python 3.11+
213
+ - os: windows
214
+ target: aarch64
215
+
216
+ runs-on: ${{ matrix.os }}-latest
217
+ steps:
218
+ - uses: actions/checkout@v4
219
+
220
+ - name: set up python
221
+ uses: actions/setup-python@v5
222
+ with:
223
+ python-version: "3.11"
224
+ architecture: ${{ matrix.python-architecture || 'x64' }}
225
+
226
+ - run: pip install -U twine
227
+
228
+ - name: build sdist
229
+ if: ${{ matrix.os == 'ubuntu' && matrix.target == 'x86_64' && matrix.manylinux == 'auto' }}
230
+ uses: PyO3/maturin-action@v1
231
+ with:
232
+ command: sdist
233
+ args: --out dist
234
+ rust-toolchain: stable
235
+
236
+ - name: build wheels
237
+ uses: PyO3/maturin-action@v1
238
+ with:
239
+ target: ${{ matrix.target }}
240
+ manylinux: ${{ matrix.manylinux || 'auto' }}
241
+ args: --release --out dist --interpreter ${{ matrix.interpreter || '3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10' }}
242
+ rust-toolchain: stable
243
+
244
+ - run: ${{ matrix.ls || 'ls -lh' }} dist/
245
+
246
+ - run: twine check --strict dist/*
247
+
248
+ - uses: actions/upload-artifact@v4
249
+ with:
250
+ name: wheels-${{ matrix.platform || matrix.os }}-${{ matrix.target }}-${{ matrix.manylinux || 'auto' }}
251
+ path: dist
252
+
253
+ release:
254
+ needs: [build, check]
255
+ if: success() && startsWith(github.ref, 'refs/tags/')
256
+
257
+ runs-on: ubuntu-latest
258
+
259
+ environment:
260
+ name: release
261
+ url: https://pypi.org/p/python-calamine/
262
+
263
+ permissions:
264
+ id-token: write
265
+
266
+ steps:
267
+ - name: Download All Artifacts
268
+ uses: actions/download-artifact@v4
269
+ with:
270
+ path: dist
271
+ pattern: wheels-*
272
+ merge-multiple: true
273
+
274
+ - name: Publish package distributions to PyPI
275
+ uses: pypa/gh-action-pypi-publish@release/v1