Update LCFS, WAS, and ETB prerequisites #871
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 is used to check various parts of the | |
| # run prior to merging: | |
| # - The code's formatting | |
| # - Versioning - note that this checks, but does not update | |
| # - That the code builds successfully | |
| # - That any automated tests pass | |
| name: Pull request | |
| on: | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| name: Lint | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.13 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install "ruff>=0.9.0" | |
| - name: Check formatting | |
| run: ruff format --check . | |
| bundle-release-manifest-contract: | |
| name: Validate bundle release manifest contract | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.14 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.1.0 | |
| - name: Install package | |
| run: uv pip install --system . | |
| - name: Install bundle validation tooling | |
| # Pin the test-only bundle contract dependency until policyengine-bundles | |
| # has published releases suitable for ordinary dependency specifiers. | |
| run: uv pip install --system pytest "policyengine-bundles @ git+https://github.com/PolicyEngine/policyengine-bundles@8ae9f56fefcf89f69b8a7e3bc49928509c6207be" | |
| - name: Validate release manifest contract | |
| run: python -m pytest policyengine_uk_data/tests/test_release_manifest.py::test_build_release_manifest_validates_against_bundle_contract | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| env: | |
| HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} | |
| PYTHONUNBUFFERED: "1" | |
| PE_UK_DATA_OA_CLONES: "1" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # Fetch all history for all tags and branches | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.1.0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.13 | |
| - name: Install package | |
| run: uv pip install -e ".[dev]" --system | |
| - name: Download data inputs | |
| run: make download | |
| env: | |
| HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} | |
| - name: Build datasets | |
| run: make data | |
| env: | |
| TESTING: "1" | |
| - name: Save calibration log (constituencies) | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: constituency_calibration_log.csv | |
| path: constituency_calibration_log.csv | |
| - name: Save calibration log (local authorities) | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: la_calibration_log.csv | |
| path: la_calibration_log.csv | |
| - name: Run tests | |
| run: make test |