fix: automatically override num_workers=0 for TiledRaster prediction … #786
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
| name: Continuous integration tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| ci: | |
| name: "CI setup" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - "3.12" | |
| - "3.11" | |
| - "3.10" | |
| os: | |
| - "ubuntu-latest" | |
| runs-on: "${{ matrix.os }}" | |
| # use bash everywhere | |
| defaults: | |
| run: | |
| shell: "bash -l {0}" | |
| steps: | |
| - name: "Checkout code" | |
| uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" | |
| with: | |
| fetch-depth: 0 | |
| - name: Install opencv dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgl1 and libglx-mesa0 | |
| - name: Install ipynb dependencies (pandoc) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pandoc | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set up Python | |
| run: uv python install | |
| - name: Install package | |
| run: uv sync --all-extras --dev | |
| - name: Run pre-commit (diff vs origin/main) | |
| run: | | |
| git fetch origin main --prune | |
| uv run pre-commit run --from-ref origin/main --to-ref HEAD | |
| - name: Run pytest with coverage | |
| run: uv run pytest -v --cov=src/deepforest --cov-report=xml --cov-report=term-missing -o tmp_path_retention=none tests/ | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de | |
| with: | |
| file: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| - name: Check predict script | |
| run: uv run deepforest predict src/deepforest/data/OSBS_029.png | |
| - name: Check train script | |
| run: uv run deepforest train train.csv_file=src/deepforest/data/OSBS_029.csv train.root_dir=src/deepforest/data train.fast_dev_run=True | |
| - name: Test Docs | |
| run: | | |
| cd docs && uv run make clean && uv run 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/* |