Skip to content

Commit 326a6d2

Browse files
authored
Merge pull request #1 from GeoStat-Framework/create_cy_backend
Create cython backend
2 parents 42a8bcd + 61e5d60 commit 326a6d2

File tree

200 files changed

+1111
-23279
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+1111
-23279
lines changed

.github/workflows/main.yml

+63-34
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,15 @@ jobs:
2222
with:
2323
fetch-depth: "0"
2424

25-
- name: Set up Python 3.9
25+
- name: Set up Python 3.11
2626
uses: actions/setup-python@v5
2727
with:
28-
python-version: 3.9
28+
python-version: 3.11
2929

3030
- name: Install dependencies
3131
run: |
3232
python -m pip install --upgrade pip
3333
pip install -v --editable '.[lint,test]'
34-
pip install "coveralls>=3.0.0"
3534
3635
- name: black check
3736
run: |
@@ -47,18 +46,11 @@ jobs:
4746
4847
- name: pylint check
4948
run: |
50-
python -m pylint --max-positional-arguments 20 src/gstools/
49+
python -m pylint src/gstools_cython/
5150
5251
- name: cython-lint check
5352
run: |
54-
cython-lint src/gstools/
55-
56-
- name: coveralls check
57-
run: |
58-
python -m pytest --cov gstools --cov-report term-missing -v tests/
59-
python -m coveralls --service=github
60-
env:
61-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
cython-lint src/gstools_cython/
6254
6355
build_wheels:
6456
name: wheels for ${{ matrix.os }}
@@ -75,36 +67,38 @@ jobs:
7567
fetch-depth: "0"
7668

7769
- name: Build wheels
78-
uses: pypa/cibuildwheel@v2.18.0
70+
uses: pypa/cibuildwheel@v2.22.0
7971
with:
80-
output-dir: dist
72+
output-dir: dist-wheel-${{ matrix.os }}
8173

82-
- uses: actions/upload-artifact@v3
74+
- uses: actions/upload-artifact@v4
8375
with:
84-
path: ./dist/*.whl
76+
name: dist-wheel-${{ matrix.os }}
77+
path: ./dist-wheel-${{ matrix.os }}/*.whl
8578

8679
build_sdist:
87-
name: sdist on ${{ matrix.os }} with py ${{ matrix.ver.py }} numpy${{ matrix.ver.np }} scipy${{ matrix.ver.sp }}
80+
name: sdist on ${{ matrix.os }} with py ${{ matrix.ver.py }} numpy${{ matrix.ver.np }}
8881
runs-on: ${{ matrix.os }}
8982
strategy:
9083
fail-fast: false
9184
matrix:
9285
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
9386
# https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg
9487
ver:
95-
- { py: "3.8", np: "==1.20.0", sp: "==1.5.4" }
96-
- { py: "3.9", np: "==1.20.0", sp: "==1.5.4" }
97-
- { py: "3.10", np: "==1.21.6", sp: "==1.7.2" }
98-
- { py: "3.11", np: "==1.23.2", sp: "==1.9.2" }
99-
- { py: "3.12", np: "==1.26.2", sp: "==1.11.2" }
100-
- { py: "3.12", np: ">=2.0.0rc1", sp: ">=1.13.0" }
88+
- { py: "3.8", np: "==1.20.0" }
89+
- { py: "3.9", np: "==1.20.0" }
90+
- { py: "3.10", np: "==1.21.6" }
91+
- { py: "3.11", np: "==1.23.2" }
92+
- { py: "3.12", np: "==1.26.2" }
93+
- { py: "3.13", np: "==2.1.0" }
94+
- { py: "3.13", np: ">=2.1.0" }
10195
exclude:
10296
- os: macos-14
103-
ver: { py: "3.8", np: "==1.20.0", sp: "==1.5.4" }
97+
ver: { py: "3.8", np: "==1.20.0" }
10498
- os: macos-14
105-
ver: { py: "3.9", np: "==1.20.0", sp: "==1.5.4" }
99+
ver: { py: "3.9", np: "==1.20.0" }
106100
- os: macos-14
107-
ver: { py: "3.10", np: "==1.21.6", sp: "==1.7.2" }
101+
ver: { py: "3.10", np: "==1.21.6" }
108102
steps:
109103
- uses: actions/checkout@v4
110104
with:
@@ -120,35 +114,70 @@ jobs:
120114
python -m pip install --upgrade pip
121115
pip install build
122116
123-
- name: Install GSTools
117+
- name: Install GSTools-Cython
124118
env:
125119
GSTOOLS_BUILD_PARALLEL: 1
126120
run: |
127121
pip install -v --editable .[test]
128122
129123
- name: Run tests
130124
run: |
131-
pip install "numpy${{ matrix.ver.np }}" "scipy${{ matrix.ver.sp }}"
125+
pip install "numpy${{ matrix.ver.np }}"
132126
python -m pytest -v tests/
133127
134128
- name: Build sdist
135129
run: |
136130
# PEP 517 package builder from pypa
137-
python -m build --sdist --outdir dist .
131+
python -m build --sdist --outdir dist-sdist .
132+
133+
- uses: actions/upload-artifact@v4
134+
if: matrix.os == 'ubuntu-latest' && matrix.ver.py == '3.11'
135+
with:
136+
name: dist-sdist
137+
path: dist-sdist/*.tar.gz
138138

139-
- uses: actions/upload-artifact@v3
140-
if: matrix.os == 'ubuntu-latest' && matrix.ver.py == '3.9'
139+
coverage:
140+
name: coverage
141+
runs-on: ubuntu-latest
142+
143+
steps:
144+
- uses: actions/checkout@v4
145+
with:
146+
fetch-depth: '0'
147+
148+
- name: Set up Python 3.11
149+
uses: actions/setup-python@v5
141150
with:
142-
path: dist/*.tar.gz
151+
python-version: 3.11
152+
153+
- name: Install dependencies
154+
run: |
155+
python -m pip install --upgrade pip
156+
pip install "coveralls>=3.0.0"
157+
158+
- name: Install GSTools-Cython
159+
env:
160+
GSTOOLS_CY_COV: 1
161+
run: |
162+
pip install -v --editable .[test]
163+
164+
- name: Run tests
165+
env:
166+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
167+
run: |
168+
pip install "numpy${{ matrix.ver.np }}"
169+
python -m pytest --cov gstools_cython --cov-report term-missing -v tests/
170+
python -m coveralls --service=github
143171
144172
upload_to_pypi:
145173
needs: [build_wheels, build_sdist]
146174
runs-on: ubuntu-latest
147175

148176
steps:
149-
- uses: actions/download-artifact@v3
177+
- uses: actions/download-artifact@v4
150178
with:
151-
name: artifact
179+
pattern: dist-*
180+
merge-multiple: true
152181
path: dist
153182

154183
- name: Publish to Test PyPI

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ info/
112112
*.cpp
113113

114114
# generated version file
115-
src/gstools/_version.py
115+
src/gstools_cython/_version.py
116116

117117
# generated docs
118118
docs/source/examples/

.zenodo.json

-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
{
22
"license": "LGPL-3.0-or-later",
33
"contributors": [
4-
{
5-
"type": "Other",
6-
"name": "Bane Sullivan"
7-
},
84
{
95
"orcid": "0000-0002-2547-8102",
106
"affiliation": "Helmholtz Centre for Environmental Research - UFZ",

AUTHORS.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# GSTools
1+
# Authors
22

3-
GSTools is available on [GitHub](https://github.com/GeoStat-Framework/GSTools)
3+
GSTools-Cython is available on [GitHub](https://github.com/GeoStat-Framework/GSTools-Cython)
44
and was created by following people.
55

66

7-
## Main Authors
7+
## Core developers
88

99
- Sebastian Müller, GitHub: [@MuellerSeb](https://github.com/MuellerSeb), Email: <[email protected]>
1010
- Lennart Schüler, GitHub: [@LSchueler](https://github.com/LSchueler), Email: <[email protected]>
@@ -14,4 +14,4 @@ and was created by following people.
1414

1515
- Falk Heße, GitHub: [@fhesze](https://github.com/fhesze), Email: <[email protected]>
1616
- Bane Sullivan, GitHub: [@banesullivan](https://github.com/banesullivan)
17-
- Tobias Glaubach, GitHub: [@TobiasGlaubach](https://github.com/TobiasGlaubach)
17+
- Tobias Glaubach, GitHub: [@TobiasGlaubach](https://github.com/TobiasGlaubach)

0 commit comments

Comments
 (0)