Skip to content

Add health insurance premiums to local area calibration, a matrix builder function, Modal model fitting #866

Add health insurance premiums to local area calibration, a matrix builder function, Modal model fitting

Add health insurance premiums to local area calibration, a matrix builder function, Modal model fitting #866

# Workflow that runs on code changes to a pull request.
name: PR code changes
on:
pull_request:
branches:
- main
paths:
- policyengine_us_data/**
- tests/**
- .github/workflows/**
- Makefile
jobs:
check-fork:
runs-on: ubuntu-latest
steps:
- name: Check if PR is from fork
run: |
if [ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]; then
echo "❌ ERROR: This PR is from a fork repository."
echo "PRs must be created from branches in the main PolicyEngine/policyengine-us-data repository."
echo "Please close this PR and create a new one following these steps:"
echo "1. git checkout main"
echo "2. git pull upstream main"
echo "3. git checkout -b your-branch-name"
echo "4. git push -u upstream your-branch-name"
echo "5. Create PR from the upstream branch"
exit 1
fi
echo "✅ PR is from the correct repository"
check-lock-freshness:
name: Check uv.lock freshness
runs-on: ubuntu-latest
needs: check-fork
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Check lock file is up-to-date
run: |
uv lock --locked || {
echo "::error::uv.lock is outdated. Run 'uv lock' and commit the changes."
exit 1
}
Lint:
needs: [check-fork, check-lock-freshness]
uses: ./.github/workflows/reusable_lint.yaml
SmokeTestForMultipleVersions:
name: Smoke test (${{ matrix.os }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
needs: [check-fork, Lint]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.13']
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install package ONLY (no dev deps)
run: python -m pip install .
- name: Test basic import
run: python -c "import policyengine_us_data; print('Minimal import OK')"
- name: Test specific core import
run: python -c "from policyengine_core.data import Dataset; print('Core import OK')"
Test:
needs: [check-fork, Lint]
uses: ./.github/workflows/reusable_test.yaml
with:
full_suite: true
upload_data: false
deploy_docs: false
secrets: inherit