-
Notifications
You must be signed in to change notification settings - Fork 2
Update with latest changes python project template v0.2.6 #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update with latest changes python project template v0.2.6 #18
Conversation
…ved limits handling of Controls
…e used as verification tool also by other packages. Updated pyproject.toml with respect to deprecated type checking of numpy and scipy.
…of curve fitting function to 'measure oscillations'.
# Conflicts: # pyproject.toml
…o make it uniform with crane-fmu (there also 'test' is used).
…t' (needed by module src/component_model/plotter.py )
…s.py, analytic.py and plotter.py
… errors when building the documentation
There was a problem hiding this 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 the project to align with the latest python_project_template v0.2.6, focusing on modernizing dependencies, Python version support, and improving code quality.
Changes:
- Updated Python version support to 3.11-3.14, dropping 3.10
- Upgraded all major dependencies (ruff, pyright, numpy, scipy, matplotlib, pytest, Sphinx, and GitHub Actions)
- Enhanced type hints and added
type: ignorecomments for untyped imports - Improved code quality in tests and source files with better type annotations and minor fixes
Reviewed changes
Copilot reviewed 43 out of 54 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Updated Python versions, dependency versions, and renamed 'tests' to 'test' group |
| ruff.toml | Updated target Python version to py311 and added new ignore rules |
| pytest.ini | Restructured configuration and added --durations flag |
| tests/test_solver.py | Added type hints and uncommented pytest.main call |
| tests/test_oscillator.py | Refactored to use new ForcedOscillator1D class from analytic module |
| tests/test_controls.py | Updated test assertions and added limit checking tests |
| src/component_model/analytic.py | New module with ForcedOscillator1D class and sine_fit function |
| src/component_model/utils/controls.py | Refactored check_limit method for better error handling |
| docs/source/* | Updated documentation structure and content |
| .github/workflows/* | Updated all GitHub Actions to latest versions |
| Multiple test files | Added type: ignore comments for untyped fmpy/pythonfmu imports |
Comments suppressed due to low confidence (3)
pyproject.toml:1
- Corrected spelling of 'workwhen' to 'work when'.
pyproject.toml:1 - The MacOS operating system classifier is commented out. If MacOS is no longer supported, this line should be removed entirely rather than commented out, or a comment should explain why it's temporarily disabled.
examples/oscillator_xd.py:1 - The comment 'need to scale with the mass' should be expanded to explain why this scaling is necessary, especially since this is a change from the previous version where force was not scaled.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@eisDNV this pull request contains the proposed updates in the code base to get most aspects in sync with python_project_template v0.2.6 Main remaining difference to the python_project_template after the updates in this PR is, as before, that the code does not hold to the pyright rules we typically have in place. Yet, to "fully" catch up with python_project_template, the issues raised by pyright would need to be solved. But that decision I leave to you. And certainly it can be done in a separate PR, at a later point in time. |
Added
Changed
Dependencies