Skip to content

Update contributing.md for namespace#3353

Merged
chris-ashe merged 4 commits intomainfrom
update_contributing.md_for_namespace
Oct 30, 2024
Merged

Update contributing.md for namespace#3353
chris-ashe merged 4 commits intomainfrom
update_contributing.md_for_namespace

Conversation

@chris-ashe
Copy link
Copy Markdown
Collaborator

@chris-ashe chris-ashe commented Oct 22, 2024

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:

  • Pull Request Template: Added a checkbox to confirm that changes follow the PROCESS style guide. (.github/pull_request_template.md)
  • Contributing Guide: Updated to include a reference to the PROCESS style guide for naming variables and functions. (CONTRIBUTING.md)

Style Guide Enhancements:

  • Style Guide Introduction: Added an introduction to the PROCESS style guide, including adherence to PEP8 for Python and namespace style. (documentation/proc-pages/development/standards.md)
  • Naming Conventions: Expanded section on naming conventions for functions, switches, constants, and variables, including guidelines for variables representing fractions. (documentation/proc-pages/development/standards.md)
  • Units and Types: Updated examples and conventions for units and type hints in Python, as well as added new sections for docstrings and comments. (documentation/proc-pages/development/standards.md)

Navigation Update:

  • MkDocs Configuration: Changed the navigation label from "Reference" to "Models" in the documentation site configuration. (mkdocs.yml)

Checklist

I confirm that I have completed the following checks:

  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

- 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
@chris-ashe chris-ashe added the Documentation Improvements or additions to documentation label Oct 22, 2024
@chris-ashe chris-ashe requested a review from jonmaddock October 22, 2024 12:24
@chris-ashe chris-ashe self-assigned this Oct 22, 2024
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 22, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 28.00%. Comparing base (b68ac63) to head (44ec8c2).
⚠️ Report is 620 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@jonmaddock jonmaddock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this Chris, I appreciate it. Some minor clarifications please.

Comment thread documentation/proc-pages/development/standards.md
### 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread documentation/proc-pages/development/standards.md
Comment thread documentation/proc-pages/development/standards.md Outdated
- 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.
Copy link
Copy Markdown
Contributor

@jonmaddock jonmaddock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brilliant Chris, I think you've addressed everything apart from the conflicting docstring formats. Much clearer!

Comment thread documentation/proc-pages/development/standards.md Outdated
@chris-ashe chris-ashe merged commit 22d32a6 into main Oct 30, 2024
@chris-ashe chris-ashe deleted the update_contributing.md_for_namespace branch October 30, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants