Contributing to sbpy¶
If you are interested in contributing to
sbpy, you can do that
through testing existing code (somewhat easy), contributing Python
code (somewhat hard), or simply by letting us know what you think. We
are also interested in code donations: if you have code written in
Python or a different programming language and you think this code
might be useful to others, please let us know.
Communicating with the developers¶
We would prefer any communication with the development team to go
through the github issue system. This way, all
communications are centralized in one place and accessible to
sbpy issues can be posted here.
Another way to communicate in a less official way (if you don’t think your question or suggestion is worth being remembered in the far future) is the sbpy slack channel, which is part of the Astropy slack (see here for information on how to join).
We are looking for volunteers to test
sbpy functionality. In order
to make this task worthwhile for you, we only ask you to test routines
that are stable and which you can already use for your research. We
will indicate which functions are ready to be tested on this dedicated
Status Page. Keep in mind that there might be issues, so feel free to
compare the function results with your own results.
sbpy tests are run with
pytest. To install
pytest and all
requirements for testing:
pip install sbpy[test]
sbpy from the source tree in editable mode:
pip install -e .[test]
Then the tests may be run
pytest sbpy # or pytest sbpy --remote-data to enable tests requiring an internet connection
For more testing options, including testing multiple dependency versions,
astropy’s testing guidelines.
If you find a problem, please create an issue report. An issue report template is available there.
If you would like to implement (or modify) some functionality yourself, you are welcome to do so, but please make sure that your contribution meets the following rules and requirements.
Contributions must have general relevance to astronomers studying small solar System bodies, especially comets and asteroids.
Small contributions are welcome, especially if they can be extended in the future.
Highly specialized code with limited use cases is not within the scope of
Functionality that has a wider interest in astronomy should instead be considered by other Astropy affiliated packages or Astropy itself.
code must be accompanied by corresponding tests; 100% of the implemented tests must pass, a test coverage >= 90% is required; if possible, results should be checked against results from the literature
code must be accompanied by docstrings that describe the input and output parameters and includes example code, documentation, and at least one science task-oriented notebook that goes into the sbpy tutorial repository
the API used in the code must follow sbpy’s Design Principles:
consider class method names following the pattern
add references to docstrings, documentation, and tests where applicable; use
customized exceptions and warnings are encouraged, and should ultimately be derived from the base classes in
a CHANGELOG entry is required as of v0.2; update the Status Page where applicable
This is the proposed workflow for code contributions:
Before you write any code, please issue a Feature Request, fill out the form and submit it.
sbpyteam and any interested parties will discuss the proposal in the issue comments to (1) determine if it is within the scope of
sbpy, (2) to avoid duplication of effort and functionality, and (3) to determine what the best location within
A final decision on the proposal will be made by the
sbpycore team and, if accepted, coding may begin, and a pull request made.
To make your code compatible with the
sbpyAPI, please follow the Technical requirements for new code.
The pull request will be merged after it successfully passed a review process conducted by at least one
sbpycore developer team member.
Please also check out astropy’s contributing guidelines for a general introduction on coding techniques and additional hints.
Please follow the astropy code of conduct at any time.