After moving the required modules—hybrid_symbolic.py and utils.py—across from pyqg_parameterization_benchmarks, the first useful thing we can do is add some basic pythonic code quality measures:
Docstrings: make it clear to a general user what each function does and the arguments it requires.
Type-hinting: allows us to lint the code with mypy in order to make sure we don't pass arguments of the wrong type to any functions.
Apply Pylint: this means the code will comply with most up-to-date python encouraged practises PEP8, and will present in a standard and readable way.
Apply black: black is perhaps the most-used Python code formatter and will standardise the code's appearance across the entire repo, making it conform to a standard.
After moving the required modules—
hybrid_symbolic.py
andutils.py
—across frompyqg_parameterization_benchmarks
, the first useful thing we can do is add some basic pythonic code quality measures:mypy
in order to make sure we don't pass arguments of the wrong type to any functions.Pylint
: this means the code will comply with most up-to-date python encouraged practises PEP8, and will present in a standard and readable way.black
:black
is perhaps the most-used Python code formatter and will standardise the code's appearance across the entire repo, making it conform to a standard.