Skip to content

Conversation

@ppinchuk
Copy link
Collaborator

A lot of docstrings throughout the codebase were stale. In this PR, we attempt to update as many as possible. Further refinements are almost certainty necessary, but we will save those for another time.

@ppinchuk ppinchuk added this to the Finishing touches for OSS milestone Nov 20, 2025
@ppinchuk ppinchuk self-assigned this Nov 20, 2025
@ppinchuk ppinchuk requested a review from castelao as a code owner November 20, 2025 21:04
Copilot AI review requested due to automatic review settings November 20, 2025 21:04
@ppinchuk ppinchuk added documentation Improvements or additions to documentation enhancement Update to logic or general code improvements p-medium Priority: medium topic-python-general Issues/pull requests related to python labels Nov 20, 2025
@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.59%. Comparing base (b611a2d) to head (d8d389d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #347      +/-   ##
==========================================
+ Coverage   51.56%   51.59%   +0.02%     
==========================================
  Files          45       45              
  Lines        4301     4303       +2     
  Branches      391      391              
==========================================
+ Hits         2218     2220       +2     
  Misses       2052     2052              
  Partials       31       31              
Flag Coverage Δ
unittests 51.59% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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
Contributor

Copilot AI left a 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 throughout the COMPASS codebase to improve consistency, accuracy, and adherence to the project's documentation standards. The changes align with updated docstring guidelines that emphasize clarity, proper formatting for default values, and consistent property documentation.

  • Removed docstrings from __init__ methods in exception/warning classes per guidelines
  • Updated parameter documentation to consistently indicate default values using "By default, X" phrasing
  • Reformatted property docstrings to use the one-line "type: description" format
  • Enhanced function/method descriptions with more precise language and additional context

Reviewed Changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
compass/warn.py Removed __init__ docstring from COMPASSWarning class
compass/exceptions.py Removed __init__ docstring from COMPASSError class
compass/validation/location.py Updated parameter descriptions, added Notes sections, improved clarity
compass/validation/graphs.py Enhanced function docstrings with better parameter descriptions and Notes
compass/validation/content.py Refined class and method docstrings for clarity
compass/utilities/parsing.py Updated module docstring, improved function descriptions
compass/utilities/nt.py Added comprehensive docstrings to namedtuples
compass/utilities/location.py Enhanced class docstring and property descriptions
compass/utilities/jurisdictions.py Improved function docstrings with better parameter documentation
compass/utilities/io.py Enhanced async function docstrings with clearer descriptions
compass/utilities/finalize.py Updated function docstrings with improved parameter and return descriptions
compass/utilities/enums.py Added detailed class docstrings to enumerations
compass/utilities/base.py Enhanced class and function docstrings, updated property format
compass/services/usage.py Reformatted property docstring to one-line format
compass/services/threaded.py Added missing return type documentation
compass/services/cpu.py Clarified function purpose and parameters
compass/services/base.py Updated property and method docstrings for consistency
compass/scripts/process.py Reformatted property docstrings and improved method descriptions
compass/scripts/download.py Enhanced function docstrings with better parameter descriptions
compass/pb.py Updated class and method docstrings, improved context manager docs
compass/extraction/apply.py Enhanced function docstrings with clearer parameter descriptions
compass/common/tree.py Reformatted property docstrings to one-line format
compass/common/base.py Added comprehensive function docstrings
compass/_cli/main.py Updated CLI description to be more generic
.github/copilot-instructions.md Added clarifications to docstring guidelines

@ppinchuk ppinchuk linked an issue Nov 20, 2025 that may be closed by this pull request
castelao
castelao previously approved these changes Dec 3, 2025
@ppinchuk ppinchuk merged commit 83c5b8c into main Dec 4, 2025
28 of 30 checks passed
@ppinchuk ppinchuk deleted the pp/docstrings branch December 4, 2025 01:28
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 enhancement Update to logic or general code improvements p-medium Priority: medium topic-python-general Issues/pull requests related to python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up docstrings

4 participants