Skip to content

Conversation

@nhairs
Copy link
Owner

@nhairs nhairs commented Jun 26, 2025

The guide covers:

  • Use of automated formatters/linters (Black, Pylint, MyPy).
  • Import organization.
  • Naming conventions.
  • Type hinting requirements.
  • Docstring standards (Google style via mkdocstrings) with version markers.
  • Rule for explicit return statements.
  • Class structure and internal code commenting conventions.
  • Common code patterns (versioning, TypeAlias, custom exceptions, utils).

google-labs-jules bot and others added 4 commits June 26, 2025 09:40
This commit introduces STYLE_GUIDE.md in the docs/ directory to outline
coding conventions, patterns, and best practices for the project.

Key changes from any previous (uncommitted) versions:
- Moved the style guide to `docs/STYLE_GUIDE.md`.
- Added a dedicated 'Testing' section with expanded guidelines on:
  - Test location and naming.
  - Use of Pytest fixtures (e.g., `LoggingEnvironment` pattern).
  - Test parametrization.
  - Writing clear, focused, and robust test cases.
- Clarified Markdown heading usage versus internal code comment sectioning.

The guide covers:
- Use of automated formatters/linters (Black, Pylint, MyPy).
- Import organization.
- Naming conventions.
- Type hinting requirements.
- Docstring standards (Google style via mkdocstrings) with version markers.
- Rule for explicit return statements.
- Class structure and internal code commenting conventions.
- Common code patterns (versioning, TypeAlias, custom exceptions, utils).
This commit implements several improvements to the project's style guide
and its integration into the contribution process:

1.  **Style Guide Content and Structure (`docs/style-guide.md`):**
    *   Reordered sections for better logical flow.
    *   Added references to PEP 8 and PEP 20 (Zen of Python) under
        'General Principles'.
    *   Refined rules to differentiate between general Python best
        practices and project-specific conventions (e.g., import
        grouping, `TypeAlias` usage, explicit returns, version markers
        in docstrings, `LoggingEnvironment` test pattern).
    *   Removed some overly common Python rules to reduce verbosity.
    *   Clarified naming for 'Project-Specific Code Patterns and Idioms'
        and added the conditional import pattern.

2.  **File Renaming:**
    *   Renamed `docs/STYLE_GUIDE.md` to `docs/style-guide.md` to match
        the naming convention of other documentation files.

3.  **Contributing Guide Update (`docs/contributing.md`):**
    *   Added a new 'Coding Style' subsection under 'Fork the repository
        and make your changes'.
    *   This new subsection explicitly directs contributors to read and
        adhere to the `docs/style-guide.md`.
@nhairs nhairs merged commit f36b8b5 into main Jun 26, 2025
4 checks passed
@nhairs nhairs deleted the jules-style-guide-revised branch June 26, 2025 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants