Thanks for thinking about contributing!
Please only make one change or add one feature per Pull Request (PR). Limit the scope of your PR so that it makes small, manageable size changes.
To help us integrate your changes, please follow our standard process:
Pre-condition:
- Make sure you have chatted to the judgyprophet team and let them know what you're planning, in case something similar is already in the works.
Dev Process:
- Make a new issue (or use an existing one). You will need the issue number when you create a branch.
- Clone this repo
- Create a new branch. The branch name must include the issue number.
- Install
judgyprophet
in development mode by runningpoetry install
. This installspytest
for running tests, as well as the linters we use (pylint
andflake8
). - We are using pre-commit hooks to ensure code formatting and linting is done with every commit. Formatting is performed using the
black
package. To enable pre-commit settings, install the repo settings by running:pre-commit install
- Make your changes in small, logically grouped commits (this makes it easier to review changes)
- document your code as you go
- add integration tests for your code in the same style as the current tests (using test data that explicitly isolates the new feature)
- Run tests and check they all pass using pytest:
pytest tests/
. When your changes are made, build the dockerfile and check the tests run there by usingdocker build -t judgyprophet
followed bydocker run
. - Update the documentation with your changes
- Documentation is created using mkdocs
- add new classes or modules to api docs
- add new/changed functionality to the tutorials or quickstart
- Check added documentation can be properly rendered by using
mkdocs serve
and checking rendered docs.
- When finished, make a Pull Request (PR)
- Describe change and clearly highlight any major or breaking changes
- You are responsible for getting your PR merged so please assign reviewers and chase them to do the review
- Adjust your PR based on any feedback
- After approval, you are responsible for completing your PR
We use Sphinx style docstrings
- Include type hinting in method signatures
- Include return types
We loosely follow the pep8 style conventions, and use flake8
's bundled pycodestyle
to check against these. We also use the pylint
linter, aiming to fix any issues flagged as warning or above.
Instead of print statements, use the python logging module to print to the user.
Use pathlib for easier and safer file paths:
Use pytest for running tests
This is on the roadmap. It is not currently done.