Skip to content

Commit f4688ec

Browse files
committed
Merge branch 'issue-project-structure' into develop
2 parents 2f67316 + 936f58d commit f4688ec

File tree

305 files changed

+130
-229
lines changed

Some content is hidden

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

305 files changed

+130
-229
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
on:
22
push:
33
paths:
4-
- ".github/workflows/**"
5-
- "packages/basemap/**"
6-
- "packages/basemap_data/**"
7-
- "packages/basemap_data_hires/**"
4+
- "**"
85
pull_request:
96
paths:
10-
- ".github/workflows/**"
11-
- "packages/basemap/**"
12-
- "packages/basemap_data/**"
13-
- "packages/basemap_data_hires/**"
7+
- "**"
148
workflow_dispatch:
159

1610
jobs:
@@ -30,16 +24,16 @@ jobs:
3024

3125
- name: Build data sdist and wheel
3226
run: |
33-
cd packages/${{ matrix.package }}
27+
cd data/${{ matrix.package }}
3428
python -m pip install build wheel
3529
python -m build
3630
3731
- name: Upload data sdist and wheel
3832
uses: actions/upload-artifact@v4
3933
with:
4034
path: |
41-
packages/${{ matrix.package }}/dist/*.tar.gz
42-
packages/${{ matrix.package }}/dist/*.whl
35+
data/${{ matrix.package }}/dist/*.tar.gz
36+
data/${{ matrix.package }}/dist/*.whl
4337
name: dist-${{ matrix.package }}
4438

4539
build_sdist:
@@ -55,19 +49,18 @@ jobs:
5549

5650
- name: Build basemap sdist
5751
run: |
58-
cd packages/basemap
5952
python -m pip install build
6053
python -m build --sdist
6154
6255
- name: Upload basemap sdist
6356
uses: actions/upload-artifact@v4
6457
with:
65-
path: packages/basemap/dist/*.tar.gz
58+
path: dist/*.tar.gz
6659
name: dist-basemap-sdist
6760

6861
build_wheels:
6962
name: Build wheels
70-
needs: [build_data, build_sdist]
63+
needs: [build_sdist]
7164
strategy:
7265
matrix:
7366
os: [ubuntu-22.04, windows-2022, macos-13, macos-14]
@@ -133,8 +126,9 @@ jobs:
133126
CIBW_BUILD_VERBOSITY: 1
134127
CIBW_SKIP: "*-musllinux_*"
135128
CIBW_BEFORE_ALL: "python {project}/.github/workflows/run_before_all.py"
129+
CIBW_BEFORE_TEST: "python -m pip install {project}/data/basemap_data {project}/data/basemap_data_hires"
136130
CIBW_TEST_EXTRAS: "test"
137-
CIBW_TEST_COMMAND: "python -m pytest {project}/packages/basemap"
131+
CIBW_TEST_COMMAND: "python -m pytest {project}/test"
138132
CIBW_ENVIRONMENT: >-
139133
GEOS_VERSION="3.6.5"
140134
GEOS_DIR="$(pwd)/extern"
@@ -213,6 +207,9 @@ jobs:
213207
# Get Python version.
214208
IMPL=cp$(python -c "import sys; print('{0}{1}'.format(*sys.version_info[:2]))")
215209
210+
# Install data packages.
211+
python -m pip install ./data_packages/*.whl
212+
216213
# Install basemap wheel matching current Python version.
217214
WHEEL=$(find ./wheels -name "*-${IMPL}-${IMPL}*.whl" | head -1)
218215
if [ -n "${WHEEL}" ]; then
@@ -222,30 +219,25 @@ jobs:
222219
exit 1
223220
fi
224221
225-
# Install basemap data packages.
226-
python -m pip install ./data_packages/*.whl
227-
228222
- name: Install docs requirements
229223
run: |
230-
cd packages/basemap
231224
python -m pip install -r dep/requirements-doc.txt
232225
233226
- name: Run sphinx
234227
run: |
235-
cd packages/basemap
236-
python -m sphinx doc/source public
228+
python -m sphinx -j auto doc/source public
237229
238230
- name: Upload docs artifacts
239231
uses: actions/upload-artifact@v4
240232
with:
241233
name: docs
242-
path: packages/basemap/public
234+
path: public
243235

244236
- name: Upload github-pages artifact
245237
uses: actions/upload-pages-artifact@v3
246238
with:
247239
name: github-pages
248-
path: packages/basemap/public
240+
path: public
249241

250242
pages:
251243
name: Deploy docs
@@ -265,7 +257,7 @@ jobs:
265257

266258
upload:
267259
name: Upload packages
268-
needs: [build_data, build_sdist, build_wheels, check]
260+
needs: [check]
269261
runs-on: ubuntu-22.04
270262
environment: PyPI
271263
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')

.github/workflows/run_before_all.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
HERE = os.path.abspath(__file__)
88
ROOT = os.path.dirname(os.path.dirname(os.path.dirname(HERE)))
9-
sys.path.insert(0, os.path.join(ROOT, "packages", "basemap"))
9+
sys.path.insert(0, os.path.join(ROOT))
1010
import utils # noqa: E402 # pylint: disable=imports
1111

1212

.gitignore

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
build
33
dist
44
*.egg-info
5-
*.pyc
6-
*.pyd
5+
*.py[cod]
6+
*.dll
77
*.so
88

99
htmlcov
@@ -33,8 +33,7 @@ Thumbs.db
3333

3434
# Things specific to this project.
3535
*.pickle
36-
examples/*.png
37-
packages/basemap/doc/examples
38-
packages/basemap/doc/users/installing.rst
39-
packages/basemap/doc/_static/matplotlibrc
40-
packages/basemap/doc/_templates/gallery.html
36+
doc/build
37+
doc/examples/*.png
38+
doc/source/_static/matplotlibrc
39+
doc/source/_templates/gallery.html
File renamed without changes.

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
File renamed without changes.

packages/basemap/MANIFEST.in renamed to MANIFEST.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
include CHANGELOG.md
2+
include LICENSE
3+
include LICENSE.geos
4+
include README.md
15
include .pylintrc
26
include pyproject.toml
37
include dep/requirements*.txt
@@ -6,7 +10,9 @@ global-exclude *.py[cod]
610
global-exclude *.dll
711
global-exclude *.so
812

13+
recursive-exclude data *
914
recursive-include doc *
1015
recursive-exclude doc/build *
16+
recursive-exclude doc/examples *
1117
recursive-include test *
1218
recursive-include utils *.py

README.md

Lines changed: 56 additions & 88 deletions
File renamed without changes.
File renamed without changes.
File renamed without changes.

packages/basemap_data/README.md renamed to data/basemap_data/README.md

Lines changed: 4 additions & 4 deletions

packages/basemap_data/setup.py renamed to data/basemap_data/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def get_content(name, splitlines=False):
7373
"name":
7474
"basemap_data",
7575
"version":
76-
"2.0.0.dev0",
76+
"2.0.0",
7777
"description":
7878
"Data assets for matplotlib basemap",
7979
"long_description":
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)