Skip to content

Update Singapore holidays: 2025 Polling Day on May 3rd#2487

Merged
arkid15r merged 1 commit into
vacanza:devfrom
PPsyrius:2025_sg_polling_day
Apr 22, 2025
Merged

Update Singapore holidays: 2025 Polling Day on May 3rd#2487
arkid15r merged 1 commit into
vacanza:devfrom
PPsyrius:2025_sg_polling_day

Conversation

@PPsyrius

Copy link
Copy Markdown
Collaborator

Proposed change

  • Add Singapore's 2025 polling day.
  • Update special holidays sources from 2020 onwards to use the https://mom.gov.sg source.
  • Add every special holiday entry to test_special_holiday .

Resolves #2486.

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

@coderabbitai

coderabbitai Bot commented Apr 22, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added Polling Day on May 3, 2025, as a public holiday for Singapore.
  • Documentation
    • Updated references to official sources for Singapore's polling day public holidays.
  • Tests
    • Expanded test coverage to include the new 2025 Polling Day and additional special holiday dates for Singapore.

Walkthrough

This update adds May 3, 2025, as "Polling Day" to Singapore's public holiday data. The change updates the source references to official Ministry of Manpower press releases, extends the special holidays dictionary in the Singapore holidays module, adds the new holiday to the Singapore holidays JSON snapshot, and expands the test suite to cover the new date and other special holidays.

Changes

Files/Paths Change Summary
holidays/countries/singapore.py Updated references for polling day holidays to official sources; added 2025 polling day to special holidays.
snapshots/countries/SG_COMMON.json Added "2025-05-03" as "Polling Day" to the Singapore holidays data.
tests/countries/test_singapore.py Extended tests to include 2025 polling day and additional special holiday assertions.

Assessment against linked issues

Objective (Issue #) Addressed Explanation
Add 3 May 2025 as a public holiday for Singapore, "Polling Day" (#2486)

Suggested labels

l10n, snapshot, test


📜 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 dc951b7 and d82b277.

📒 Files selected for processing (3)
  • holidays/countries/singapore.py (2 hunks)
  • snapshots/countries/SG_COMMON.json (1 hunks)
  • tests/countries/test_singapore.py (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
tests/countries/test_singapore.py (1)
tests/common.py (1)
  • assertHoliday (150-152)
🔇 Additional comments (5)
snapshots/countries/SG_COMMON.json (1)

956-956: Added Polling Day holiday for 2025 correctly.

The new holiday entry for "Polling Day" on May 3, 2025 has been properly added to the Singapore holidays list, following the same format as other holiday entries in the JSON file.

holidays/countries/singapore.py (2)

310-312: References updated to official sources.

Good improvement replacing the single reference with multiple official Ministry of Manpower press releases for polling day holidays. Using official government sources increases reliability.


329-329: Added 2025 Polling Day consistently.

The polling day for 2025 has been properly added to the special_public_holidays dictionary, maintaining the same format as previous entries (year: month, day, name).

tests/countries/test_singapore.py (2)

189-189: 2025 test case properly updated.

The test_2025 method has been correctly updated to include the assertion for "Polling Day" on May 3, 2025, maintaining consistency with other holiday test cases.


201-210: Comprehensive special holidays testing.

The test_special_holidays method has been enhanced to test all special holidays, including the newly added 2025 Polling Day. This ensures all special holidays are properly handled by the library.

Previously this method likely had a simpler implementation, and now it's been expanded to test each special holiday individually, which improves test coverage.

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

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Apr 22, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (dc951b7) to head (d82b277).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2487   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          214       214           
  Lines        13527     13527           
  Branches      1928      1928           
=========================================
  Hits         13527     13527           

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

@arkid15r arkid15r left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 👍

@arkid15r arkid15r enabled auto-merge April 22, 2025 05:23

@KJhellico KJhellico left a comment

Copy link
Copy Markdown
Collaborator

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 22, 2025
Merged via the queue into vacanza:dev with commit ad51a04 Apr 22, 2025
@PPsyrius PPsyrius deleted the 2025_sg_polling_day branch April 23, 2025 02:52
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add 3 May 2025 polling day to Singapore data

3 participants