-
Notifications
You must be signed in to change notification settings - Fork 14
Description
We don't currently specify the code style convention we want the package code to adhere to. Ideally we should settle on something and document this to make it easy for contributors to know what to target when proposing changes and to ensure we are consistent across the repository to improve readability. This has come up as part of @ASKabalan's contributions in #204.
Currently I think we are mainly following PEP8 guidelines and this is probably the most commonly used convention in open-source Python projects so I would personally suggest adopting this. Alternatives include the Google Python style guide.
Related to this, to simplify keeping to a standard style, it would be good to adopt a specific formatter which enforces our chosen style conventions - as an additional check as part of the CI workflows and/or by setting up pre-commit hooks to automatically run the formatter on any commits. My suggestion for a formatter would be the Ruff formatter as its very performant so minimizes overhead when formatting and uses the same formatting rules as Black which is widely used.
Tagging @jasonmcewen and @CosmoMatt for their views.