Contribution Guidelines - HeloiseS/hoki GitHub Wiki

If you're fixing a bug

Thanks for helping improve the hoki experience! If you are fixing a small bug you found, please fork the repository and create a hot_patch_[mybug] branch from the current release branch.

Then fix the bug and add a test in the relevant test submodule so that the testing suite checks it doesn't occur again in the future.

Finally, create your Pull Request! Make sure to cite the relevant Issue number and provide a link as well.

If you're adding a larger code-base

Thanks for helping develop hoki! You can fork one of our dev repositories (the one with the highest version number) and start adding the features you would like to contribute.

Here are a few of the requirements we will check for when we review any pull request

UnitTest

Your code should be tested. Now we're not going to pretend that hoki is as tested as professional software, but you should create a basic suite of tests that ensure that your code runs and raises exceptions you the way you expect. This helps avoid introducing bug at later stages of development when adding or updating features.

If you are working within a specific subpackage (a.k.a subfolder), make sure you add your test to the tests folder within than subpackage. Each module should have its own testing module called test_mymodule.py within the tests folder.

Readability

You code should be easy to read for other Python developers - use explicit variable names and comment your code when things get complicated. If you were to read your code 1 year from now, would it still make sense? If not, add more comments.

Documentation

Docstrings should be in the numpy format (like the rest of the code) and if you add an exhaustive set of new features we will probably ask you to create a jupyter notebook tutorial that demonstrates the use of those features.

Dependencies

Try to rely and pre-existing dependencies as much as you can.