+
Skip to content

Docstring cleanup for Indochinese countries #2505

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

Merged
merged 3 commits into from
Apr 28, 2025
Merged

Conversation

PPsyrius
Copy link
Collaborator

@PPsyrius PPsyrius commented Apr 28, 2025

Proposed change

  • Cleanups incorrect docstring description for Makha Bucha's holiday group assignment.
  • Ensures Cambodia's holiday entries code comment ends with a dot ( . ).
  • Sorts Thailand's holidays attributes assignment.

Doesn't otherwise affects holiday list in these countries.

Type of change

  • New country/market holidays support (thank you!)
  • Supported country/market holidays update (calendar discrepancy fix, localization)
  • Existing code/documentation/test/process quality improvement (best practice, cleanup, refactoring, optimization)
  • Dependency update (version deprecation/pin/upgrade)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (a code change causing existing functionality to break)
  • New feature (new holidays functionality in general)

Checklist

Copy link
Contributor

coderabbitai bot commented Apr 28, 2025

Summary by CodeRabbit

  • Documentation

    • Standardized punctuation in comments and docstrings for Cambodian and Thai holiday modules.
    • Updated and corrected alternative names and Wikipedia links in holiday method documentation.
    • Improved consistency of comment formatting in translation files for Khmer and Thai localizations.
    • Updated translation file metadata, including revision dates and generator version numbers.
  • Refactor

    • Reordered class attribute declarations in the Thailand holiday module for improved code organization.

Summary by CodeRabbit

  • Documentation
    • Standardized punctuation in comments and docstrings for Cambodian and Thai holidays, and updated alternative names for certain Buddhist festivals.
    • Updated metadata and improved comment formatting in English, Khmer, and Thai localization files for Khmer holidays.
  • Style
    • Improved consistency in comment formatting across multiple files.
  • Refactor
    • Reordered class attribute declarations in the Thailand holiday class for better organization.

Walkthrough

This update standardizes comment punctuation and updates metadata across several files. Comments in Cambodian and Thai holiday modules, as well as related translation files, now consistently end with periods. PO file metadata, including revision dates and generator versions, has been updated. Additionally, the order of certain class attributes in the Thailand holiday module was adjusted. Docstrings in the Thai holidays group were clarified to reflect accurate alternative festival names. No functional logic or exported entity signatures were changed.

Changes

Files Change Summary
holidays/countries/cambodia.py, holidays/locale/en_US/LC_MESSAGES/KH.po, holidays/locale/km/LC_MESSAGES/KH.po, holidays/locale/th/LC_MESSAGES/KH.po Standardized comment punctuation by adding periods to comment lines. Updated PO file metadata (revision date, generator version). No changes to translations or logic.
holidays/countries/thailand.py Reordered class attribute declarations in the Thailand class; no changes to values or logic.
holidays/groups/thai.py Updated docstrings for _add_makha_bucha and _add_visakha_bucha to clarify and correct alternative festival names.

Possibly related PRs

  • Update BY.po files #2452: Also focuses on editorial changes to comment formatting and punctuation in localization PO files without altering functional code or holiday logic.

Suggested labels

doc


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3d30ff2 and 7262d10.

📒 Files selected for processing (1)
  • holidays/groups/thai.py (2 hunks)
🔇 Additional comments (1)
holidays/groups/thai.py (1)

121-122: Approved: Makha Bucha docstring accuracy and link
The updated docstring now correctly lists the alternative transliterations and points to the proper Māgha Pūjā article.

Also applies to: 127-127

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the l10n label Apr 28, 2025
Copy link

codecov bot commented Apr 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (856390c) to head (7262d10).
Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2505   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          215       215           
  Lines        13588     13588           
  Branches      1931      1931           
=========================================
  Hits         13588     13588           

☔ 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

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 856390c and 08e8844.

📒 Files selected for processing (6)
  • holidays/countries/cambodia.py (14 hunks)
  • holidays/countries/thailand.py (1 hunks)
  • holidays/groups/thai.py (2 hunks)
  • holidays/locale/en_US/LC_MESSAGES/KH.po (2 hunks)
  • holidays/locale/km/LC_MESSAGES/KH.po (2 hunks)
  • holidays/locale/th/LC_MESSAGES/KH.po (2 hunks)
⏰ Context from checks skipped due to timeout of 300000ms (1)
  • GitHub Check: Test build on windows-latest
🔇 Additional comments (9)
holidays/countries/cambodia.py (1)

74-74: Standardize comment punctuation. Trailing periods have been added to descriptive comments throughout _populate_public_holidays and the CambodiaStaticHolidays class to improve consistency. These are non-functional documentation updates and align with project style guidelines.

Also applies to: 83-83, 109-109, 119-119, 135-135, 143-143, 152-152, 160-160, 183-183, 195-195, 207-207, 215-215, 228-228, 237-237, 245-245, 253-253, 264-264, 291-291, 293-293, 295-295, 297-297

holidays/locale/th/LC_MESSAGES/KH.po (2)

19-19: Update PO file metadata. The PO-Revision-Date and X-Generator headers have been bumped to reflect the latest translation revision and Poedit version. These are correct, non-functional header updates.

Also applies to: 27-27


29-29: Standardize translator comment punctuation. Added trailing periods to all translator comments (lines beginning with #.) before msgid entries to maintain a uniform style. No changes to actual translations.

Also applies to: 33-33, 45-45, 49-49, 53-53, 57-57, 63-63, 67-67, 71-71, 75-75, 79-79, 87-87, 92-92, 100-100, 104-104, 108-108, 112-112, 116-116, 120-120

holidays/locale/en_US/LC_MESSAGES/KH.po (2)

19-19: Update PO file metadata. Bumped PO-Revision-Date and X-Generator to the current values. Non-functional update.

Also applies to: 27-27


29-29: Standardize translator comment punctuation. Added trailing periods to descriptive comments preceding each msgid, ensuring consistency across the file.

Also applies to: 33-33, 45-45, 49-49, 53-53, 57-57, 61-61, 65-65, 69-69, 73-73, 77-77, 88-88, 94-94, 98-98, 102-102, 106-106, 110-110, 114-114, 118-118, 122-122

holidays/locale/km/LC_MESSAGES/KH.po (2)

19-19: Update PO file metadata. The PO-Revision-Date and X-Generator have been updated to reflect the latest translation state. Non-functional header change.

Also applies to: 27-27


29-29: Standardize translator comment punctuation. Trailing periods were added to all translator comment lines (#.) for consistent formatting. No translation content was modified.

Also applies to: 33-33, 45-45, 49-49, 53-53, 57-57, 61-61, 65-65, 69-69, 73-73, 77-77, 83-83, 88-88, 94-94, 98-98, 102-102, 106-106, 110-110, 114-114

holidays/groups/thai.py (1)

121-123: Clarify alternative names for Makha Bucha. The docstring now correctly lists "Makha Bousa" and "Meak Bochea Day" alongside "Māgha Pūjā," enhancing naming accuracy.

holidays/countries/thailand.py (1)

188-190: Attribute grouping improved
Moving supported_categories and supported_languages directly after start_year neatly groups all static class metadata together. The tuple contents remain unchanged, and this reordering has no impact on runtime behavior while enhancing readability and consistency with other country modules.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 08e8844 and 3d30ff2.

📒 Files selected for processing (1)
  • holidays/groups/thai.py (2 hunks)
⏰ Context from checks skipped due to timeout of 300000ms (1)
  • GitHub Check: Test build on windows-latest
🔇 Additional comments (1)
holidays/groups/thai.py (1)

121-123: Docstring for Makha Bucha is clear and consistent.

The updated alternative names (“Makha Bousa and Meak Bochea Day”) are accurate and the sentence now ends with a period, matching the style of other docstrings. Nicely cleaned up!

Copy link

Copy link
Collaborator

@KJhellico KJhellico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@arkid15r arkid15r added this pull request to the merge queue Apr 28, 2025
Merged via the queue into vacanza:dev with commit a251f45 Apr 28, 2025
33 checks passed
@PPsyrius PPsyrius deleted the sea_cleanup branch April 29, 2025 02:28
@arkid15r arkid15r mentioned this pull request May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载