Add Saint Vincent and the Grenadines holidays
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
holidaysfunctionality in general)
Checklist
- [x] I've followed the contributing guidelines
- [x] I've successfully run
make check, all checks and tests are green
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.
🪧 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
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai explain this code block.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin 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 pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR.@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR.@coderabbitai auto-generate unit teststo generate unit tests for this PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere 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 review
✅ 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.
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.
@KJhellico @arkid15r I'm unable to figure out what is going bad now can you please help me with it?
You have issue with hoildays/countries/__init__.py (you wrongly reverted changes after merging from dev. Take the current version and add your line.
You have issue with
hoildays/countries/__init__.py(you wrongly reverted changes after merging fromdev. Take the current version and add your line.
I hope this works now
2018 2021 Jan, 22, 25 Unfortunately, I could not find Public Holidays Act, Cap. 274.
Additional primary source for cross-referencing pre-2019 data (Bank of Saint Vincent and the Grenadines Calendar - now also pre-Internet Archived):
@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
Please retry analysis of this Pull-Request directly on SonarQube Cloud
@KJhellico I've updated my branch but still it is getting merge conflict error can you please help me with it?
You made this PR from your main branch.
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
~Revert New Year's Day changes.~
Hopefully the last changes before this PR is merged in 👍 (please run
make snapshotafter this as well to update the snapshots)
🤞
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code