-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Pre-Commit and Code-Standards
Recently PyGromosTools has seen a big increase in users and therefore in added code. This is amazing! However, the increase in code also came with many different coding styles. To keep the Repo clean we decided to enforce some coding style guidelines and use pre-commit to keep it clean.
Pre-commit
Pre-commit will format your code according to some standards and run on every PR. Since PR #221 pre-commit is added to the CI and has to pass before new code is accepted for review. But in the current setting of pre-commit are only minimal styling setting included and for example no PEP8. The reason being, that PyGromosTools is not written according to the standards and some functions break with the pre-commit checks.
New Standards
For a clean and future proof repo it's important to adhere to these standards. Therefore we must du some rework to clean the repository.
These include:
- no * imports (no exceptions)
- PEP8
- consistent and descriptive naming schemes
- consistent and logical typing
- descriptive, numpy-style function documentation
- clean Notebooks (no metadata, no local paths, no "on-my-machine-it-works")
- A style guide to describe all these standards
- pre-commit-conf adjustment to enforce all these strict rules
Discussion
All these points and there enforcement can be discussed, while we write the style guide together. And all opinions are welcome.