[WIP] Integrate weakly supervised NEON data #265
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python package | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
ci: | |
name: "CI setup" | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- "3.12" | |
- "3.11" | |
os: | |
- "ubuntu-latest" | |
runs-on: "${{ matrix.os }}" | |
# use bash everywhere | |
defaults: | |
run: | |
shell: "bash -l {0}" | |
steps: | |
- name: "Checkout code" | |
uses: "actions/checkout@v4" | |
- name: Install apt dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgeos-dev pandoc | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Python dependencies | |
run: | | |
uv sync --all-extras --dev | |
uv pip install nbqa | |
- name: Verify nbqa installation | |
run: uv run nbqa --version | |
- name: Run pytest for everything but test_polygons | |
run: uv run pytest -v --ignore-glob="*release*" | |
- name: Check style | |
run: uv run yapf -d --recursive src/milliontrees/ --style=.style.yapf | |
- name: Check notebook style | |
run: uv run nbqa yapf --in-place docs/examples/*.ipynb --style=.style.yapf | |
# - name: Check notebook build | |
# run: uv run pytest --nbmake docs/*.ipynb | |
- name: Run docformatter | |
run: uv run docformatter --check --wrap-summaries 100 --wrap-descriptions 100 --recursive src/milliontrees/ | |
- name: Test Docs | |
run: | | |
cd docs && make clean && make html SPHINXOPTS="-W" | |
- name: Test and check build artifacts | |
run: | | |
uv pip install build && uv run python -m build && uv run twine check dist/* |