Repository navigation
Add model integration tests and advisory regression reports - #23
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Tour-sequence validation is incorrect for normal round trips, and extension loading and summary metadata requirements are incomplete.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Adds automated model input/contract tests, regression baselines, diagnostics, and CI workflows.
Changes:
- Adds fixed-sample and scheduled model validation.
- Adds advisory baselines and runtime/memory diagnostics.
- Documents local testing and CI workflows.
| File | Description |
|---|---|
tests/test_model_inputs.py |
Validates inputs, IDs, skims, and zones. |
tests/test_model_ci.py |
Tests output-contract validation. |
tests/model/settings.yaml |
Configures test-scale model runs. |
tests/baselines/2000.json |
Stores small-run baseline metrics. |
tests/baselines/10000.json |
Stores large-run baseline metrics. |
scripts/model_ci.py |
Runs and validates model integrations; tour sequencing, extension loading, and summary metadata require changes. |
README.md |
Documents automated model tests. |
docs/testing.md |
Documents testing, fixtures, diagnostics, and baselines. |
.github/workflows/model-tests.yml |
Defines CI and scheduled validation jobs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
ActivitySim 1.5.1 initialize_from_tours assigns trip_num and trip_count per direction. Preserve that contract and the independently scheduled leg times, while requiring both directions, matching tour endpoints, and a connected full-tour path. Add multistop round-trip coverage and corrupt-output regression cases.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Changes
Add automated model validation against the released dependencies in
uv.lock. Every pull request runs input/contract tests and the full model sequence for a fixed sample of 2,000 complete households, retaining the full zone system and skims. Structural failures fail CI; changes in modeled distributions remain advisory.No behavioral model configurations, input population files, or dependency versions are changed. Constraint/telework component-specific tests can be added when those extensions land on main.
Validation
All jobs passed on the exact branch head in GitHub Actions on the driftlesslabs fork:
Local model runs, Ruff checks, YAML lint, and whitespace checks also passed. Summed RSS may count shared pages more than once. Scheduling fallback counts remain advisory (7 trips in the smaller run and 52 in the larger run).
Weekly scheduling activates on the default branch after merge. Branch protection can then require the
contractsandmodelchecks.