👌 Update dependencies and fix compatibility newer python versions#14
Conversation
For up to python 3.12 compatibility
- Include steps to run directly from remote source - Add instructions for running from a local copy - Show how to add as a dependency to existing projects
Was tested to not be needed anymore
There was a problem hiding this comment.
Pull request overview
This PR updates PyParamGUI for Python 3.12 compatibility by adjusting project metadata and dependencies, and it refactors the widget’s frontend form code to reduce duplication and improve robustness around simulation triggering.
Changes:
- Bump
pyglotaran/pyglotaran-extrasto0.7.4and constrain Python to>=3.10,<3.13; add adependency-groups.deventry. - Refactor
pyparamgui/static/form.jsto centralize form-group creation, centralize number-list parsing, and make simulation ID generation more robust. - Expand README with uv-based run/add instructions and remove the
ANYWIDGET_HMRnote frompyparamgui.__init__.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| README.md | Adds uv-based usage instructions (run from GitHub, local clone, or existing project). |
| pyproject.toml | Updates Python compatibility bounds, bumps core deps, and adds a dependency group for dev tooling. |
| pyparamgui/static/form.js | Refactors form creation and parsing helpers; improves simulate ID creation and button behavior. |
| pyparamgui/init.py | Removes an outdated environment-variable usage note from package usage docs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| formGroup.appendChild(label); | ||
| formGroup.appendChild(input); | ||
|
|
||
| return formGroup; | ||
| return { formGroup, input }; | ||
| } |
There was a problem hiding this comment.
createTextFormGroup now returns an object { formGroup, input }, but the JSDoc still claims it returns an HTMLDivElement. Update the @returns type/description so editor type hints match the actual return value.
|
|
||
| formGroup.appendChild(label); | ||
| formGroup.appendChild(input); | ||
|
|
||
| return formGroup; | ||
| return { formGroup, input }; | ||
| } |
There was a problem hiding this comment.
createCheckboxFormGroup now returns an object { formGroup, input }, but the JSDoc still states it returns an HTMLDivElement. Please update the @returns documentation to reflect the new return shape.
and address review comments
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14 +/- ##
=======================================
Coverage ? 91.74%
=======================================
Files ? 4
Lines ? 206
Branches ? 16
=======================================
Hits ? 189
Misses ? 10
Partials ? 7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
pyparamgui/generator.py:279
typing.castexpects a type object as its first argument. Using the string literal"str"defeats static type-checking (mypy will flag this) and is inconsistent with the rest of the module. Please change this back tocast(str, ...)(or remove the cast entirely ifwrite_dict()is already typed as returningstr).
)
raise ValueError(msg)
model = generators[generator_name](**generator_arguments)
return cast("str", write_dict(model))
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
not that we used it, but at least be consistent
s-weigand
left a comment
There was a problem hiding this comment.
Thanks for the maintenance update 🚧
This PR updates dependencies and project metadata for Python >=3.12 compatibility,
including bumping pyglotaran and pyglotaran-extras to 0.7.4, adding a dev dependency group, and checking in the new uv.lock.
It also refactors the JavaScript form code to reduce duplication, centralize number-list parsing, and make simulation ID generation more robust.
The README now includes clearer uv-based usage instructions for running from GitHub, a local clone, or an existing project.
A small cleanup also removes the ANYWIDGET_HMR note from pyparamgui.init.