Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring and code quality #4

Open
jdenholm opened this issue Feb 28, 2023 · 0 comments
Open

Refactoring and code quality #4

jdenholm opened this issue Feb 28, 2023 · 0 comments
Assignees

Comments

@jdenholm
Copy link
Contributor

jdenholm commented Feb 28, 2023

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant