Skip to content

Latest commit

 

History

History
82 lines (49 loc) · 3.05 KB

CONTRIBUTING.rst

File metadata and controls

82 lines (49 loc) · 3.05 KB

Contributing

Thanks for your interest in contributing to this package! No contibution is too small! We're hoping it can be made even better through community contributions.

Requests and feedback

For any bugs, issues or feature requests please open an issue on the project.

Requirements for contributions

We have some general requirements for all contributions. This is to ensure consistency with the existing codebase.

Set up development environment

For External contributors, first create your own fork of this repo.

Then clone the fork (or this repository if internal);

git clone https://github.com/lvgig/model_interpreter.git
cd model_interpreter

Then install tubular and dependencies for development;

pip install . -r requirements-dev.txt

We use pre-commit for this project which is configured to check that code is formatted with black

To configure pre-commit for your local repository run the following;

pre-commit install

If working in a codespace the dev requirements and precommit will be installed automatically in the dev container.

If you are building the documentation locally you will need the docs/requirements.txt.

General

  • Please try and keep each pull request to one change or feature only
  • Make sure to update the changelog with details of your change

Code formatting

We use black to format our code and follow pep8 conventions.

As mentioned above we use pre-commit which streamlines checking that code has been formatted correctly.

CI

Make sure that pull requests pass our CI. It includes checks that;

  • code is formatted with black
  • flake8 passes
  • the tests for the project pass, with a minimum of 80% branch coverage
  • bandit passes

Tests

We use pytest as our testing framework.

All existing tests must pass and new functionality must be tested. We aim for 100% coverage on new features that are added to the package.

We also make use of the test-aide package to make mocking easier and to help with generating data when parametrizing tests.

Docstrings

We follow the numpy docstring style guide.

Docstrings need to be updated for the relevant changes and docstrings need to be added for new methods.