Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 1.76 KB

File metadata and controls

50 lines (32 loc) · 1.76 KB

Contributing to poli

Formatting: black Formatting: isort Linting: ruff Testing: pytest Testing: tox Main branch: main

This note details how to contribute to poli-baselines.

Setting up your dev environment

We recommend creating a fresh environment (with Python 3.10 for most solvers), installing the requirements-dev.txt, and the pre-commit hooks

pip install requirements-dev.txt
pre-commit install

Forking and making pull requests

The main development branch is main. To contribute, we recommend creating a fork of this repository and making changes on your version. Once you are ready to contribute, we expect you to document, lint and test.

Documentation standards

We follow numpy's documentation standards.

Linting your changes

Each commit will lint and format your changes using ruff, black and isort.

Testing your changes

Since we are multiple environments, we settled for using a combination of tox and pytest. We encourage you to add tests for your solver, and create a new testing environment inside tox.ini.

# To test both linting and logic (from the root of the project)
tox

If you want to test a specific environment, you can pass it with the -e flag. For example

tox -e lint

Create a pull request to main

Once all tests pass and you are ready to share your changes, create a pull request to the main branch.