Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.36 KB

DEVELOPERS.md

File metadata and controls

45 lines (31 loc) · 1.36 KB

Developers' Guide

Design Paradigma

Objects should be immutable whenever possible -- this allows us to avoid unintended side effects. Never trust the user's input -- check all passed arguments carefully.

Code must work with all current Python versions from 3.9 to 3.12. Also, code must work on all major platforms: Windows, Linux, and Mac OSX.

Code Style Guide

  • Please follow the suggestions made by Pylint and Flake8 -- violations require good justification!

  • Docstrings must be written in Numpy-docstring style.

  • Naming convention for variables and methods is to use lower_case_with_underscores and CapitalizedWords for class names.

  • Use type hints.

Tests

  • Tests are implemented using pytest and stored in tests/.

  • Any implemented feature must come with corresponding tests.

  • Nox is used to test different Python versions -- see noxfile.py.

Building the documentation

  1. Install all REQUIREMENTS listed in requirements.txt by running:
pip install -r docs/requirements.txt
  1. Install the WaterBenchmarkHub by running:
pip install .
  1. Build the HTML files by running:
make html
  1. Build the PDF file by running
make latexpdf