We welcome contributions from the community and are pleased to have you join us. This document is intended to help you understand the process for contributing to the project, setting up your development environment, and ensuring that your contributions adhere to our coding standards.
Before you can contribute to the project, you need to set up your development environment. Here are the steps to do so:
Start by cloning the repository to your local machine:
git clone https://github.com/TRAIS-Lab/dattri.git
cd dattri
Install the necessary dependencies:
pip install -e .
We use pre-commit hooks to ensure that your contributions adhere to our code standards. To set up pre-commit hooks in your local repository, follow these steps:
pip install pre-commit
pre-commit install
When you're ready to make changes, please follow these steps:
Create a new branch for your changes:
git checkout -b your-feature-branch
Implement your feature or fix bugs and make sure that your changes are well documented.
Run pytest test/<your test file>
on the test files you implemented (if applicable).
Before committing your changes, pre-commit hooks will automatically run when you attempt to make a commit with the following command:
git commit -m "Add a detailed commit message"
You will see something like this:
Trim Trailing Whitespace.................................................Passed
Fix End of Files.........................................................Passed
Check Yaml...........................................(no files to check)Skipped
Check for added large files..............................................Passed
ruff.................................................(no files to check)Skipped
ruff-format..........................................(no files to check)Skipped
[fix-pr-template 9323f57] fix pr template
1 file changed, 1 insertion(+), 1 deletion(-)
Make sure all hooks pass. If any hooks fail, you will need to address the failures and try committing again.