Skip to content

Latest commit

 

History

History
71 lines (46 loc) · 1.7 KB

developer.md

File metadata and controls

71 lines (46 loc) · 1.7 KB

Developer guide

Instructions for good practises when developing python code. Make sure you have installed the developer requirements:

pip install -r requirements.txt

Running tests

We use pytest for unit testing. Simply use the pytest command:

pytest

Writing Documentation

Before being accepted into master all code should have well writen documentation. Please use Google Style Python Docstrings.

We are using mkdocs. The docs can be generated locally as follows:

mkdocs serve

Adding and updating existing documentation is highly encouraged.

Docker

Docker is great for reprodicible research. You can pull the latest docker image to run our code:

docker pull patrickohara/pctsp:latest

Alternatively you can build the docker file as follows:

docker build -t patrickohara/pctsp:latest .

To re-build the base SCIP image:

docker build -t patrickohara/scip:latest -f scip.dockerfile .

Linting

Keeps the code neat and tidy. We use pylint and mypy.

You can change pylint settings in the .pylintrc file.

Some of the smaller linting issues can be cured by running the black formatter:

black */

Type hinting

We are moving towards adding type hints so you may optionally add types to your code. In which case you do not need to include types in your google style docstrings.