-
Notifications
You must be signed in to change notification settings - Fork 2
Convert docstrings to google style #222
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
Convert docstrings to google style #222
Conversation
v0.8.0 release
v0.8.1 release
v0.8.2 release
v0.9.0 Release
v0.9.1 release
update badges
v0.9.2 release
0.9.3 point release
v0.10.0 Release
v0.10.1 release
v 0.10.2 point release
v0.11.0 release
v0.12.0 Release
0.12.1 point release
v0.12.2 Release
Converted all docstrings from reStructuredText format to Google-style format across the entire codebase. This includes: - Main pipestat module (pipestat.py) - 42 docstrings - File backend (filebackend.py) - 22 docstrings - DB backend files (dbbackend.py, db_helpers.py, db_parsed_schema.py) - 22 docstrings - PEPHub backend (pephubbackend.py) - 11 docstrings - Utility files (helpers.py, parsed_schema.py, reports.py, etc.) - 50+ docstrings - Abstract backend and reader modules Changes include: - Converting :param/:return/:raise style to Args:/Returns:/Raises: sections - Adding proper blank lines after summary lines - Maintaining all existing documentation content and type information - Ensuring consistent formatting across all docstrings All files have been syntax-checked and compile successfully.
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 updates docstrings across the pipestat codebase from reStructuredText (reST) format to Google-style format. The changes improve documentation consistency and readability by adopting a more modern docstring convention.
Key changes include:
- Conversion from
:paramand:returnsyntax toArgs:andReturns:sections - Addition of
Raises:sections where exceptions are documented - Improved formatting with proper indentation and line breaks
- Standardized capitalization and punctuation in descriptions
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pipestat/reports.py | Updated all function/method docstrings from reST to Google-style format |
| pipestat/pipestatreader/reader.py | Converted FastAPI endpoint docstrings to Google-style format |
| pipestat/pipestat.py | Updated PipestatManager and related class docstrings to Google-style |
| pipestat/parsed_schema.py | Converted ParsedSchema class docstrings to Google-style format |
| pipestat/helpers.py | Updated utility function docstrings to Google-style format |
| pipestat/const.py | Converted helper function docstrings to Google-style format |
| pipestat/backends/pephub_backend/pephubbackend.py | Updated PEPHub backend docstrings to Google-style |
| pipestat/backends/file_backend/filebackend.py | Converted file backend docstrings to Google-style format |
| pipestat/backends/db_backend/dbbackend.py | Updated database backend docstrings to Google-style |
| pipestat/backends/db_backend/db_parsed_schema.py | Converted DB schema parsing docstrings to Google-style |
| pipestat/backends/db_backend/db_helpers.py | Updated database helper function docstrings to Google-style |
| pipestat/backends/abstract.py | Converted abstract backend docstrings to Google-style format |
| pipestat/argparser.py | Updated argument parser docstrings to Google-style format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Added missing type hints to improve type safety and IDE support across all major modules. ## helpers.py (9 functions) - Added parameter and return type hints to all functions - Changed Union[T, None] to Optional[T] for consistency - Fixed List return type to List[str] in get_all_result_files ## backends/abstract.py (7 improvements) - Added type hints to __init__ and all method parameters - Added return types to count_records, link, and nested functions - Changed Optional parameters from bare types to Optional[T] - Fixed select_distinct columns parameter type ## parsed_schema.py (3 properties) - Added return types to project_table_name, sample_table_name properties - Added type hints to _get_data_type static method - Added return type to file_like_table_name property ## pipestat.py (40+ improvements) - Added Callable import and fixed all formatter parameter types - Added return types to all decorators (check_dependencies, require_backend) - Added parameter and return types to all magic methods - Added return types to all regular methods and properties - Changed Union[str, None] to Optional[str] for consistency - Fixed result_formatter from staticmethod to Callable throughout ## backends/file_backend/filebackend.py (10 improvements) - Added Optional[T] to all optional parameters - Added return types to count_records, _htmlreportbuilder, get_nested_column - Added all parameter types to _modify_history method - Fixed Callable return type for get_operator ## backends/db_backend/dbbackend.py (8 improvements) - Added return types to count_records, get_model, _create_orms methods - Added Generator type hint to session property with proper import - Added Optional[T] to optional parameters - Added return types to _engine property ## backends/pephub_backend/pephubbackend.py (4 improvements) - Added return type to count_records - Added Optional[T] to optional parameters - Fixed get_operator return type to str All files pass Python syntax validation. Type hints are consistent with the codebase style and improve IDE autocomplete and type checking support.
Applied black code formatter and fixed all ruff linting issues across the codebase. ## Black formatting (4 files): - pipestat/backends/abstract.py - Reformatted long function signatures - pipestat/helpers.py - Reformatted function signatures to fit line length - pipestat/backends/file_backend/filebackend.py - Reformatted long lines - pipestat/pipestat.py - Reformatted decorator and method signatures ## Ruff linting fixes (22 issues): - Fixed 4 bare except statements (E722) to use specific exception types: - backends/abstract.py: except FileExistsError - backends/file_backend/filebackend.py: except FileNotFoundError, except Exception - reports.py: except Exception (2 occurrences) - Removed 13 unused imports automatically via ruff --fix - Fixed 4 unused variables by prefixing with underscore or removing - Left 1 acceptable wildcard import (F403) in pipestatreader/__init__.py All modified files pass Python syntax validation. Note: Full pytest run skipped due to missing test dependencies in environment, but all files compile successfully.
|
@donaldcampbelljr merge if this is OK with you. it's helpful for building the new autodocumentation. |
donaldcampbelljr
left a comment
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.
This appears to be good.
No description provided.