Developer’s Guide#
Coding Style#
Code Formatting#
The code of the package is formatted using the tools black and isort. This ensures that the code across the package has a consistent appearance.
Documentation Strings#
Documentation strings (docstrings) follow the Docstring Standard from the numpy Style guide. This standard describes how the content of docstrings is organized. Docstring are written using reStructuredText markup syntax and are rendered into documentation using Sphinx.
Function Annotations/Type Hints#
Functions annotations are used to document the types of function’s parameters and return values. This enables users of the package to use external tools like mypy to help ensure that they’re using the package properly. Python’s typing module is used to support the annotations.
Testing#
Testing is performed with continuous integration using github actions. Testing is performed with python versions 3.8 through 3.12. Testing consists of the following:
Run the source code through black and isort to verify that the desired code formatting is adhered to.
Run the source code through flake8, which analyzes the code and detects various errors.
Run the source code through mypy, to ensure that variable types are used appropriately throughout the package.
Run unit tests, located in the tests subdirectory. The unit tests include creating catalogs from internally generated input files and verifying that the generated catalogs match baseline catalogs that are included in the repository.