Chapter 5

Development

This section contains the documentation to get started with plugin development and Hermes “core” contribution.

Logging

A Logger instance is available through the variable “__hermes__.logger”. As this var is declared as builtin, it is always available and doesn’t require any import or call to logging.getLogger().

Contributing

Before submitting a pull request to merge some code in Hermes, you should ensure that:

  1. it provides docstrings and type hints
  2. it has been formatted with black
  3. it is compliant with Flake8
  4. your code doesn’t break the test suite

tox may be used to validate the last three conditions, by running one of the commands below :

# Testing sequentially (slow but more verbose) only on default python version available on your system
tox run -e linters,tests
# Testing in parallel (faster, but without details) only on default python version available on your system
tox run-parallel -e linters,tests

# Testing sequentially (slow but more verbose) on all compatible python versions - they must be available on your system
tox run
# Testing in parallel (faster, but without details) on all compatible python versions - they must be available on your system
tox run-parallel
Tip

tox >= 4 must be installed but is probably available in your distribution’s repositories