Bump the python-packages group with 6 updates #138
Workflow file for this run
This file contains 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: Run linting, type check and unit tests | |
on: | |
pull_request: | |
jobs: | |
linting_and_tests: | |
name: Linting, Type Check and Tests | python=${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # to fetch all history for all branches and tags; required because we derive app version from latest tag | |
fetch-tags: true | |
- name: Setup conda | |
uses: s-weigand/setup-conda@v1 | |
with: | |
update-conda: true | |
python-version: ${{ matrix.python-version }} | |
conda-channels: anaconda, conda-forge | |
- name: Conda install dependencies | |
run: conda install -c conda-forge pyproj==3.6.0 | |
- name: Install dependencies | |
run: | | |
python${{ matrix.python-version }} -m pip install --upgrade pip | |
python${{ matrix.python-version }} -m pip install --force-reinstall -e ".[dev]" | |
- name: Download NL correction grids and nsgi proj db | |
run: | | |
proj_data_dir=$(python3 -c 'import pyproj;print(pyproj.datadir.get_data_dir());') | |
curl -sL -o "${proj_data_dir}/nl_nsgi_nlgeo2018.tif" https://cdn.proj.org/nl_nsgi_nlgeo2018.tif && \ | |
curl -sL -o "${proj_data_dir}/nl_nsgi_rdcorr2018.tif" https://cdn.proj.org/nl_nsgi_rdcorr2018.tif && \ | |
curl -sL -o "${proj_data_dir}/nl_nsgi_rdtrans2018.tif" https://cdn.proj.org/nl_nsgi_rdtrans2018.tif && \ | |
curl -sL -H "Accept: application/octet-stream" $(curl -s "https://api.github.com/repos/GeodetischeInfrastructuur/transformations/releases/latest" | jq -r '.assets[] | select(.name=="proj.time.dependent.transformations.db").url') -o "${proj_data_dir}/proj.db" | |
- name: Lint with black | |
run: | | |
python${{ matrix.python-version }} -m black --check . | |
- name: Lint with ruff | |
run: | | |
python${{ matrix.python-version }} -m ruff -v . | |
- name: Run Mypy | |
run: | | |
python${{ matrix.python-version }} -m mypy src/ | |
- name: Test with pytest and generate coverage report | |
run: | | |
python${{ matrix.python-version }} -m coverage run --source=src/coordinate_transformation_api -m pytest -v tests |