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