python-holidays icon indicating copy to clipboard operation
python-holidays copied to clipboard

Add Saint Vincent and the Grenadines holidays

Open waqar2403 opened this issue 6 months ago • 15 comments

Proposed change

Added Holidays for Saint Vincent and The Grenadines Closes: #1263

Type of change

  • [x] 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

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

waqar2403 avatar Jun 06 '25 21:06 waqar2403

Summary by CodeRabbit

  • New Features

    • Added support for public holidays in Saint Vincent and the Grenadines, including official and special holidays from 1979 to 2050.
    • Introduced localization for holiday names in both en_US and en_VC English variants.
  • Documentation

    • Updated documentation to reflect support for Saint Vincent and the Grenadines and increased the total supported country count.
  • Tests

    • Added comprehensive tests to verify holiday calculations, observed rules, and localization for Saint Vincent and the Grenadines.

Summary by CodeRabbit

  • New Features

    • Added support for public holidays in Saint Vincent and the Grenadines, including all major national and Christian holidays, with accurate observance rules.
    • Introduced English (en_US, en_VC) translations for these holidays.
  • Documentation

    • Updated documentation to reflect the addition of Saint Vincent and the Grenadines as a supported country.
  • Tests

    • Added comprehensive tests to ensure correct holiday dates and observance for Saint Vincent and the Grenadines.

Walkthrough

Support for Saint Vincent and the Grenadines holidays has been added. This includes a new holiday provider class, registry updates, country imports, localization files for English, documentation updates, and a dedicated test suite to verify holiday calculations and aliases.

Changes

Files/Paths Change Summary
README.md Updated supported country count and added Saint Vincent and the Grenadines entry.
holidays/countries/init.py Added relative imports for Saint Vincent and the Grenadines country module and aliases.
holidays/countries/saint_vincent_and_the_grenadines.py Added new holiday provider class for Saint Vincent and the Grenadines and its aliases (VC, VCT).
holidays/locale/en_US/LC_MESSAGES/VC.po
holidays/locale/en_VC/LC_MESSAGES/VC.po
Added English localization files for Saint Vincent and the Grenadines holidays.
holidays/registry.py Registered Saint Vincent and the Grenadines in the COUNTRIES dictionary.
tests/countries/test_saint_vincent_and_the_grenadines.py Added test suite for Saint Vincent and the Grenadines holidays and aliases.
snapshots/countries/VC_COMMON.json Added holiday data snapshot for Saint Vincent and the Grenadines from 1979 to 2050.

Assessment against linked issues

Objective (Issue #) Addressed Explanation
Add Saint Vincent and the Grenadines holidays (#1263)
Provide localization for holiday names (#1263)
Add country to registry and documentation (#1263)
Provide tests for new country holidays (#1263)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes found.

Suggested reviewers

  • KJhellico
  • PPsyrius
✨ Finishing Touches
  • [ ] 📝 Generate Docstrings
🧪 Generate unit tests
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 auto-generate unit tests to generate unit tests 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.

coderabbitai[bot] avatar Jun 06 '25 21:06 coderabbitai[bot]

@coderabbitai review

KJhellico avatar Jun 06 '25 21:06 KJhellico

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot] avatar Jun 06 '25 21:06 coderabbitai[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (b4403d8) to head (97216e6). Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2608   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          256       257    +1     
  Lines        15358     15399   +41     
  Branches      2104      2105    +1     
=========================================
+ Hits         15358     15399   +41     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jun 06 '25 21:06 codecov[bot]

2019-2025

KJhellico avatar Jun 07 '25 09:06 KJhellico

@KJhellico @arkid15r I'm unable to figure out what is going bad now can you please help me with it?

waqar2403 avatar Jun 07 '25 11:06 waqar2403

You have issue with hoildays/countries/__init__.py (you wrongly reverted changes after merging from dev. Take the current version and add your line.

KJhellico avatar Jun 07 '25 12:06 KJhellico

You have issue with hoildays/countries/__init__.py (you wrongly reverted changes after merging from dev. Take the current version and add your line.

I hope this works now

waqar2403 avatar Jun 07 '25 14:06 waqar2403

2018 2021 Jan, 22, 25 Unfortunately, I could not find Public Holidays Act, Cap. 274.

KJhellico avatar Jun 08 '25 13:06 KJhellico

Additional primary source for cross-referencing pre-2019 data (Bank of Saint Vincent and the Grenadines Calendar - now also pre-Internet Archived):

PPsyrius avatar Jun 10 '25 05:06 PPsyrius

@KJhellico I’ve made the changes according to your suggestion the timeanddate.com data threw me off because I wasn’t aware of its reliability, and @PPsyrius I’ve also updated the test suite and translations

waqar2403 avatar Jun 11 '25 20:06 waqar2403

Please retry analysis of this Pull-Request directly on SonarQube Cloud

sonarqubecloud[bot] avatar Jun 13 '25 10:06 sonarqubecloud[bot]

@KJhellico I've updated my branch but still it is getting merge conflict error can you please help me with it?

waqar2403 avatar Jun 24 '25 16:06 waqar2403

You made this PR from your main branch.

KJhellico avatar Jun 24 '25 17:06 KJhellico

Quote reply @PPsyrius thanks for pointing out it's actually the 1st Monday of july and I Fixed it + your PR is merged to my main branch

waqar2403 avatar Jun 30 '25 13:06 waqar2403

~Revert New Year's Day changes.~

KJhellico avatar Jul 02 '25 18:07 KJhellico

Revert New Year's Day changes.

@KJhellico 2023

waqar2403 avatar Jul 02 '25 18:07 waqar2403

2023

Good catch!

KJhellico avatar Jul 02 '25 18:07 KJhellico

Hopefully the last changes before this PR is merged in 👍 (please run make snapshot after this as well to update the snapshots)

🤞

waqar2403 avatar Jul 07 '25 22:07 waqar2403