Contributing
We welcome contributions ! There are many ways to help. For example, you can:
- Help us track bugs by filing issues.
- Suggest and help prioritize new functionalities.
- Develop a new Probe or a new Model ! Fork the project and propose a new functionality through a pull request.
- Help us make the library as straightforward as possible, by simply asking questions on whatever does not seem clear to you.
Guidelines
1. Development installation
Ready to contribute? Here's how to set up edsteva
for local development.
- Fork the
edsteva
repo. -
Clone your fork locally:
-
Optional, create a virtual environment:
-
Install Poetry (a tool for dependency management and packaging in Python):
For more details, check the installation guide
-
Install dependencies:
-
Create a branch for local development:
2. Style guide
We use Black to reformat the code. While other formatter only enforce PEP8 compliance, Black also makes the code uniform.
Tip
Black reformats entire files in place. It is not configurable.
Moreover, the CI/CD pipeline enforces a number of checks on the "quality" of the code. To wit, non black-formatted code will make the test pipeline fail. To make sure the pipeline will not fail because of formatting errors, we added pre-commit hooks using the pre-commit
Python library. To use it, simply install it:
The pre-commit hooks defined in the configuration will automatically run when you commit your changes, letting you know if something went wrong.
The hooks only run on staged changes. To force-run it on all files, run:
3. Testing your code
We use the Pytest test suite. Writing your own tests is encouraged !
The following command will run the test suite:
Should your contribution propose a bug fix, we require the bug be thoroughly tested.
4. Documentation
Make sure to document your improvements, both within the code with comprehensive docstrings, as well as in the documentation itself if need be.
We use MkDocs
for EDS-TeVa's documentation. You can checkout the changes you make with:
Go to localhost:8000
to see your changes. MkDocs watches for changes in the documentation folder
and automatically reloads the page.
5. Proposing a merge request
At the very least, if your changes are well-documented, pass every tests, and follow the style guide, you can:
-
Commit your changes and push your branch:
-
Submit a pull request.