For development of BoFire, we recommend to use a virtual environment, e.g., venv as follows:
-
Linux
# init python -m venv .venv # activate source .venv/bin/activate
-
Windows
python -m venv .venv .venv/Scripts/activate.bat
To install dependencies and run unit tests, activate your environment first.
- Linux
source .venv/bin/activate
- Windows
.venv/Scripts/activate.bat
You can install all dependencies and BoFire in editable mode via
pip install -e .[testing]
Afterwards, you can check that the tests are successful via
pytest tests/
We use Black, Flake8, and Isort as pre-commit hooks. Further, we use corresponding checks in the Github pipeline. To install the
pre-commit hooks defined in .pre-commit-config.yaml
, you can proceed as follows.
pip install pre-commit
pre-commit install