-
-
Notifications
You must be signed in to change notification settings - Fork 555
Add Western Sahara holidays #3003
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
Conversation
Summary by CodeRabbit
WalkthroughAdds Western Sahara (EH/ESH): new country Holiday class with fixed and Islamic holidays, exports aliases, registers it, adds locale PO files (ar, en_US, es, fr), includes tests and snapshots, and updates README country count. No existing country logic modified. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #3003 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 305 306 +1
Lines 18041 18072 +31
Branches 2330 2332 +2
=========================================
+ Hits 18041 18072 +31 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aaand done!
LGTM 👍
Thanks everyone for being part of this!
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
README.md
(3 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.
Learnt from: KJhellico
PR: vacanza/holidays#2820
File: holidays/countries/__init__.py:199-203
Timestamp: 2025-08-31T19:34:20.731Z
Learning: In Saint Helena, Ascension and Tristan da Cunha holidays implementation (holidays/countries/saint_helena_ascension_and_tristan_da_cunha.py), only three classes are defined: SaintHelenaAscensionAndTristanDaCunha (main class), SH (alias), and SHN (alias). There is no HolidaysSH class, despite it being referenced in the registry.py entry.
📚 Learning: 2025-03-26T08:55:08.917Z
Learnt from: PPsyrius
PR: vacanza/holidays#2362
File: holidays/ical.py:53-80
Timestamp: 2025-03-26T08:55:08.917Z
Learning: The holidays library intentionally limits language code support to ISO 639-1 and ISO 639-2 standards (2-3 letter language codes with optional region) to maintain consistency with other modules like `common_holidays` and `financial_holidays`, rather than implementing full RFC 5646 compliance.
Applied to files:
README.md
📚 Learning: 2025-06-09T19:39:38.818Z
Learnt from: KJhellico
PR: vacanza/holidays#2601
File: README.md:108-108
Timestamp: 2025-06-09T19:39:38.818Z
Learning: The correct way to count supported countries in the holidays library is by counting unique country module files in holidays/countries/ (excluding __init__.py) or by counting entries in the COUNTRIES registry, not by counting individual class definitions which include alias classes.
Applied to files:
README.md
🪛 LanguageTool
README.md
[grammar] ~60-~60: Use correct spacing
Context: ... Docs](https://holidays.readthedocs.io). ## Quick Start ``` python from datetime im...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~103-~103: There might be a mistake here.
Context: ...rg/wiki/List_of_ISO_3166_country_codes), the same used for domain names, and for ...
(QB_NEW_EN)
[grammar] ~104-~104: There might be a mistake here.
Context: ...e same used for domain names, and for a subdivision its [ISO 3166-2 code](https://en.wikipe...
(QB_NEW_EN_OTHER)
[grammar] ~104-~104: There might be a mistake here.
Context: ...s, and for a subdivision its [ISO 3166-2 code](https://en.wikipedia.org/wiki/ISO_...
(QB_NEW_EN)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Test Python 3.14 on windows-latest
🔇 Additional comments (1)
README.md (1)
102-114
: Verify country count and apply grammar tweak
- Confirm the actual count in COUNTRIES via:
If it’s not 249, update the README.grep -E '^\s*"[a-z0-9_ ]+"\s*:' holidays/registry.py | wc -l- Change “the same used” to “the same as used” and add a comma after “subdivision”.
-The standard way to refer to a country is by using its [ISO 3166-1 alpha-2 code](…), -the same used for domain names, and for a subdivision its [ISO 3166-2 code](…). +The standard way to refer to a country is by using its [ISO 3166-1 alpha-2 code](…), +the same as used for domain names, and for a subdivision, its [ISO 3166-2 code](…).
Proposed change
Add Western Sahara holidays (with
ar
,en_US
,es
, andfr
l10n support).We've finally have support for all ISO 3166 entities 🎉
Resolves #2657 .
Type of change
holidays
functionality in general)Checklist
make check
locally; all checks and tests passed.