-
-
Notifications
You must be signed in to change notification settings - Fork 550
Add Anguilla holidays #2615
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
Add Anguilla holidays #2615
Conversation
Summary by CodeRabbit
Summary by CodeRabbit
WalkthroughSupport for Anguilla holidays was added. This includes a new country module, registry updates, localization files, documentation updates, a holiday snapshot, and comprehensive tests. The changes ensure Anguilla's public holidays are defined, localized, and validated within the holidays library. Changes
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes detected. All modifications align with the objectives of adding Anguilla holidays and related support. Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 300000ms (16)
🔇 Additional comments (1)
✨ Finishing Touches🧪 Generate Unit Tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
Documentation and Community
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #2615 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 233 234 +1
Lines 14759 14806 +47
Branches 2057 2060 +3
=========================================
+ Hits 14759 14806 +47 ☔ 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.
Actionable comments posted: 2
🔭 Outside diff range comments (1)
holidays/locale/en_US/LC_MESSAGES/AI.po (1)
29-108
: 🧹 Nitpick (assertive)Message IDs and empty translations are placeholders
Entries cover all holiday names;msgstr ""
placeholders are expected until localized strings are provided.Consider whether for the default English locale you want
msgstr
to mirrormsgid
, or leave them empty per existing practice.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (7)
README.md
(2 hunks)holidays/countries/__init__.py
(1 hunks)holidays/countries/anguilla.py
(1 hunks)holidays/locale/en_US/LC_MESSAGES/AI.po
(1 hunks)holidays/registry.py
(1 hunks)snapshots/countries/AI_COMMON.json
(1 hunks)tests/countries/test_anguilla.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
holidays/locale/en_US/LC_MESSAGES/AI.po (1)
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.
snapshots/countries/AI_COMMON.json (1)
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.
🧬 Code Graph Analysis (2)
holidays/countries/__init__.py (1)
holidays/countries/anguilla.py (3)
Anguilla
(28-145)AI
(148-149)AIA
(152-153)
tests/countries/test_anguilla.py (2)
tests/common.py (7)
TestCase
(28-338)CommonCountryTests
(356-374)assertAliases
(121-130)assertHoliday
(150-152)assertHolidayName
(195-199)assertNoNonObservedHoliday
(248-250)assertLocalizedHolidays
(327-338)holidays/countries/anguilla.py (3)
Anguilla
(28-145)AI
(148-149)AIA
(152-153)
🪛 Pylint (3.3.7)
tests/countries/test_anguilla.py
[convention] 1-1: Missing module docstring
(C0114)
[convention] 19-19: Missing class docstring
(C0115)
[warning] 21-21: Number of parameters was 4 in 'TestCase.setUpClass' and is now 1 in overriding 'TestAnguilla.setUpClass' method
(W0221)
[convention] 24-24: Missing function or method docstring
(C0116)
[convention] 27-27: Missing function or method docstring
(C0116)
[convention] 30-30: Missing function or method docstring
(C0116)
[convention] 33-33: Missing function or method docstring
(C0116)
[convention] 40-40: Missing function or method docstring
(C0116)
[convention] 63-63: Missing function or method docstring
(C0116)
[convention] 86-86: Missing function or method docstring
(C0116)
[convention] 109-109: Missing function or method docstring
(C0116)
[convention] 116-116: Missing function or method docstring
(C0116)
[convention] 139-139: Missing function or method docstring
(C0116)
[convention] 162-162: Missing function or method docstring
(C0116)
[convention] 185-185: Missing function or method docstring
(C0116)
[convention] 189-189: Missing function or method docstring
(C0116)
[convention] 211-211: Missing function or method docstring
(C0116)
[convention] 233-233: Missing function or method docstring
(C0116)
[convention] 255-255: Missing function or method docstring
(C0116)
[convention] 268-268: Missing function or method docstring
(C0116)
[convention] 272-272: Missing function or method docstring
(C0116)
[convention] 279-279: Missing function or method docstring
(C0116)
[convention] 289-289: Missing function or method docstring
(C0116)
[convention] 310-310: Missing function or method docstring
(C0116)
[refactor] 19-19: Too many public methods (22/20)
(R0904)
holidays/countries/anguilla.py
[convention] 32-32: Line too long (107/100)
(C0301)
[convention] 33-33: Line too long (110/100)
(C0301)
[convention] 34-34: Line too long (113/100)
(C0301)
[convention] 35-35: Line too long (147/100)
(C0301)
[convention] 36-36: Line too long (168/100)
(C0301)
[convention] 37-37: Line too long (109/100)
(C0301)
[convention] 38-38: Line too long (123/100)
(C0301)
[convention] 1-1: Missing module docstring
(C0114)
[convention] 148-148: Missing class docstring
(C0115)
[convention] 152-152: Missing class docstring
(C0115)
[convention] 156-156: Missing class docstring
(C0115)
[refactor] 156-156: Too few public methods (0/2)
(R0903)
🔇 Additional comments (10)
holidays/registry.py (1)
30-30
: New registry entry for Anguilla looks correct
The key"anguilla"
follows alphabetical order, and the tuple("Anguilla", "AI", "AIA")
aligns with other country definitions.README.md (2)
108-108
: Update supported countries count
The summary now reflects 186 supported country codes—this matches the addition of Anguilla.
199-204
: Anguilla entry in the country table is accurate
The row for Anguilla uses correct ISO code, default language, and no subdivisions/categories.holidays/countries/__init__.py (1)
22-22
: Import for Anguilla integrated properly
The new linefrom holidays.countries.anguilla import Anguilla, AI, AIA
is placed in sequence and matches existing patterns.holidays/locale/en_US/LC_MESSAGES/AI.po (1)
15-27
: PO file header metadata is well-formed
Headers specify project version, timestamps, and language. EnsureLanguage: en_US
is correct for this locale.snapshots/countries/AI_COMMON.json (1)
1-667
: Snapshot file appears auto-generated
This JSON matches the expected structure and semicolon-separated entries for dates with multiple holidays. No manual edits needed.tests/countries/test_anguilla.py (2)
19-28
: Well-structured test setup.The test class follows the standard pattern with proper inheritance and initialization. The special holidays test correctly validates the one-off holidays.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 19-19: Missing class docstring
(C0115)
[warning] 21-21: Number of parameters was 4 in 'TestCase.setUpClass' and is now 1 in overriding 'TestAnguilla.setUpClass' method
(W0221)
[convention] 24-24: Missing function or method docstring
(C0116)
[convention] 27-27: Missing function or method docstring
(C0116)
[refactor] 19-19: Too many public methods (22/20)
(R0904)
30-330
: Comprehensive test coverage for all holidays.The test suite thoroughly validates all Anguilla holidays including fixed dates, movable holidays (Easter-based), observed holidays, and localization. The explicit date lists ensure accuracy.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 30-30: Missing function or method docstring
(C0116)
[convention] 33-33: Missing function or method docstring
(C0116)
[convention] 40-40: Missing function or method docstring
(C0116)
[convention] 63-63: Missing function or method docstring
(C0116)
[convention] 86-86: Missing function or method docstring
(C0116)
[convention] 109-109: Missing function or method docstring
(C0116)
[convention] 116-116: Missing function or method docstring
(C0116)
[convention] 139-139: Missing function or method docstring
(C0116)
[convention] 162-162: Missing function or method docstring
(C0116)
[convention] 185-185: Missing function or method docstring
(C0116)
[convention] 189-189: Missing function or method docstring
(C0116)
[convention] 211-211: Missing function or method docstring
(C0116)
[convention] 233-233: Missing function or method docstring
(C0116)
[convention] 255-255: Missing function or method docstring
(C0116)
[convention] 268-268: Missing function or method docstring
(C0116)
[convention] 272-272: Missing function or method docstring
(C0116)
[convention] 279-279: Missing function or method docstring
(C0116)
[convention] 289-289: Missing function or method docstring
(C0116)
[convention] 310-310: Missing function or method docstring
(C0116)
holidays/countries/anguilla.py (2)
28-56
: Solid implementation following established patterns.The class structure properly inherits from required base classes and sets up Anguilla with correct country code, language support, and observation rules. The comprehensive references are valuable.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 32-32: Line too long (107/100)
(C0301)
[convention] 33-33: Line too long (110/100)
(C0301)
[convention] 34-34: Line too long (113/100)
(C0301)
[convention] 35-35: Line too long (147/100)
(C0301)
[convention] 36-36: Line too long (168/100)
(C0301)
[convention] 37-37: Line too long (109/100)
(C0301)
[convention] 38-38: Line too long (123/100)
(C0301)
87-124
: Well-implemented holiday logic with proper conflict handling.The Anguilla Day logic correctly handles weekend shifts and Whit Monday conflicts. The conditional naming for National Heroes Day (2011+) vs Separation Day is properly implemented.
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: 3
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (7)
README.md
(2 hunks)holidays/countries/__init__.py
(1 hunks)holidays/countries/anguilla.py
(1 hunks)holidays/locale/en_US/LC_MESSAGES/AI.po
(1 hunks)holidays/registry.py
(1 hunks)snapshots/countries/AI_COMMON.json
(1 hunks)tests/countries/test_anguilla.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
holidays/locale/en_US/LC_MESSAGES/AI.po (1)
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.
snapshots/countries/AI_COMMON.json (1)
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.
🧬 Code Graph Analysis (3)
holidays/countries/__init__.py (1)
holidays/countries/anguilla.py (3)
Anguilla
(28-145)AI
(148-149)AIA
(152-153)
tests/countries/test_anguilla.py (2)
tests/common.py (7)
TestCase
(28-338)CommonCountryTests
(356-374)assertAliases
(121-130)assertHoliday
(150-152)assertHolidayName
(195-199)assertNoNonObservedHoliday
(248-250)assertLocalizedHolidays
(327-338)holidays/countries/anguilla.py (3)
Anguilla
(28-145)AI
(148-149)AIA
(152-153)
holidays/countries/anguilla.py (6)
holidays/calendars/gregorian.py (1)
_timedelta
(37-42)holidays/groups/christian.py (8)
ChristianHolidays
(22-463)_add_good_friday
(308-317)_add_easter_monday
(259-268)_add_easter_sunday
(270-279)_add_whit_monday
(432-441)_add_christmas_day
(208-216)_christmas_day
(84-88)_add_christmas_day_two
(218-226)holidays/groups/international.py (3)
InternationalHolidays
(18-220)_add_new_years_day
(126-134)_add_labor_day
(99-108)holidays/groups/custom.py (1)
StaticHolidays
(18-47)holidays/observed_holiday_base.py (1)
ObservedHolidayBase
(101-243)holidays/holiday_base.py (4)
_is_weekend
(887-894)_is_saturday
(881-882)_add_holiday
(819-831)_is_sunday
(884-885)
🪛 Pylint (3.3.7)
tests/countries/test_anguilla.py
[convention] 1-1: Missing module docstring
(C0114)
[convention] 19-19: Missing class docstring
(C0115)
[warning] 21-21: Number of parameters was 4 in 'TestCase.setUpClass' and is now 1 in overriding 'TestAnguilla.setUpClass' method
(W0221)
[convention] 24-24: Missing function or method docstring
(C0116)
[convention] 27-27: Missing function or method docstring
(C0116)
[convention] 30-30: Missing function or method docstring
(C0116)
[convention] 33-33: Missing function or method docstring
(C0116)
[convention] 40-40: Missing function or method docstring
(C0116)
[convention] 63-63: Missing function or method docstring
(C0116)
[convention] 86-86: Missing function or method docstring
(C0116)
[convention] 109-109: Missing function or method docstring
(C0116)
[convention] 116-116: Missing function or method docstring
(C0116)
[convention] 139-139: Missing function or method docstring
(C0116)
[convention] 162-162: Missing function or method docstring
(C0116)
[convention] 185-185: Missing function or method docstring
(C0116)
[convention] 189-189: Missing function or method docstring
(C0116)
[convention] 211-211: Missing function or method docstring
(C0116)
[convention] 233-233: Missing function or method docstring
(C0116)
[convention] 255-255: Missing function or method docstring
(C0116)
[convention] 268-268: Missing function or method docstring
(C0116)
[convention] 272-272: Missing function or method docstring
(C0116)
[convention] 279-279: Missing function or method docstring
(C0116)
[convention] 289-289: Missing function or method docstring
(C0116)
[convention] 310-310: Missing function or method docstring
(C0116)
[refactor] 19-19: Too many public methods (22/20)
(R0904)
holidays/countries/anguilla.py
[convention] 32-32: Line too long (107/100)
(C0301)
[convention] 33-33: Line too long (110/100)
(C0301)
[convention] 34-34: Line too long (113/100)
(C0301)
[convention] 35-35: Line too long (147/100)
(C0301)
[convention] 36-36: Line too long (168/100)
(C0301)
[convention] 37-37: Line too long (109/100)
(C0301)
[convention] 38-38: Line too long (123/100)
(C0301)
[convention] 1-1: Missing module docstring
(C0114)
[convention] 148-148: Missing class docstring
(C0115)
[convention] 152-152: Missing class docstring
(C0115)
[convention] 156-156: Missing class docstring
(C0115)
[refactor] 156-156: Too few public methods (0/2)
(R0903)
🔇 Additional comments (8)
holidays/registry.py (1)
30-30
: Added Anguilla to the registry correctlyEntry
"anguilla": ("Anguilla", "AI", "AIA")
follows the existing pattern and integrates the new country module as expected.README.md (2)
108-108
: Updated supported country countThe count has been incremented to 186, matching the inclusion of Anguilla. Ensure this aligns with the actual registry entries.
199-204
: Added Anguilla entry in available countries tableThe row for Anguilla follows the established format (no subdivisions, default
en_US
, no extra categories). Looks consistent.holidays/countries/__init__.py (1)
22-22
: Imported Anguilla moduleThe import
from holidays.countries.anguilla import Anguilla, AI, AIA
is correctly placed in alphabetical order.holidays/locale/en_US/LC_MESSAGES/AI.po (2)
29-108
: Populate English translations or rely on fallbackAll
msgstr
fields are empty. For theen_US
locale, you may populatemsgstr
with the correspondingmsgid
, or confirm that empty strings correctly fall back to source strings.
17-26
: 🧹 Nitpick (assertive)Ensure necessary PO headers are present
The header lacks a
Plural-Forms
entry (e.g.nplurals=2; plural=(n != 1);
). Compare with otheren_US
locale files to maintain consistency.⛔ Skipped due to learnings
Learnt from: PPsyrius PR: vacanza/holidays#2537 File: holidays/locale/sv_FI/LC_MESSAGES/AX.po:17-27 Timestamp: 2025-05-10T04:34:02.406Z Learning: The `Plural-Forms` header isn't used in .po file generation for the holidays project and doesn't need to be manually added to localization files.
Learnt from: PPsyrius PR: vacanza/holidays#2437 File: holidays/locale/dz_BT/LC_MESSAGES/BT.po:0-0 Timestamp: 2025-04-06T14:52:35.679Z Learning: When suggesting changes to .po files in the holidays project, follow the standardized header format: - Default language format: "# [COUNTRY-NAME-NORMAL] holidays. #" - Non-default language format: "# [COUNTRY-NAME-NORMAL] holidays [LANGUAGE-CODE] localization. #" For example, for Bhutan in Dzongkha, use "# Bhutan holidays dz_BT localization. #"
Learnt from: PPsyrius PR: vacanza/holidays#2437 File: holidays/locale/dz_BT/LC_MESSAGES/BT.po:12-12 Timestamp: 2025-04-06T14:44:59.785Z Learning: Use standardized .po file headers for localization files in the holidays project: - Default language format: "# [COUNTRY-NAME-NORMAL] holidays. #" - Other languages format: "# [COUNTRY-NAME-NORMAL] holidays [LANGUAGE-CODE] localization. #"
snapshots/countries/AI_COMMON.json (1)
1-667
: Approved new snapshot for Anguilla holidaysThis auto-generated snapshot aligns with the defined holiday logic and uses semicolons to separate multiple holidays on the same date, following project conventions.
holidays/countries/anguilla.py (1)
95-96
:✅ Verification successful
Two holidays on the same date - verify this is intentional.
Both "James Ronald Webster Day" (line 63) and "Sovereignty Day" (line 96) are set to March 2nd. While some countries do have multiple holidays on the same date, please confirm this is correct for Anguilla.
🏁 Script executed:
#!/bin/bash # Description: Check if there are references or tests confirming both holidays on March 2nd # Search for any documentation or references about March 2nd holidays rg -A 5 -B 5 "March 2|Mar.*2|03-02" --glob "*.md" --glob "*.rst" --glob "*.txt" # Check test files for March 2nd holiday assertions rg -A 3 -B 3 "03-02.*Sovereignty.*Webster|Webster.*Sovereignty|March.*2.*Day" tests/Length of output: 7461
No action needed: Both holidays on March 2 are intentional
Tests in
tests/countries/test_anguilla.py
assert that on 2022-03-02 both “James Ronald Webster Day” and “Sovereignty Day” are returned:
- tests/countries/test_anguilla.py:
("2022-03-02", "James Ronald Webster Day; Sovereignty Day")
This confirms the overlap is correct.
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: 3
♻️ Duplicate comments (2)
README.md (1)
199-204
: Anguilla row correctly added.Default language
en_AI
is highlighted in bold and supported languages list follows project conventions.tests/countries/test_anguilla.py (1)
262-267
: Boxing-Day-when-Christmas-is-Sunday test still absent
(This reiterates an earlier review.)
Years such as 2016 & 2022 need coverage for the Tuesday “Boxing Day (observed)” path.🧰 Tools
🪛 Pylint (3.3.7)
[convention] 262-262: Missing function or method docstring
(C0116)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (8)
README.md
(1 hunks)holidays/countries/__init__.py
(1 hunks)holidays/countries/anguilla.py
(1 hunks)holidays/locale/en_AI/LC_MESSAGES/AI.po
(1 hunks)holidays/locale/en_US/LC_MESSAGES/AI.po
(1 hunks)holidays/registry.py
(1 hunks)snapshots/countries/AI_COMMON.json
(1 hunks)tests/countries/test_anguilla.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
holidays/locale/en_US/LC_MESSAGES/AI.po (4)
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.
Learnt from: PPsyrius
PR: vacanza/holidays#2608
File: holidays/locale/en_VC/LC_MESSAGES/VC.po:61-66
Timestamp: 2025-06-10T05:07:29.341Z
Learning: For missing translator comments in .po localization files in the holidays repository, direct authors to run `make l10n` or `make check` commands instead of suggesting manual fixes, as these commands automatically handle translator comment generation.
Learnt from: PPsyrius
PR: vacanza/holidays#2608
File: holidays/locale/en_US/LC_MESSAGES/VC.po:76-76
Timestamp: 2025-06-10T05:08:07.919Z
Learning: For the holidays project, localization file formatting issues (like missing terminal periods in .po files) should be automatically fixed by running `make l10n` command (which is included in `make check`). Authors should be directed to use this automated tooling instead of manual formatting fixes.
Learnt from: PPsyrius
PR: vacanza/holidays#2437
File: holidays/locale/dz_BT/LC_MESSAGES/BT.po:0-0
Timestamp: 2025-04-06T14:52:35.679Z
Learning: When suggesting changes to .po files in the holidays project, follow the standardized header format:
- Default language format: "# [COUNTRY-NAME-NORMAL] holidays. #"
- Non-default language format: "# [COUNTRY-NAME-NORMAL] holidays [LANGUAGE-CODE] localization. #"
For example, for Bhutan in Dzongkha, use "# Bhutan holidays dz_BT localization. #"
snapshots/countries/AI_COMMON.json (1)
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.
holidays/countries/anguilla.py (6)
Learnt from: KJhellico
PR: vacanza/holidays#2483
File: holidays/countries/turks_and_caicos_islands.py:117-118
Timestamp: 2025-05-13T13:23:11.375Z
Learning: The holidays library uses `_add_christmas_day_two` method to add Boxing Day holiday, not `_add_boxing_day`.
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants like FEB, TUE, MAR, and SUN internally through parent class implementations even when these constants don't appear directly in the file.
Learnt from: KJhellico
PR: vacanza/holidays#2524
File: holidays/countries/grenada.py:81-83
Timestamp: 2025-05-03T20:16:58.203Z
Learning: In the Vacanza holidays library, localization (l10n) comments are always written in American English (en_US locale), even when the translatable strings use different regional spellings. For example, comments use "Labor Day" while the corresponding translatable string might use "Labour Day".
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2385
File: holidays/countries/pakistan.py:59-60
Timestamp: 2025-03-31T11:50:50.488Z
Learning: In the holidays library, function names and comments follow en_US spelling conventions (e.g., "Labor Day"), while the default strings may use different locale conventions (e.g., "Labour Day" for en_PK) and are translated appropriately using the gettext function.
Learnt from: KJhellico
PR: vacanza/holidays#2402
File: holidays/countries/trinidad_and_tobago.py:75-76
Timestamp: 2025-04-05T09:44:39.998Z
Learning: In the holidays library, en_US locale is the standard for localization comments (using American English spelling like "Labor"), while the actual holiday names in code use the appropriate locale-specific spelling (like "Labour" for British English locales such as en_TT).
Learnt from: KJhellico
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:63-70
Timestamp: 2025-03-23T10:11:50.465Z
Learning: In the holidays library, the `SAT_SUN_TO_NEXT_MON_TUE` rule is specifically used for consecutive holidays (like Christmas Day and Boxing Day) to ensure they're observed on separate weekdays (Monday and Tuesday) when they fall on weekends, while `SAT_SUN_TO_NEXT_MON` is used as the default rule for other holidays.
🧬 Code Graph Analysis (2)
holidays/countries/__init__.py (1)
holidays/countries/anguilla.py (3)
Anguilla
(26-138)AI
(141-142)AIA
(145-146)
tests/countries/test_anguilla.py (2)
tests/common.py (8)
TestCase
(28-338)CommonCountryTests
(356-374)assertAliases
(121-130)assertHoliday
(150-152)assertHolidayName
(195-199)assertNoNonObservedHoliday
(248-250)assertNoHolidayName
(273-275)assertLocalizedHolidays
(327-338)holidays/countries/anguilla.py (3)
Anguilla
(26-138)AI
(141-142)AIA
(145-146)
🪛 Pylint (3.3.7)
tests/countries/test_anguilla.py
[convention] 1-1: Missing module docstring
(C0114)
[convention] 19-19: Missing class docstring
(C0115)
[warning] 21-21: Number of parameters was 4 in 'TestCase.setUpClass' and is now 1 in overriding 'TestAnguilla.setUpClass' method
(W0221)
[convention] 25-25: Missing function or method docstring
(C0116)
[convention] 28-28: Missing function or method docstring
(C0116)
[convention] 31-31: Missing function or method docstring
(C0116)
[convention] 44-44: Missing function or method docstring
(C0116)
[convention] 51-51: Missing function or method docstring
(C0116)
[convention] 73-73: Missing function or method docstring
(C0116)
[convention] 95-95: Missing function or method docstring
(C0116)
[convention] 117-117: Missing function or method docstring
(C0116)
[convention] 124-124: Missing function or method docstring
(C0116)
[convention] 146-146: Missing function or method docstring
(C0116)
[convention] 166-166: Missing function or method docstring
(C0116)
[convention] 188-188: Missing function or method docstring
(C0116)
[convention] 209-209: Missing function or method docstring
(C0116)
[convention] 230-230: Missing function or method docstring
(C0116)
[convention] 251-251: Missing function or method docstring
(C0116)
[convention] 258-258: Missing function or method docstring
(C0116)
[convention] 262-262: Missing function or method docstring
(C0116)
[convention] 269-269: Missing function or method docstring
(C0116)
[convention] 279-279: Missing function or method docstring
(C0116)
[convention] 301-301: Missing function or method docstring
(C0116)
[refactor] 19-19: Too many public methods (21/20)
(R0904)
holidays/countries/anguilla.py
[convention] 30-30: Line too long (111/100)
(C0301)
[convention] 31-31: Line too long (110/100)
(C0301)
[convention] 32-32: Line too long (110/100)
(C0301)
[convention] 33-33: Line too long (110/100)
(C0301)
[convention] 34-34: Line too long (110/100)
(C0301)
[convention] 35-35: Line too long (110/100)
(C0301)
[convention] 36-36: Line too long (110/100)
(C0301)
[convention] 37-37: Line too long (110/100)
(C0301)
[convention] 38-38: Line too long (110/100)
(C0301)
[convention] 39-39: Line too long (110/100)
(C0301)
[convention] 40-40: Line too long (110/100)
(C0301)
[convention] 41-41: Line too long (110/100)
(C0301)
[convention] 42-42: Line too long (132/100)
(C0301)
[convention] 43-43: Line too long (132/100)
(C0301)
[convention] 44-44: Line too long (147/100)
(C0301)
[convention] 45-45: Line too long (168/100)
(C0301)
[convention] 46-46: Line too long (152/100)
(C0301)
[convention] 47-47: Line too long (123/100)
(C0301)
[convention] 1-1: Missing module docstring
(C0114)
[convention] 141-141: Missing class docstring
(C0115)
[convention] 145-145: Missing class docstring
(C0115)
[convention] 149-149: Missing class docstring
(C0115)
[refactor] 149-149: Too few public methods (0/2)
(R0903)
🔇 Additional comments (5)
holidays/registry.py (1)
30-30
: Add Anguilla to country registry.Entry
"anguilla": ("Anguilla", "AI", "AIA")
is correctly formatted and placed in alphabetical order.holidays/countries/__init__.py (1)
22-22
: Import Anguilla in countries package.
Anguilla, AI, AIA
is imported and sorted alphabetically between Angola and Antigua and Barbuda.holidays/locale/en_US/LC_MESSAGES/AI.po (1)
1-109
: No changes needed; file structure and translations are correct.snapshots/countries/AI_COMMON.json (1)
1-671
: Snapshot looks good – remember it's auto-generatedNothing to flag here. Snapshot files are created by
make snapshot
; no manual edits are expected.holidays/countries/anguilla.py (1)
64-70
: 🧹 Nitpick (assertive)Redundant
_add_observed
calls
observed_rule
is already set toSAT_SUN_TO_NEXT_MON
as the default for the whole class (kwargs.setdefault(...)
).
Calling_add_observed()
for every fixed-date holiday is therefore redundant – the base class will already apply the rule whenobserved=True
(default). Dropping the explicit wrappers would simplify the method.- # New Year's Day. - self._add_observed(self._add_new_years_day(tr("New Year's Day"))) + # New Year's Day. + self._add_new_years_day(tr("New Year's Day"))(Same applies to Labor Day and James Ronald Webster Day.)
Likely an incorrect or invalid review comment.
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.
Some fixes for Queen's/King's Birthday l10n overcorrection for en_AI
here and a bit of others - aside from this and @KJhellico's suggestions above, this PR should be pretty much ready for merging 👍
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com> Signed-off-by: Arkadii Yakovets <2201626+arkid15r@users.noreply.github.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com> Signed-off-by: Arkadii Yakovets <2201626+arkid15r@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: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
tests/countries/test_anguilla.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
tests/countries/test_anguilla.py (3)
Learnt from: KJhellico
PR: vacanza/holidays#2483
File: holidays/countries/turks_and_caicos_islands.py:117-118
Timestamp: 2025-05-13T13:23:11.375Z
Learning: The holidays library uses `_add_christmas_day_two` method to add Boxing Day holiday, not `_add_boxing_day`.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: tests/countries/test_finland.py:23-26
Timestamp: 2025-05-09T18:36:09.607Z
Learning: The holidays project prioritizes complete historical coverage in tests, verifying holidays from their first year of observance (e.g., 1853 for Finland) through future projections, rather than using shorter sliding windows.
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:47:27.213Z
Learning: For holiday tests in the vacanza/holidays project, structure tests by individual holidays rather than by years. Each test method should focus on a specific holiday and test it across multiple years (from start_year through 2050) using helper methods like `assertHolidayName`. For fixed holidays, use generators like `(f"{year}-01-01" for year in range(1991, 2051))`. For movable holidays, specify individual dates for specific years followed by a range check.
🧬 Code Graph Analysis (1)
tests/countries/test_anguilla.py (2)
tests/common.py (7)
TestCase
(28-338)CommonCountryTests
(356-374)assertAliases
(121-130)assertHolidayName
(195-199)assertNoNonObservedHoliday
(248-250)assertNoHolidayName
(273-275)assertLocalizedHolidays
(327-338)holidays/countries/anguilla.py (3)
Anguilla
(27-147)AI
(150-151)AIA
(154-155)
🪛 Pylint (3.3.7)
tests/countries/test_anguilla.py
[convention] 1-1: Missing module docstring
(C0114)
[convention] 19-19: Missing class docstring
(C0115)
[warning] 21-21: Number of parameters was 4 in 'TestCase.setUpClass' and is now 1 in overriding 'TestAnguilla.setUpClass' method
(W0221)
[convention] 25-25: Missing function or method docstring
(C0116)
[convention] 28-28: Missing function or method docstring
(C0116)
[convention] 38-38: Missing function or method docstring
(C0116)
[convention] 51-51: Missing function or method docstring
(C0116)
[convention] 65-65: Missing function or method docstring
(C0116)
[convention] 78-78: Missing function or method docstring
(C0116)
[convention] 91-91: Missing function or method docstring
(C0116)
[convention] 104-104: Missing function or method docstring
(C0116)
[convention] 116-116: Missing function or method docstring
(C0116)
[convention] 129-129: Missing function or method docstring
(C0116)
[convention] 144-144: Missing function or method docstring
(C0116)
[convention] 155-155: Missing function or method docstring
(C0116)
[convention] 170-170: Missing function or method docstring
(C0116)
[convention] 183-183: Missing function or method docstring
(C0116)
[convention] 196-196: Missing function or method docstring
(C0116)
[convention] 209-209: Missing function or method docstring
(C0116)
[convention] 232-232: Missing function or method docstring
(C0116)
[convention] 245-245: Missing function or method docstring
(C0116)
[convention] 258-258: Missing function or method docstring
(C0116)
[convention] 281-281: Missing function or method docstring
(C0116)
[refactor] 19-19: Too many public methods (21/20)
(R0904)
|
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!
Proposed change
Add Anguilla holidays.
Resolves #2410
Type of change
holidays
functionality in general)Checklist
make check
, all checks and tests are green