Add Model Editor / Creator Workflow#53
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an in-app model editor workflow to EPICC so users can create/edit YAML model documents via a Streamlit GUI, with schema validation feedback and YAML export, and adds “dirty” indicators to parameter widgets/groups in the calculator UI.
Changes:
- Introduces a new Streamlit-based model editor (
src/epicc/ui/editor.py) for editing model metadata, parameters, equations, scenarios, report blocks, and presets with validation + YAML export. - Integrates an “Open Model Editor” toggle into the main app flow (
src/epicc/__main__.py) to switch between calculator mode and editor mode for the selected model. - Enhances parameter rendering to mark modified (“dirty”) parameters/groups with a
[*]suffix (src/epicc/ui/parameters.py).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/epicc/ui/parameters.py |
Adds dirty-ID computation and label suffixing to visually indicate modified parameters/groups; minor refactor in group rendering. |
src/epicc/ui/editor.py |
New GUI editor for authoring/validating/exporting model YAML documents. |
src/epicc/__main__.py |
Adds editor-mode toggle and routes into the editor for the currently selected model. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
If one of you could try running this feature branch and seeing if there's anything I'm missing, that would be appreciated. Copilot doesn't seem great at catching stuff like that and I've resolved its comments. |
I could do it! But it would be great if you could move this branch from your repo to EpiForeSITE instead. LMK when you do that. |
Pushed upstream. This PR doesn't track that branch but you should now be able to check it out locally. Sorry for the oversight. |
|
Hey @olivia-banks, I just tried it out and I got an error:
Here is the full text:
Also, notice that I had to merge the main branch into your branch to make it work (I was having the same issues regarding missing modules). |
|
@gvegayon Should be fixed now, and I also changed some stuff for quality of life (entering the editor without an active model, some help text, et cetera). The error you were running into was because I used a Also, sorry that you had to merge it in yourself, I had merged in |

Fix #41.