Skip to content

Conversation

@ClaasRostock
Copy link
Collaborator

Added

  • Sphinx documentation:
    • Added docs for modules variable_naming.py, enums.py, analytic.py and plotter.py
  • Added Visual Studio Code settings

Changed

  • Updated code base with latest changes in python_project_template v0.2.6
  • pyproject.toml:
    • Updated supported Python versions to 3.11, 3.12, 3.13, 3.14
    • Updated required Python version to ">= 3.11"
    • Renamed optional dependency group 'tests' to 'test' to make it uniform with crane-fmu (there also 'test' is used).
  • ruff.toml:
    • Updated target Python version to "py311"
  • .sourcery.yaml:
    • Updated the lowest Python version the project supports to '3.11'
  • GitHub workflow _test.yml:
    • Updated Python versions in test matrix to 3.11, 3.12, 3.13, 3.14
  • GitHub workflow _test_future.yml:
    • Updated Python version in test_future to 3.15.0-alpha - 3.15.0
  • GitHub workflow _build_and_publish_documentation.yml:
    • Changed 'uv sync --upgrade' to 'uv sync --frozen' to avoid unintentional package upgrades.
  • Sphinx documentation:
    • Updated toctree
    • conf.py: Updated, and removed ruff rule exception on file level

Dependencies

  • Updated to ruff>=0.14.3 (from ruff>=0.6.3)
  • Updated to pyright>=1.1.407 (from pyright>=1.1.378)
  • Updated to sourcery>=1.40 (from sourcery>=1.22)
  • Updated to numpy>=2.3 (from numpy>=2.0)
  • Updated to scipy>=1.16 (from scipy>=1.15.1)
  • Updated to matplotlib>=3.10 (from matplotlib>=3.9.1)
  • Updated to plotly>=6.3 (from plotly>=6.0.1)
  • Updated to pytest>=8.4 (from pytest>=8.3)
  • Updated to pytest-cov>=7.0 (from pytest-cov>=5.0)
  • Updated to Sphinx>=8.2 (from Sphinx>=8.0)
  • Updated to sphinx-argparse-cli>=1.20 (from sphinx-argparse-cli>=1.17)
  • Updated to sphinx-autodoc-typehints>=3.5 (from sphinx-autodoc-typehints>=2.2)
  • Updated to furo>=2025.9 (from furo>=2024.8)
  • Updated to pre-commit>=4.3 (from pre-commit>=3.8)
  • Updated to mypy>=1.18 (from mypy>=1.11.1)
  • Updated to checkout@v5 (from checkout@v4)
  • Updated to setup-python@v6 (from setup-python@v5)
  • Updated to setup-uv@v7 (from setup-uv@v2)
  • Updated to upload-artifact@v5 (from upload-artifact@v4)
  • Updated to download-artifact@v5 (from download-artifact@v4)

eisDNV and others added 30 commits December 19, 2025 08:08
…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'.
Copy link
Contributor

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 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: ignore comments 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.

@ClaasRostock
Copy link
Collaborator Author

@eisDNV
Hi Siegfried,

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.
The code quality workflow on GitHub runs successful, despite, as the respective pyright job is commented out in _code_quality.yml (unchanged).

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.

@ClaasRostock ClaasRostock merged commit 84496ce into main Jan 16, 2026
11 checks passed
@ClaasRostock ClaasRostock deleted the update-with-latest-changes-python-project-template-v0.2.6 branch January 16, 2026 09:48
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.

3 participants