-
Notifications
You must be signed in to change notification settings - Fork 0
chore(main): enforce & provide improved code comments #121
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
Conversation
Summary of ChangesHello @b-long, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on a maintenance update, specifically upgrading the version of the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates the version of the ruff-pre-commit hook from v0.14.6 to v0.14.8. While keeping dependencies up-to-date is a good practice, the pull request title, "chore(main): improve docstrings", is misleading as the changes do not involve docstring improvements. To maintain a clear and accurate commit history, I recommend updating the title to more accurately reflect the changes, for example: chore: Bump ruff pre-commit hook to v0.14.8.
960a110 to
4a0825a
Compare
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances code documentation by adding comprehensive module-level and function-level docstrings throughout the test suite and source code, converting multi-line docstrings to single-line format where appropriate, and configuring linting rules to enforce docstring standards.
Key Changes:
- Added module-level docstrings to all Python files
- Converted multi-line docstrings to single-line format following PEP 257
- Enhanced pyproject.toml with docstring linting rules (pydocstyle and pydoclint)
- Updated pre-commit configuration to use latest ruff version
Reviewed changes
Copilot reviewed 105 out of 105 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Added docstring linting rules and per-file ignores for test files |
| .pre-commit-config.yaml | Updated ruff version to v0.14.8 |
| tests/**/*.py | Added module and function docstrings throughout test suite |
| src/otdf_python/**/*.py | Added module docstrings and improved existing docstrings |
| support files | Added docstrings to support and configuration files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a significant improvement to the codebase by enabling more ruff linting rules, particularly for docstrings (pydocstyle), and applying the necessary fixes across the entire project. The changes are extensive, adding and reformatting docstrings to be compliant with PEP 257, which greatly enhances code clarity and maintainability. The updates to .pre-commit-config.yaml and pyproject.toml are well-structured and the gradual approach to enabling new rules is sensible. Overall, this is an excellent contribution to the project's quality. I have one minor suggestion for code simplification.
This pull request focuses on improving code quality, documentation, and development tooling for the OpenTDF Python SDK. The main changes include enforcing stricter linting and docstring standards, updating development dependencies, and enhancing code documentation and structure across several modules.
Linting, Docstrings, and Tooling Improvements:
pyproject.tomlto enforce stricter linting rules, including pydocstyle and pydoclint, set the target Python version to 3.10, and added per-file docstring rule ignores for tests and generated code. [1] [2]ruff-pre-commithook version in.pre-commit-config.yamlto v0.14.8.golang.gotocharliermarsh.ruffto align with Python linting. (.vscode/extensions.json)Code Documentation and Structure:
src/otdf_python/aesgcm.py,src/otdf_python/assertion_config.py,src/otdf_python/asym_crypto.py, andsrc/otdf_python/auth_headers.py. [1] [2] [3] [4]These changes collectively improve code maintainability, readability, and enforce consistent documentation practices throughout the codebase.