Skip to content

andreafra/piacere-model-checker

 
 

Repository files navigation

DOML Model Checker

Documentation Status

Description of the component

The DOML Model Checker is a component of the PIACERE framework in charge of checking the correctness and consistency of DOML models.

It consists of a web server exposing a REST API that receives a DOML model in XMI format (also called DOMLX) and provides as output a result detailing whether the model satisfies a set of internal requirements, and in case of negative results, what elements are in violation and how to fix the issue.

It also bundles a Cloud Service Provider (CSP) Compatibility tool that can provide the compatibility results of a model against common Cloud Service Providers.

Installation

Setup

Activate the Python Virtual Environment with:

source .venv/bin/activate

Install the required packages with:

pip install -r requirements.txt

Run the model checker web server

python -m mc_openapi

Run with Uvicorn

The project may be run with Uvicorn as follows:

uvicorn --port 8080 --host 0.0.0.0 --interface wsgi --workers 2 mc_openapi.app_config:app

Run tests

Run tests with:

python -m pytest

Run with Docker

First, build the docker image with the usual

docker build -t wp4/dmc .

And then run it with

docker run -d wp4/dmc

The Uvicorn server will be running and listening on port 8080 of the container. To use it locally, you may bind it with port 8080 of localhost by adding -p 127.0.0.1:8080:8080/tcp to the docker run command.

Documentation

You can read the latest version at readthedocs.io

Building the Documentation

The documentation has been written in Sphinx and covers both usage through the PIACERE IDE and the REST APIs.

If you want to build the documentation manually, run:

cd docs
make html

The documentation will be generated in docs/_build.

## License This work is licensed under the Apache License 2.0.

Contact

andrea.franchini@polimi.it

Acknowledgement

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under Grant Agreement No. 101000162 (PIACERE).

Releases

No releases published

Packages

No packages published

Languages

  • Python 55.4%
  • Jupyter Notebook 41.6%
  • HTML 2.9%
  • Dockerfile 0.1%