Skip to content

Refactoring and code quality #4

@jdenholm

Description

@jdenholm

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.
  • Apply pydocstyle with numpy convention.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions