Thank you for your interest in okama and wanting to contribute. Your help is much appreciated.
Here are some guidelines for contributing.
Please refer to the RoadMap for a list of areas where okama could benefit from. In addition, the following is always welcome:
- Report bugs using Issues
- Request new functionality and enhancement in Discussions
- Improve performance of existing code
- Help us to write tests. If you learn about quantitative finance and/or unit testing in python it's a good place to start. Test coverage of okama could be verified at Coveralls.
Before you start coding your contribution, it may be wise to raise an issue on GitHub to discuss whether the contribution is appropriate for the project.
First off, you should create a fork. Within your fork, create a new branch. Depending on what you want to do, choose one of the following prefixes for your branch:
- fix: to be used for bug fixes
- feat: to be used for adding a new feature
Make your changes to the code, and write sensible commit messages.
In general Conventional Commits specification is recommended for the commits.
To keep everything consistent, please use Black with default settings.
Any contributions must be accompanied by unit tests (written with pytest
). These are very simple to write. Just find the relevant test file (or create a new one), and write some assert
statements. If you need a data presets please use tests/conftests.py fixtures. Tests should cover core functionality, warnings/errors (check that they are raised as expected), and limiting behaviour or edge cases.
We would appreciate if changes are accompanied by relevant documentation.
Inline comments (and docstrings!) are great when needed, but don't go overboard. A lot of the explanation can and should be offloaded to ReadTheDocs. Docstrings should follow PEP257 semantically. Okama uses sphinx
and "numpy" style generate Documentation automatically from docstrings.
Create a new Pull Request. Describe what your changes are in the Pull Request. If your contribution fixes a bug, or adds a features listed under issues as "#12", please add "fixes #12" or "closes #12".
If you have any questions related to the project, it is probably easiest to ask it in Discussions.
If you find any bugs, feel free to raise an issue include as many details as possible and follow the following guidelines:
- Descriptive title so that other users can see the existing issues
- Operating system, python version, and python distribution (optional)
- okama version you are using
- Minimal example for reproducing the issue
- What you expected to happen
- What actually happened
- error messages if applicable