pip install . -r requirements.txtNote that for visualizing the traces using clingraph, Graphviz must be locally installed.
sudo apt install graphvizpip install -e .Memelingo extends the application class
memelingo -hmemelingo 0 -c lambda=3 examples/traffic-lights.lpTo visualize the timed traces obtained using clingraph you can add the argument --view
memelingo 1 -c lambda=3 examples/traffic-lights.lp --viewpython -m clingo examples/traffic-lights.lp --output=reify | python -m clingcon 0 - src/encodings/{meta-melingo,meta-clingcon-interval,meta}.lp -c lambda=3To improve code quality, we run linters, type checkers, and unit tests. The tools can be run using nox. We recommend installing nox using pipx to have it available globally:
python -m pip install pipx
python -m pipx install nox
noxYou can invoke nox -s to run individual sessions. For example, to install
your package into a virtual environment and run your test suite, invoke:
nox -s testWe also provide a nox session that creates an environment for development. The project is installed in editable mode into this environment along with linting, type checking and formatting tools. Activating it allows your editor of choice to access these tools for, e.g., linting and autocompletion. To create and then activate virtual environment run:
nox -s dev
source .nox/dev/bin/activateFurthermore, we provide individual sessions to easily run linting, type
checking and formatting via nox. These also create editable installs. So you
can safely skip the recreation of the virtual environment and reinstallation of
your package in subsequent runs by passing the -R command line argument. For
example, to auto-format your code using black, run:
nox -Rs format -- check
nox -Rs formatThe former command allows you to inspect changes before applying them.
Note that editable installs have some caveats. In case there are issues, try
recreating environments by dropping the -R option. If your project is
incompatible with editable installs, adjust the noxfile.py to disable them.
We also provide a pre-commit config to automate this process. It can be set up using the following commands:
python -m pipx install pre-commit
pre-commit installThis blackens the source code whenever git commit is used.