We welcome PRs from the community. By contributing to TSInterpret, you agree that your contributions will be licensed under the LICENSE file in the root directory of this source tree.
- Resolve Issues/Bugs
- new Features/Methods
- fix typos, improve code quality, code coverage
- Fork the main branch from the GitHub repository.
- Clone your fork locally.
- Commit changes.
- Push the changes to your fork.
- Send a pull request from your fork back to the original main branch.
git clone https://github.com/fzi-forschungszentrum-informatik/TSInterpret.git
pip install -e .[dev]
Please add an extra branch for your development. Do not develop on the main branch.
- Pick a class from
FeatureAttribution
,InstanceBased
orInterpretabilityBase
, depending on the Algorithms Features. More information on the taxonomy can be found here. - Make sure you implement the required method
explain
. For Algorithms that inherit fromInterpretabilityBase
, you will also need to implementplot
. In all other cases a default plot function is available. - Add to
__init__
method. - If possible provide a default value for each parameter.
- Write a comprehensive docstring with example usage.
- Write tests in
./tests
. - Ideally, add a notebook with sample usage to
./docs/Notebooks
.
Before submitting a PR, run flake8, mypy and pyupgrade hooks before every commit with pre-commit run --all-files
. If there are errors, the commit will fail and you will see the changes that need to be made.
We use pytest to run tests. Run all tests :
pytest .
Test files can be found / should be added in folder ./tests.
- All functions/methods/classes/modules have docstrings and all parameters are documented.
- All functions/methods have type hints for arguments and return types.
- New functionality has tests.
- Documentation is built locally and checked for errors.
- For any new functionality or new examples, appropriate links are added.
- For any changes to existing algorithms, run the example notebooks and tests manually and check that everything still works.
- Any changes to dependencies are reflected in the appropriate place.
By contributing to TSInterpret, you agree that your contributions will be licensed under the LICENSE file in the root directory of this source tree.