Update contributing.md for namespace#3353
Conversation
- Update pull_request_template.md to include following PROCESS style guide - Update CONTRIBUTING.md to ensure implementation follows PROCESS style guide for names of variables and functions Update development standards documentation - Add information about Python PEP8 style guide and its compatibility with Fortran90 - Add guidelines for line length and double declarations - Add guidelines for naming conventions of functions, switches, constants, and variables - Add guidelines for length, physical type, coordinates and dimensions, and units - Add guidelines for docstrings and code documentation using FORD Update mkdocs.yml - Update navigation structure by renaming "Reference" section to "Models" and reorganizing sub-sections
- Updated the standards.md file to clarify the naming conventions for variables, including the use of underscores and capital letters for unit differentiations. - Added a prefix "f_" for variables representing fractions. - Included a reminder to use SI units unless otherwise stated. - Added a section on type hints and referenced PEP-484 for guidance. - Updated the docstring templates for functions and classes. - Added guidelines for comments. Fixes #940
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3353 +/- ##
==========================================
+ Coverage 27.11% 28.00% +0.88%
==========================================
Files 76 76
Lines 17736 18789 +1053
==========================================
+ Hits 4810 5261 +451
- Misses 12926 13528 +602 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jonmaddock
left a comment
There was a problem hiding this comment.
Thanks for doing this Chris, I appreciate it. Some minor clarifications please.
| ### Switches | ||
|
|
||
| Switches should start with the `i_` prefix in their name, be of integer type and should be indexed from 0. | ||
| Switches should by their nature not override other switches. |
There was a problem hiding this comment.
Could you clarify this? There are current cases (and legitimate future ones) where defining a switch as one value means that others are ignored or are invalid. Perhaps something could be stated about these scenarios being caught, so switches aren't tacitly ignored in this case, but instead should throw exceptions?
- Adjusted the maximum line length to 79 characters, following PEP8 recommendations, to improve readability and prevent scrolling. - Updated naming conventions for switches and constants. - Added guidelines for variable names related to fractions and constraint equations. - Provided documentation style guidelines, including the use of Google-style docstrings and recommended VSCode extensions.
jonmaddock
left a comment
There was a problem hiding this comment.
Brilliant Chris, I think you've addressed everything apart from the conflicting docstring formats. Much clearer!
This pull request introduces several updates to the documentation and templates to ensure adherence to the PROCESS style guide and improve overall readability and consistency. The most important changes include adding references to the PROCESS style guide in various files, expanding the style guide documentation, and updating naming conventions in the codebase.
Documentation and Templates Updates:
.github/pull_request_template.md)CONTRIBUTING.md)Style Guide Enhancements:
documentation/proc-pages/development/standards.md)documentation/proc-pages/development/standards.md)documentation/proc-pages/development/standards.md)Navigation Update:
mkdocs.yml)Checklist
I confirm that I have completed the following checks: