Skip to content

Latest commit

 

History

History
104 lines (78 loc) · 4.16 KB

CONTRIBUTING.rst

File metadata and controls

104 lines (78 loc) · 4.16 KB

Contributing

HoloSpy is meant to be a community maintained project. We welcome contributions in the form of bug reports, documentation, code, feature requests, and more. In the following we refer to some resources to help you make useful contributions.

Issues

The issue tracker can be used to report bugs or propose new features. When reporting a bug, the following is useful:

  • give a minimal example demonstrating the bug,
  • copy and paste the error traceback.

Pull Requests

If you want to contribute to the HoloSpy source code, you can send us a pull request. Small bug fixes or corrections to the user guide are typically a good starting point. But don't hesitate also for significant code contributions - if needed, we'll help you to get the code ready to common standards.

Please refer to the HyperSpy developer guide in order to get started and for detailed contributing guidelines.

The :doc:`kikuchipy contributors guide <kikuchipy:dev/index>`, another HyperSpy extension, also is a valuable resource that can get you started and provides useful guidelines.

Reviewing

As quality assurance, to improve the code, and to ensure a generalized functionality, pull requests need to be thoroughly reviewed by at least one other member of the development team before being merged.

Documentation

The HoloSpy documentation consists of three elements:

Improving documentation is always welcome and a good way of starting out to learn the GitHub functionality. You can contribute through pull requests to the respective repositories.

Code style

HoloSpy follows Style Guide for Python Code with The Black Code style.

For docstrings, we follow the numpydoc standard.

Package imports should be structured into three blocks with blank lines between them:

  • standard libraries (like os and typing),
  • third party packages (like numpy and hyperspy),
  • and finally holospy imports.

Writing tests

All functionality in HoloSpy is tested via the pytest framework. The tests reside in the test directory. Tests are short methods that call functions in HoloSpy and compare resulting output values with known answers. Please refer to the HyperSpy development guide for further information on tests.

Releasing a new version

HoloSpy versioning follows semantic versioning and the version number is therefore a three-part number: MAJOR.MINOR.PATCH. Each number will change depending on the type of changes according to the following:

  • MAJOR increases when making incompatible API changes,
  • MINOR increases when adding functionality in a backwards compatible manner, and
  • PATCH increases when making backwards compatible bug fixes.

The process to release a new version that is pushed to PyPI and Conda-Forge is documented in the Releasing guide.