Skip to content

Report Generation; Improve Reacitivty; Type Safety#31

Merged
gvegayon merged 6 commits intomainfrom
ob-mvp
Apr 10, 2026
Merged

Report Generation; Improve Reacitivty; Type Safety#31
gvegayon merged 6 commits intomainfrom
ob-mvp

Conversation

@olivia-banks
Copy link
Copy Markdown
Member

@olivia-banks olivia-banks commented Apr 3, 2026

Implement report generation. Improve readacitivty of streamlit GUI. Implement more Pydantic models, hooking into the rest of the system, and introduce new typing hints.

Introduce Pydantic Models for Builtin Models
Copilot AI review requested due to automatic review settings April 3, 2026 22:14
@olivia-banks olivia-banks marked this pull request as draft April 3, 2026 22:14
@olivia-banks olivia-banks added the enhancement New feature or request label Apr 3, 2026
@olivia-banks olivia-banks self-assigned this Apr 3, 2026
@olivia-banks olivia-banks added this to the MVP milestone Apr 3, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors parameter handling for Python-based models to use Pydantic schemas for validation, improves parameter-file reload behavior in the Streamlit UI, and updates the built-in models to consume typed parameter objects.

Changes:

  • Introduces model-specific Pydantic parameter schemas and validates uploaded parameter files against them.
  • Updates the Streamlit app flow to (a) refresh parameters when uploaded content changes and (b) block execution on validation errors with user-facing details.
  • Adjusts supporting utilities (parameter loader/UI helpers) to support typed validation + nested parameter structures.

Reviewed changes

Copilot reviewed 8 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/epicc/utils/parameter_ui.py Exposes item_level() for shared indent parsing and updates callers accordingly.
src/epicc/utils/parameter_loader.py Loads parameter files via format readers and validates them using model.parameter_model().
src/epicc/models/tb_isolation.py Adds Pydantic schemas for parameters and updates run() to use typed access.
src/epicc/models/measles_outbreak.py Adds a Pydantic schema for parameters and updates run() to use typed access.
src/epicc/model/base.py Changes the base model contract to accept BaseModel params and requires parameter_model().
src/epicc/formats/yaml.py Minor module export (__all__) placement adjustment.
src/epicc/main.py Adds parameter validation UX, typed param construction, and more robust upload identity tracking.
pyproject.toml Formatting-only change.
app.py Removes the top-level docstring from the shim entrypoint.
.gitignore Reorders/expands ignored artifacts (coverage, build outputs, caches).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* [stash] draft

* [stash] draft

* [test] test!

* [format] templating

* [dep] dep

* [report] add report generation button
@olivia-banks
Copy link
Copy Markdown
Member Author

Sorry for the delay here, turns out it was an issue both with my browser and my installation. Updating my browser and reinstalling both system Python and venv Python seems to have worked... fingers crossed it stays this way.

@olivia-banks olivia-banks marked this pull request as ready for review April 9, 2026 21:19
@olivia-banks
Copy link
Copy Markdown
Member Author

Will work on resolving these issues and re-request after the most recent merge.

* [model] make `BaseSimulationModel` generic over `ParamsT`

* [tb-iso] remove unused `hourly_wage_public_health_worker` parameter

* [app] cache uploaded parameter file sha1 in session
@olivia-banks olivia-banks requested a review from Copilot April 10, 2026 07:27
@olivia-banks olivia-banks changed the title Repair Draft Report Generation; Improve Reacitivty; Type Safety Apr 10, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 13 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* [model] make `BaseSimulationModel` generic over `ParamsT`

* [tb-iso] remove unused `hourly_wage_public_health_worker` parameter

* [app] cache uploaded parameter file sha1 in session

* [style] hide `.export-hint` in print media

* [branding] persist title
* [model] make `BaseSimulationModel` generic over `ParamsT`

* [tb-iso] remove unused `hourly_wage_public_health_worker` parameter

* [app] cache uploaded parameter file sha1 in session

* [style] hide `.export-hint` in print media

* [branding] persist title

* [branding] move to `epicc`

* [gha] overhaul the container image situation
@olivia-banks
Copy link
Copy Markdown
Member Author

image

Oh my!

@gvegayon
Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

@copilot, fix the error in the CI https://github.com/EpiForeSITE/epiworldPythonStreamlit/actions/runs/24233108911/job/70749066178?pr=31

Fixed in c468340. The uv.lock file still referenced the old project name epiworld-python-streamlit after pyproject.toml was renamed to epicc, causing uv sync --frozen to fail with Could not find root package 'epicc'. Regenerated the lock file with uv lock to fix the mismatch.

Copilot AI requested a review from gvegayon April 10, 2026 15:29
@gvegayon gvegayon merged commit eb9af74 into main Apr 10, 2026
1 check passed
@gvegayon gvegayon deleted the ob-mvp branch April 10, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

4 participants