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

Pre-Commit and Code-Standards #227

Open
5 of 8 tasks
MTLehner opened this issue Feb 25, 2022 · 2 comments
Open
5 of 8 tasks

Pre-Commit and Code-Standards #227

MTLehner opened this issue Feb 25, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request in progress

Comments

@MTLehner
Copy link
Collaborator

MTLehner commented Feb 25, 2022

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.

@MTLehner MTLehner added enhancement New feature or request in progress labels Feb 25, 2022
@MTLehner MTLehner self-assigned this Feb 25, 2022
@MTLehner
Copy link
Collaborator Author

@MTLehner MTLehner mentioned this issue Feb 25, 2022
1 task
@pultar
Copy link
Collaborator

pultar commented Feb 25, 2022

I like that approach and am happy to contribute. We could also clean up some folder / files. For example, why do we need this folder:

https://github.com/rinikerlab/PyGromosTools/tree/main/examples/dev

That might be something that people keep on their local machine for development and local testing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in progress
Projects
None yet
Development

No branches or pull requests

2 participants