Setting development environment

flamapy requires a specific configuration of libraries, environment variables and various artifacts to run in developer mode.

Table of contents

  1. Setting workspace
  2. Clone the repositories
  3. Setting up

Setting workspace

To make it easier, we recommend creating the flamapy folder in your home directory:

mkdir ~/flamapy
cd ~/flamapy 

Clone the repositories

Clone the core and the plugins you will work on. The usual set is the framework, the feature-model, SAT, BDD and Z3 plugins, and the flamapy distribution, which holds the CLI and the Python facade:

git clone https://github.com/flamapy/flamapy_fw.git
git clone https://github.com/flamapy/fm_metamodel.git
git clone https://github.com/flamapy/pysat_metamodel.git
git clone https://github.com/flamapy/bdd_metamodel.git
git clone https://github.com/flamapy/z3_metamodel.git
git clone https://github.com/flamapy/flamapy.git

Setting up

Every package needs Python >= 3.11. Create a virtual environment and install each repository in editable mode, in dependency order (the framework first, the distribution last):

python3 -m venv env && source env/bin/activate
for repo in flamapy_fw fm_metamodel pysat_metamodel bdd_metamodel z3_metamodel flamapy; do
    pip install -e "./$repo"
done

There is no plugin path to configure: an installed plugin registers itself through its flamapy.plugins entry point, and the framework discovers it at run time. If a change does not take effect, check that the package is installed in editable mode, since an installed wheel of the same plugin would shadow your sources.

Each repository’s Makefile offers the quality gates: make test (pytest), make lint (ruff check .), make mypy (mypy -p flamapy) and make cov (coverage).