makefile(streamlit the same, stlite added, bug for display fixed, out…#21
makefile(streamlit the same, stlite added, bug for display fixed, out…#21
Conversation
…put as 0 as TD), and AGENTS.md added
There was a problem hiding this comment.
Pull request overview
This PR adds stlite build scaffolding and contributor guidance while adjusting parameter loading/rendering to better support stlite (including handling nested YAML parameters: blocks and attempting to prevent blank widget values from overwriting defaults).
Changes:
- Add stlite build generation via
scripts/build_index.pyand a newMakefileworkflow. - Normalize YAML parameter defaults and add helpers for leaf-parameter defaults/coercion (stlite-specific).
- Add
AGENTS.mdcontributor/agent conventions and refactor parameter UI rendering/reset behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
utils/parameter_ui.py |
Refactors parameter reset/render logic and changes widget keying + sidebar rendering. |
utils/parameter_loader.py |
Adds typing, supports nested parameters: YAML layouts, and introduces get_leaf_defaults. |
scripts/build_index.py |
New helper to generate build/index.html for stlite and mount project files. |
app.py |
Adds stlite detection + parameter normalization/coercion; updates parameter source handling and UI flows. |
Makefile |
New targets for dev/stlite build/serve and quality checks. |
AGENTS.md |
New contributor/agent conventions and documented function contracts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thank you, @EddW1219! @olivia-banks, can you take a look at this PR? |
|
Linking to #13. |
|
@EddW1219 Do you have an ETA on this? |
|
@copilot, please address the comments in #21 (review) and #21 (review) attn @olivia-banks @EddW1219 |
- Add pandas-stubs, types-openpyxl, types-PyYAML to dev dependencies - All checks now pass: ruff, mypy, pytest - 91% coverage on utils/parameter_ui.py (changed code) - Addresses olivia-banks' review comments
8b8e87f to
50b18e2
Compare
|
@gvegayon @olivia-banks Hi George and Olivia, I just merged the changes to current PR. |
|
This looks great to me, and I think it's ready to merge after we get #17 in here. |
running_in_stlite(): remove duplicate, use Pyodide-recommended detection (sys.platform == "emscripten")utils/parameter_ui.pywithhtml.escape()to prevent injectionUV ?= uv, fixsmelectedtypo, restructure$(BUILD_DIR)mkdir into INDEX_HTML rule-> Nonefrommain()inscripts/build_index.pyrender_parameters_with_indent