Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.52 KB

CONTRIBUTING.md

File metadata and controls

43 lines (30 loc) · 1.52 KB

Contributing

Thank you for contributing to this project!

Feel tree to raise tickets on any issues you find with the project.
If you would like to contribute code, see the open issues for something to work on, or open up a PR.

Setup

If you are using conda, run conda env create --file=environment.yml. This will create a conda environment called alphadraughts.

Continuous Integration

This project uses Travis for continuous integration. Travis will run tests on all opened PRs.

The tests run as follows:

  • Code quality
  • Unit tests
    • Test board and game logic

Tests are currently only run using Python 3.7 on an Ubuntu Bionic Beaver machine.

Testing

This project uses PyTest as a unit testing framework.
To run all tests, run python -m pytest when in the top level (repository) directory.

Please add unit tests for any code affecting the draughts package. Don't unit test machine learning code.

Code quality

Black and isort is used to automatically format code. Either run isort -rc . and black . in the top level directory, or use pre-commit.

To set up pre-commit, run pre-commit install on the command line. Now code will automatically be formatted every time a commit is made.