Skip to content

Modernise OpenModelicaLibraryTesting #249

Open

Description

@AnHeuermann

Issue

Updating or changing OpenModelicaLibraryTesting is an error prone and time consuming endeavor.

Some major issues:

  • No versioned dependencies or suitable dependency management.
    • If a dependency changes in a breaking fashion we don't notice until it is too late.
    • OMPython 3.4.0 --> 4.0.0 introduced breaking changes. Only jobs that always re-install / update Python packages failed, while other which don't update didn't notice.
  • No unit testing
    • Testing a whole library coverage is too slow for the CI.
  • Dead code
    • There is unused code in the source files
    • Unused imports
  • Monolithic code
    • Large functions or scripts are not separated into multiple smaller functions.
    • Very deep nesting of branching logic
  • No documentation for sub-functions.
  • No versioning

The Scripts are missing documentation and have a lot of dead code.
Testing of the scripts itself is slow and very rudimentary.

Suggested changes

  • Transform scripts into Python package
    • Modern dependency management and build backend.
    • Directory layout with smaller sub-modules and one-file-per-function convention.
    • Unit tests with a modern testing framework.
    • Python docstrings
  • Python documentation (MkDocs)

Suggested development process

  • Develop on a new branch (Jenkins always uses latest master)
  • Set aside a single Jenkins job to pick up the development version to assert it stays running as expected.
  • Version the final OpenModelicaLibraryTesting module

Activity

  1. self-assigned this
    on Nov 14, 2025
  2. cbu-hw commented on Dec 2, 2025

    @cbu-hw

    As part of this, maybe it's possible to make optional parts avoidable.
    With https://github.com/OpenModelica/openmodelica-library-testing-action, this package is/should be useable for generic testing of Modelica packages. However, at the moment, using OMLT drags in a whole Julia installation, apparently for some Basemodelica-related checks that library authors I guess typically won't need.

    In my case this Julia installation triggers some error which makes the Action (and I suspect a current version of OMLT, too) unusable for me (OpenModelica/openmodelica-library-testing-action#54), which would be avoidable if the Julia parts were Python optional-dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions