Contributing
Follow these general instructions if you wish to contribute a new descriptor implementation to DScribe:
Contact the authors to discuss your idea for a new descriptor implementation.
Read the code style guideline (below).
Fork the repository and do all modifications within it.
Implement the descriptor as a class within a new module in dsribe/descriptors/. The descriptor class should inherit from the
DescriptorGlobal
orDescriptorLocal
class.Create new test module for the descriptor in dscribe/tests/. pytest is used as the testing framework and several test utilities can be found in dscribe/tests/conftest.py. Ensure that your new tests and the existing tests run succesfully. You can run the tests by first installing the developer dependencies by running
pip install -r dscribe/devrequirements.txt
, and then runningpytest tests
from the repository root folder.Create tutorial for the descriptor in dscribe/docs/src/tutorials. Follow the structure of the existing tutorials.
Create a pull request in GitHub.
Code style guideline
We follow the Black code style, which is PEP 8 compliant. The good thing about Black is that you can simply run the autoformatter to ensure that you fullfill the code style. Before committing (or using pre-commit hooks), you should simply run the automatic formatting. Any unformatted code will be caught by the style checks in CI.
Classes and functions should be documented by following the Google style guide that can be interpreted by the sphinx Napoleon-extension