Fix downsampled habitat layers on origin for consistency. #44
Workflow file for this run
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
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
| name: Python Pull Request CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| container: ghcr.io/osgeo/gdal:ubuntu-small-3.11.0 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10"] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install system dependencies | |
| run: | | |
| apt-get update -qqy | |
| apt-get install -y git python3-pip r-base libtirpc-dev | |
| - name: Install R dependencies | |
| run: R -e "install.packages(c('lme4', 'lmerTest', 'broom',), repos='https://cran.rstudio.com/')" || true | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install 'gdal[numpy]==3.11.0' | |
| python -m pip install -e .[dev,validation] | |
| - name: Lint with pylint | |
| run: python3 -m pylint . | |
| - name: Type checking | |
| run: python3 -m mypy . | |
| - name: Test with pytest | |
| run: python3 -m pytest --cov=aoh -vv | |
| - name: Test CLI tools | |
| run: | | |
| aoh-calc --help | |
| aoh-habitat-process --help | |
| aoh-species-richness --help | |
| aoh-endemism --help | |
| aoh-collate-data --help | |
| aoh-validate-prevalence --help | |
| aoh-validate-occurences --help | |
| aoh-fetch-gbif-data --help | |
| - name: Test package imports | |
| run: | | |
| python3 -c "import aoh; print('✅ Package imports work')" | |
| python3 -c "from aoh import tidy_data; print('✅ Core functions work')" | |
| python3 -c "from aoh.summaries import species_richness; print('✅ Summaries work')" | |
| python3 -c "from aoh.validation import collate_data; print('✅ Validation works')" | |
| - name: Build pip package | |
| run: python3 -m build | |
| - name: Check with twine | |
| run: twine check dist/* |