Git Product home page Git Product logo

mocitempgen's Introduction

MoCITempGen

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: process

  • 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

How to use

Installation

You don't need to install the package, but the requirements must be installed:

pip install -r requirements.txt

Interactive mode

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:

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

Folder Structure

CI_templates_python

This folder holds the main scripts that perform the creation of the library dependant ci-templates. For further information see it's Readme

CITests

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.

templates

This folder contains the base templates for mako that will be used to create your library dependant ci-templates.

TODOS:

  • 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

mocitempgen's People

Contributors

dajansengit avatar fwuellhorst avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.