Skip to content

Development environment

Steve Wardle edited this page Oct 28, 2021 · 2 revisions

There are various ways to initialise a local environment to develop Fab, but we will collect the ones we are currently using here for now as a reference. Longer term we expect to implement a more streamlined method for installation (e.g. a proper Conda manifest/recipe)

Creating a development environment with Conda + pip

To create a new conda environment named fab with the required packages the following set of commands can be used:

conda create -n fab python=3.8 flake8 pytest pytest-mock pytest-cov libclang python-clang mypy

(and then activate the new environment with conda activate fab)

And then you will need to "install" your working copy of Fab using the setup.py:

python setup.py install

(you can also use develop rather than install which will point the environment directly at your working copy)

Running tests and checks locally

To replicate what the Github Actions will run on push/PR you can do the following:

flake8 source system-tests unit-tests setup.py

mypy source system-tests unit-tests setup.py

pytest

Clone this wiki locally