fix: ensure all input columns are preserved in recommendations and ad… #86
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| workflow_call: # reused by release.yml as the pre-publish gate | |
| jobs: | |
| # 3. Lint (ruff) + strict mypy on the gated packages. | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Sync (runtime + dev group) | |
| run: uv sync --python 3.13 | |
| - name: Ruff (lint) | |
| run: uv run ruff check . | |
| - name: Ruff (format check) | |
| run: uv run ruff format --check . | |
| - name: Mypy (strict — gated packages) | |
| run: uv run mypy | |
| # 2. Tests (uv). The full suite needs the ml + autoconf extras (they resolve on 3.13); once synced | |
| # with --all-extras, every `uv run` uses --no-sync so it does not drop the extras. | |
| test: | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Sync (dev + all runtime extras) | |
| run: uv sync --python 3.13 --all-extras | |
| - name: CLI smoke (entry points resolve) | |
| run: | | |
| uv run --no-sync coastline --help | |
| uv run --no-sync coastline recommend-job --help | |
| uv run --no-sync coastline recommend-trace --help | |
| uv run --no-sync coastline utils --help | |
| uv run --no-sync coastline utils plot-trace --help | |
| uv run --no-sync python -m coastline.cli --help | |
| uv run --no-sync python -c "from coastline.ui import main; assert callable(main)" | |
| uv run --no-sync python -c "from coastline.ui.app import app" | |
| uv run --no-sync python -c "import sys, coastline; assert callable(coastline); assert not any(m in sys.modules for m in ('torch','xgboost'))" | |
| - name: Run pytest (shipped-package suite) | |
| # CI validates the shipped package. The dev trainer/benchmark tests require the external | |
| # trace-archive dataset (not available in CI); run them locally, each in its own invocation: | |
| # `uv run --all-extras pytest dev/trainer/tests` / `... dev/benchmark/tests`. | |
| run: uv run --no-sync pytest | |
| - name: Native-ML predictor tests (informational — featv3 pickles may need regen on 3.13) | |
| continue-on-error: true | |
| run: uv run --no-sync pytest -m ml_isolated -p no:cacheprovider | |
| # 1. Build the wheel and prove it ships whole: install into a fresh venv (no repo on the | |
| # path) and smoke every console script + packaged data. | |
| wheel-smoke: | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Build sdist + wheel | |
| run: uv build | |
| - name: Install the wheel into a fresh venv and smoke it | |
| run: | | |
| uv venv "$RUNNER_TEMP/wheel-venv" --python 3.13 | |
| uv pip install --python "$RUNNER_TEMP/wheel-venv/bin/python" dist/*.whl | |
| mkdir -p "$RUNNER_TEMP/wheel-smoke" && cd "$RUNNER_TEMP/wheel-smoke" | |
| export PATH="$RUNNER_TEMP/wheel-venv/bin:$PATH" | |
| coastline --help | |
| python -m coastline.cli --help | |
| python -c "from coastline.ui import main; assert callable(main)" | |
| # Packaged data + templates must ship in the wheel. | |
| python -c "from coastline.sdk.io.sample_data import sample_raw_trace_path; assert sample_raw_trace_path().exists()" | |
| python -c "import importlib.resources as r; assert (r.files('coastline.ui') / 'templates' / 'index.html').is_file()" | |
| # 4. Build the CLI + UI docker images (build only on CI; push happens in release.yml). | |
| docker-build: | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: [cli, ui] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: Build ${{ matrix.target }} image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| target: ${{ matrix.target }} | |
| push: false | |
| tags: coastline:${{ matrix.target }} | |
| # The documentation site must build strictly (no broken links). | |
| docs: | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Build docs (strict) | |
| run: | | |
| uv sync --only-group docs --no-install-project | |
| uv run --no-sync mkdocs build --strict |