Skip to content

Pre-Commit and Code-Standards  #227

@MTLehner

Description

@MTLehner

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions