HERA-Team / hera_cc_utils

MIT License
0 stars 1 forks source link

Add pre commit hook to repo, which checks flake8 and black formatting #4

Closed plaplant closed 3 years ago

plaplant commented 3 years ago

This PR adds a pre-commit hook to the repo, which should help keep formatting consistent throughout the repo. The pre-commit hook checks include flake8 and black. I have also added docstrings to all public classes and functions. Though I believe them to be correct, they should be checked in detail (e.g., that the units mentioned are correct).

One top-level change this PR includes is renaming map.py -> mapping.py, to avoid a potential namespace conflict with the python builtin map.

For developers, in the top-level directory, please run:

pre-commit install

This may require installing pre-commit first:

pip install pre-commit

This installation will then automatically run pre-commit before committing files.