How to contribute¶
The general way to contribute to Asteroid is to fork the main repository on GitHub:
- Fork the main repo and
- Make your changes, test them, commit them and push them to your fork.
- You can open a pull request on GitHub when you’re satisfied.
Things don’t need to be perfect for PRs to be opened.
If you made changes to the source code, you’ll want to try them out without
installing asteroid everytime you change something.
To do that, install asteroid in develop mode either with pip
pip install -e .[tests] or with python
python setup.py develop.
To avoid formatting roundtrips in PRs, Asteroid relies on ``black` <https://github.com/psf/black>`_
and ``pre-commit-hooks` <https://github.com/pre-commit/pre-commit-hooks>`_ to handle formatting
for us. You’ll need to install
requirements.txt and install git hooks with
Here is a summary:
### Install git clone your_fork_url cd asteroid pip install -r requirements.txt pip install -e . pre-commit install # To run black before commit # Make your changes # Test them locally # Commit your changes # Push your changes # Open a PR!
Source code contributions¶
All contributions to the source code of asteroid should be documented and unit-tested. See here to run the tests with coverage reports. Docstrings follow the Google format, have a look at other docstrings in the codebase for examples. Examples in docstrings can be bery useful, don’t hesitate to add some!
Writing new recipes.¶
Most new recipes should follow the standard format that is described here. We are not dogmatic about it, but another organization should be explained and motivated. We welcome any recipe on standard or new datasets, with standard or new architectures. You can even link a paper submission with a PR number if you’d like!
Improving the docs.¶
If you found a typo, think something could be more explicit etc… Improving the documentation is always welcome. The instructions to install dependencies and build the docs can be found here. Docstrings follow the Google format, have a look at other docstrings in the codebase for examples.
We use [pre-commit hooks][../.pre-commit-config.yaml] to format the code using
The code is checked for
flake8- compliance on every commit with
GitHub actions. Remember, continuous integration is not here to be all green,
be to help us see where to improve !