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 core
  3. Clone plugins
  4. Setting up
    1. Setting plugin paths
    2. Setting developer mode

Setting workspace

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

mkdir ~/flamapy
cd ~/flamapy 

Clone the core

git clone https://github.com/flamapy/flamapy_fw.git

Clone plugins

By itself, the flamapy core does not provide parsing functionality. We can clone existing plugins to have artefacts to work with and not start from scratch:

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

Setting up

Setting plugin paths

First, we must set the PLUGIN_PATHS environment variable so that the core of flamapy knows where the plugins are located. Assuming both the flamapy_fw repo and the plugins are in the flamapy directory, run:

export PLUGIN_PATHS=~/flamapy/fm_metamodel/:~/flamapy/pysat_metamodel/:~/flamapy/bdd_metamodel/

Setting developer mode

Once the variable is defined, we can start the development environment:

cd flamapy_fw
make dev

This command:

  • Creates and activates a Python virtual environment
  • Installs development dependencies
  • Installs the core flamapy_fw
  • Installs plugins
  • Configures the specified plugins