Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 1.66 KB

CONTRIBUTING.md

File metadata and controls

38 lines (30 loc) · 1.66 KB

Contributing

Bug reports and contributions are always welcome ! If you wish to contribute a patch, please fork the project repo, create a branch on your copy, and open a pull request (PR) here when you're done.

To install all the necessary tooling for testing and validating your code locally, run

$ python -m pip install --requirement requirements/tests.txt
$ python -m pip install --requirement requirements/typecheck.txt

Fixing or adding code

We use the pytest framework to test AMICAL. Test files are located in amical/tests, and some sample data can be found in amical/tests/data.

Ideally, when fixing a bug or adding a feature, we advise you follow the test-driven development (TDD) workflow. In short, you should start by adding a failing test showing what doesn't work (or how what's missing should work), then patch the code until your new test pass, and finally refactor for code quality if needed.

Code formatting

The code format is validated and automatically fixed via the pre-commit framework, most notably running black, and flake8.

We recommend you install pre-commit on your working copy of the project, so validation/correction is performed at checkin time (on git commit invokation). If for any reason you cannot, and do not wish to use pre-commit locally, the validation will be performed automatically by the pre-commit.ci bot when you open a PR. Some gotchas may be reported by CI that cannot be autofixed, most likely by flake8.