Skip to content

Latest commit

 

History

History
49 lines (40 loc) · 1.13 KB

CONTRIBUTING.md

File metadata and controls

49 lines (40 loc) · 1.13 KB

Development Enviromnent

Virtual Environments

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

Dependencies and Tests

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/

Pre-commit Hooks

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