-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
Description
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
casella