To get the development installation follow the Development
section from
README.md
.
Captum uses black
and pylint
to enforce a common code style across the code
base and is enforced by pre-commit
hooks and CI pipeline.
FoXAI is fully typed. We expect any contributions to also use proper type
annotations and we enforce these in our pre-commit
checks.
To run the unit tests, you should use pre-commit
:
pre-commit run pytest
FoXAI's documentation is build using Sphinx and relies on docstrings. Therefore we make sure that all functions, classes and methods have coresponding documentation. We use Google Python style guide.
We actively welcome pull requests. Ordinary pull requests are accepted only to the
develop
branch, main
branch is designed only for release PRs.
- Fork the repo and create your branch from
develop
. - Make changes to the code.
- Add unit tests.
- Update the documentation.
- Make sure that tests passes.
- Make sure your code passes
pre-commit
checks. - If you have changed API or class names make sure examples from notebooks are still working.
To bump version of a dependency or test if changes are working in different
environment you should use GitHub Actions workflow called
Manual Installation test
.
First, create PR to the develop
branch, add
selection option with dependency you would like to test by modifying
.github/workflows/installation_test_manual_run.yaml
,
.github/workflows/installation_test_called_workflow.yaml
, and
.github/actions/build-module/action.yaml
files, commit, and push
to the repository.
Next, go to the repository page > Actions
>
Manual Installation test
> Run workflow
> select your branch > select
versions > Run workflow
.
Remember to attach links to the workflow runs to the PR comment or description.
In installation_test_manual_run.yaml
you should add selecting
dependencies version in on
> workflow_dispatch
> inputs
and provide
them as environment variables in job
> foxai
> with
.
In the installation_test_called_workflow.yaml
file you should add
environment variables to on
> workflow_calls
> inputs
and to jobs
>
foxai
> steps
> env
which will be used in action.yaml
script.
In action.yaml
file you should add lines with
installation of given dependency version explicite after poetry install
.
Branch main
is dedicated to releases only and is intended to be stable. Release
is done by PR from develop
branch into the main
branch. After merge is
completed tag should be added to given commit.
Release PR will be additionally tested with GitHub CI jobs against matrix of versions including Python, CUDA and core libraries versions.
We encourage you to report bugs using GitHub issues. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue.
By contributing to FoXAI, you agree that your contributions will be licensed under the LICENSE file in the root directory of this source tree.