Skip to content

👌 Update dependencies and fix compatibility newer python versions#14

Merged
s-weigand merged 8 commits into
glotaran:mainfrom
jsnel:fix-dependencies-py312-compat
Mar 22, 2026
Merged

👌 Update dependencies and fix compatibility newer python versions#14
s-weigand merged 8 commits into
glotaran:mainfrom
jsnel:fix-dependencies-py312-compat

Conversation

@jsnel
Copy link
Copy Markdown
Member

@jsnel jsnel commented Mar 22, 2026

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.

jsnel added 3 commits March 22, 2026 12:03
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
Copilot AI review requested due to automatic review settings March 22, 2026 12:24
Copy link
Copy Markdown

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 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-extras to 0.7.4 and constrain Python to >=3.10,<3.13; add a dependency-groups.dev entry.
  • Refactor pyparamgui/static/form.js to 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_HMR note from pyparamgui.__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.

Comment thread README.md
Comment thread README.md Outdated
Comment thread pyparamgui/static/form.js
Comment on lines 24 to 29

formGroup.appendChild(label);
formGroup.appendChild(input);

return formGroup;
return { formGroup, input };
}
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment thread pyparamgui/static/form.js
Comment on lines 59 to +64

formGroup.appendChild(label);
formGroup.appendChild(input);

return formGroup;
return { formGroup, input };
}
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
and address review comments
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 22, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@66ca12e). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pyparamgui/generator.py 66.66% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

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 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.cast expects 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 to cast(str, ...) (or remove the cast entirely if write_dict() is already typed as returning str).
        )
        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
@jsnel jsnel changed the title 👌 Update dependencies and fix Python 3.12 compatibility 👌 Update dependencies and fix compatibility newer python versions Mar 22, 2026
Copy link
Copy Markdown
Member

@s-weigand s-weigand left a comment

Choose a reason for hiding this comment

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

Thanks for the maintenance update 🚧

@s-weigand s-weigand merged commit d1937f4 into glotaran:main Mar 22, 2026
18 checks passed
@jsnel jsnel deleted the fix-dependencies-py312-compat branch March 22, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants