+
Skip to content

Conversation

w3stling
Copy link
Contributor

@w3stling w3stling commented Mar 25, 2025

Proposed change

Adjust the Philippines holiday Bonifacio Day for 2023.
Bonifacio Day was moved from 2023-11-30 to 2023-11-27.

Source:
https://www.officialgazette.gov.ph/2022/11/09/proclamation-no-90-s-2022/

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

  • I've followed the [contributing guidelines][contributing-guidelines]
  • I've successfully run make check, all checks and tests are green

Copy link
Contributor

coderabbitai bot commented Mar 25, 2025

Summary by CodeRabbit

  • New Features
    • Updated the Philippine holiday schedule to reflect a revised date for Bonifacio Day in 2023, now observed on November 27.
    • Enhanced holiday details with a new official reference outlining the updated observance.

Walkthrough

This pull request updates the Philippine holiday definitions by adding a new proclamation reference and modifying the Bonifacio Day date for 2023 in the holidays file. The corresponding test has been updated by refining the year ranges tested and adding an assertion for the revised holiday date. Both changes ensure that the holiday logic for Bonifacio Day is correctly reflected in the production code and its tests.

Changes

File(s) Summary
holidays/.../philippines.py Updated class docstring to include Proclamation No. 90/2022 and modified the _populate_public_holidays method to set Bonifacio Day for 2023 to November 27.
tests/.../test_philippines.py Adjusted the test_bonifacio_day method to update the range of years and added a new assertion for the Bonifacio Day on 2023-11-27.

Possibly related PRs

Suggested labels

snapshot

Suggested reviewers

  • KJhellico
  • PPsyrius

📜 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 fdfef31 and a3f025f.

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

241-244: Formatting improvement accepted.

The code has been formatted with better line breaks using parentheses for the generator expression, making it clearer to read while handling the complex year ranges. This follows the preferred formatting style suggested in previous reviews.


248-248: Test case correctly added for 2023 exception.

The test case for Bonifacio Day in 2023 has been correctly added to reflect the special date (November 27 instead of the usual November 30) as specified in Proclamation No. 90/2022.


454-454: 2023 test updated with correct Bonifacio Day date.

The complete 2023 test case has been properly updated to assert that Bonifacio Day falls on November 27, 2023, instead of the standard November 30 date, correctly implementing the holiday date adjustment from the proclamation.

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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 test label Mar 25, 2025
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 59ac54c and f81bced.

📒 Files selected for processing (2)
  • holidays/countries/philippines.py (2 hunks)
  • tests/countries/test_philippines.py (1 hunks)
🧰 Additional context used
🪛 Ruff (0.8.2)
tests/countries/test_philippines.py

241-241: Line too long (103 > 99)

(E501)

🔇 Additional comments (3)
holidays/countries/philippines.py (2)

50-50: Looks good - documentation reference added.

The addition of the proclamation reference is clear and following the established pattern. This provides the legal basis for the holiday date change.


150-150: Holiday date adjustment correctly implemented.

Adding the special date for Bonifacio Day 2023 (November 27) to the dates_obs dictionary follows the pattern used for other exceptional holiday dates. The change aligns perfectly with the PR objective to adjust this holiday date as officially proclaimed.

tests/countries/test_philippines.py (1)

245-245: Special case test for 2023 correctly added.

The test properly includes verification for the special date of Bonifacio Day in 2023. This ensures the implementation will handle this exceptional case correctly.

Co-authored-by: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com>
Signed-off-by: Peter Westling <w3stling@users.noreply.github.com>
@w3stling
Copy link
Contributor Author

Bonifacio Day in test test_2023 needs to be changed 2023-11-27.

Copy link

Copy link
Collaborator

@PPsyrius PPsyrius left a comment

Choose a reason for hiding this comment

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

Good catch on this one, LGTM 🇵🇭

Copy link

codecov bot commented Mar 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (59ac54c) to head (a3f025f).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2370   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          204       204           
  Lines        12853     12853           
  Branches      1817      1817           
=========================================
  Hits         12853     12853           

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

@PPsyrius PPsyrius added this pull request to the merge queue Mar 25, 2025
Merged via the queue into vacanza:dev with commit dba0c9d Mar 25, 2025
33 checks passed
@KJhellico
Copy link
Collaborator

@w3stling, thank you for this update!

@KJhellico KJhellico changed the title Update Philippines holidays: adjust Bonifacio Day for 2023 Update Philippines holidays: adjust Bonifacio Day for 2023 Mar 26, 2025
@arkid15r arkid15r mentioned this pull request Apr 7, 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浏览器服务,不要输入任何密码和下载