feat: canonical lead scoring validation module #81
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: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint & format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install ruff | |
| - run: ruff check . | |
| - run: ruff format --check . | |
| typecheck: | |
| name: Type check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e ".[dev]" | |
| - run: mypy leadforge/ | |
| test: | |
| name: Tests (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| env: | |
| COVERAGE_FILE: .coverage.${{ matrix.python-version }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - run: pip install -e ".[dev]" pytest-cov | |
| - run: pytest --cov=leadforge --cov-report=term-missing | |
| - name: Upload coverage artifact | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pr-agent-context-coverage-py${{ matrix.python-version }} | |
| path: .coverage.${{ matrix.python-version }} | |
| include-hidden-files: true | |
| if-no-files-found: ignore | |
| validate-dataset: | |
| name: Validate lead scoring dataset | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e ".[dev,scripts]" | |
| - name: Check for v5 dataset | |
| id: check | |
| run: | | |
| if [ -f "lead_scoring_intro_v5.csv" ]; then | |
| echo "found=true" >> "$GITHUB_OUTPUT" | |
| echo "csv=lead_scoring_intro_v5.csv" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "found=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Run validator | |
| if: steps.check.outputs.found == 'true' | |
| run: python scripts/validate_lead_scoring_dataset.py --csv "${{ steps.check.outputs.csv }}" --enforce-1000 | |
| - name: Skip (no dataset) | |
| if: steps.check.outputs.found != 'true' | |
| run: echo "No lead_scoring_intro_v5.csv found in repo root — skipping validation" |