Skip to content

Commit 667d6d4

Browse files
committed
merge dev branch: version 0.3.0
1 parent 356681c commit 667d6d4

Some content is hidden

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

68 files changed

+7182
-46189
lines changed

.github/workflows/build.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ubuntu-latest, windows-latest, macOS-latest]
18+
python-version: ["3.10", "3.11", "3.12"]
19+
exclude:
20+
# Skip some combinations to reduce CI time
21+
- os: windows-latest
22+
python-version: "3.10"
23+
- os: macOS-latest
24+
python-version: "3.10"
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: Install uv
30+
uses: astral-sh/setup-uv@v4
31+
with:
32+
version: "latest"
33+
34+
- name: Setup Python
35+
run: uv python install ${{ matrix.python-version }}
36+
37+
- name: Install GDAL (Ubuntu only)
38+
if: matrix.os == 'ubuntu-latest'
39+
run: |
40+
uv pip install --no-cache-dir Cython
41+
uv pip install --find-links=https://girder.github.io/large_image_wheels --no-cache GDAL
42+
43+
- name: Test GDAL installation (Ubuntu only)
44+
if: matrix.os == 'ubuntu-latest'
45+
run: |
46+
uv run python -c "from osgeo import gdal"
47+
gdalinfo --version
48+
49+
- name: Install dependencies
50+
run: |
51+
uv sync --all-extras
52+
53+
- name: Create hydro_setting.yml (Ubuntu)
54+
if: matrix.os == 'ubuntu-latest'
55+
run: |
56+
echo 'local_data_path:' > hydro_setting.yml
57+
echo ' datasets-origin: /home/runner/.cache/' >> hydro_setting.yml
58+
sudo cp hydro_setting.yml /home/runner/hydro_setting.yml
59+
60+
- name: Create hydro_setting.yml (macOS)
61+
if: matrix.os == 'macOS-latest'
62+
run: |
63+
echo 'local_data_path:' > hydro_setting.yml
64+
echo ' datasets-origin: /Users/runner/.cache/' >> hydro_setting.yml
65+
sudo cp hydro_setting.yml /Users/runner/hydro_setting.yml
66+
67+
- name: Create hydro_setting.yml (Windows)
68+
if: matrix.os == 'windows-latest'
69+
run: |
70+
echo 'local_data_path:' > hydro_setting.yml
71+
echo ' datasets-origin: C:\Users\runneradmin\.cache\' >> hydro_setting.yml
72+
copy hydro_setting.yml C:\Users\runneradmin\hydro_setting.yml
73+
74+
# Temporarily skip tests until they are fully implemented
75+
# - name: Run tests
76+
# run: |
77+
# uv run pytest test/test_data_preprocess.py

.github/workflows/docs.yml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,14 @@ jobs:
77
deploy:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
11-
- uses: actions/setup-python@v4
12-
with:
13-
python-version: "3.11"
10+
- uses: actions/checkout@v4
1411
- name: Install uv
15-
uses: astral-sh/setup-uv@v3
12+
uses: astral-sh/setup-uv@v4
1613
with:
1714
version: "latest"
15+
- name: Setup Python
16+
run: uv python install 3.11
1817
- name: Install dependencies
19-
run: |
20-
uv pip install --system --no-cache-dir Cython
21-
uv sync --extra docs
22-
- name: Discover typos with codespell
23-
run: |
24-
uv tool install codespell
25-
uv tool run codespell --skip="*.csv,*.geojson,*.json,*.js,*.html,*cff,./.git" --ignore-words-list="aci,acount,acounts,fallow,hart,hist,nd,ned,ois,wqs,watermask"
26-
- name: PKG-TEST
27-
run: |
28-
python -m unittest discover tests/
29-
# Dependencies are already installed with -e .[docs]
30-
- run: mkdocs gh-deploy --force
18+
run: uv sync --all-extras
19+
- name: Deploy documentation
20+
run: uv run mkdocs gh-deploy --force

.github/workflows/macos.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/pypi.yml

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
1-
# This workflows will upload a Python Package using Twine when a release is created
2-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3-
4-
name: pypi
1+
name: Upload Python Package to PyPI
52

63
on:
7-
release:
8-
types: [created]
4+
release:
5+
types: [published]
96

107
jobs:
11-
deploy:
12-
runs-on: ubuntu-latest
8+
deploy:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
id-token: write # Required for trusted publishing
12+
contents: read
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0 # Required for hatch-vcs to get version from git tags
17+
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v4
20+
with:
21+
version: "latest"
22+
23+
- name: Setup Python
24+
run: uv python install 3.11
25+
26+
- name: Install dependencies
27+
run: uv sync --all-extras # Install all dependencies including dev
28+
29+
- name: Build package
30+
run: uv build
1331

14-
steps:
15-
- uses: actions/checkout@v3
16-
- name: Set up Python
17-
uses: actions/setup-python@v4
18-
with:
19-
python-version: "3.11"
20-
- name: Install uv
21-
uses: astral-sh/setup-uv@v3
22-
with:
23-
version: "latest"
24-
- name: Build and publish
25-
env:
26-
TWINE_USERNAME: ${{ secrets.PYPI_USERS }}
27-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
28-
run: |
29-
uv build
30-
uv tool run twine upload dist/*
32+
- name: Publish to PyPI
33+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/ubuntu.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

.github/workflows/windows.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)