Harden the two-axis analysis: uncertainty, spatial-robust SEs, tests, CI #1
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: CI | ||
| on: | ||
| push: | ||
| pull_request: | ||
| jobs: | ||
| lint-type-test: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| # The data layer is not downloaded in CI; tests use synthetic frames only. | ||
| # A placeholder keeps urban_energy.paths importable (it requires the var). | ||
| URBAN_ENERGY_DATA_DIR: ${{ runner.temp }}/urban-energy-data | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v6 | ||
| with: | ||
| # cityseer has no wheel for Python 3.14 yet, so the project pins <3.14. | ||
| python-version: "3.13" | ||
| enable-cache: true | ||
| - name: Install dependencies | ||
| run: uv sync | ||
| - name: Ruff lint | ||
| run: uv run ruff check . | ||
| - name: Ruff format check | ||
| run: uv run ruff format --check . | ||
| - name: Type check (ty) | ||
| # Non-blocking. ty reports a single known pandas-stubs false positive (the | ||
| # Series.sort_values overload in data/download_fsa.py) and nothing else; the | ||
| # check runs for visibility but does not gate the build because that one | ||
| # diagnostic cannot be suppressed without a stub fix. Gate it once the stub | ||
| # is fixed upstream. | ||
| run: uv run ty check | ||
| continue-on-error: true | ||
| - name: Tests | ||
| run: uv run pytest | ||