This repository holds functions to create your own, library dependant CI-scripts. The goal is to improve quality of models through easier CI setup and let model developers focus on the modeling work. The created templates hold functionality for:
- Model checking
- Model simulation
- Regression testing
- Correct HTML
- Style Checking
- Merge IBPSA library (specific for IBPSA context)
The basic setup is shown in this picture:
- MoCITempGen uses the base CI-Templates in .txt form stored in
templates
folder to create a library related CI-structure. - This can then be placed inside the target Modelica library
- The CI tasks are executed by a GitLab runner which uses the functionality
provided through the python functions in
CITests
folder. This will be moved to a public ModelicaPyCI package on PyPi soon - Through the GitLab mirroring feature not only GitLab repos can use MoCITempGen generated templates but any GitHub, BitBucket or AWS CodeCommit repository
You don't need to install the package, but the requirements must be installed:
pip install -r requirements.txt
For this a prompt menu will guide you through the needed inputs. This is still
work in progress and not as robust as it should be.
Be sure to be in the folder of the library you want to create tests for.
Then, get the path to the folder CI_templates_python
, e.g. /path_to/CI_templates_python
and run:
python /path_to/CI_templates_python/ci_templates.py
If the process in finished you will have your results stored under
CI_templates_python/dymola-ci-tests
. Additionally, you will be provided with a
fresh CI_setting.toml
file that holds the configuration you created. You can
change this config and rerun the process in config mode:
This takes the configurations from the previous process which can be modified
and creates a new dymola-ci-tests
setup. This is useful if you only want to
change a few settings. For this run
python CI_templates_python/ci_templates.py --setting
This folder holds the main scripts that perform the creation of the library dependant ci-templates. For further information see it's Readme
This folder contains all python functions that the CI will later run. This will be moved into the ModelicaPyCI package soon. For further information see it's Readme.
This folder contains the base templates for mako that will be used to create your library dependant ci-templates.
- complete documentation
- merge open modelica branch
- complete extraction of python functions from CITests folder to ModelicaPyCI package
- remove dymola functionality as far as possible
- maybe add template generation for GitHub actions