Conversation
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.
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.
…SEEJKpuR1MkqV1PRu Convert docstrings to google style
…fy class hierarchy, reframe as general-purpose
Contributor
|
Fresh install fails due to yacman 0.9.5 not being released yet: |
…fy class hierarchy, reframe as general-purpose
Move schemas, remove empty_results file
…nto usability-improvements
…fy class hierarchy, reframe as general-purpose
…nto usability-improvements
Switch constructor to classmethods, implement project_name
Break up tests
Improve usability:
Contributor
Author
|
@donaldcampbelljr ok I think this is pretty much ready to go now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.