Skip to content

Conversation

Prateekshit73
Copy link
Contributor

Proposed change

Add Anguilla holidays.

Resolves #2410

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

Copy link
Contributor

coderabbitai bot commented Jun 10, 2025

Summary by CodeRabbit

  • New Features
    • Added support for Anguilla public holidays, including a comprehensive list of national and special observance days from 2001 to 2050.
    • Introduced localization for Anguilla holidays in both English (en_AI) and US English (en_US).
  • Documentation
    • Updated documentation to reflect Anguilla as a supported country.
  • Tests
    • Added extensive tests to ensure accuracy of Anguilla holiday dates, names, observed rules, and localization.

Summary by CodeRabbit

  • New Features
    • Added support for Anguilla public holidays, including all major national, Christian, and international observances, with accurate handling of observed dates and special one-off holidays.
    • Introduced aliases and localization for Anguilla holidays in both en_AI and en_US languages.
  • Documentation
    • Updated documentation to reflect the addition of Anguilla as a supported country.
  • Tests
    • Added comprehensive tests to verify holiday dates, names, observed rules, special holidays, and localization for Anguilla.

Walkthrough

Support 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

Files/Paths Change Summary
holidays/countries/anguilla.py, holidays/countries/init.py Added Anguilla holiday module; imported Anguilla in country init file.
holidays/registry.py, README.md Registered Anguilla in country registry and updated documentation.
holidays/locale/en_US/LC_MESSAGES/AI.po, holidays/locale/en_AI/LC_MESSAGES/AI.po Added US English and Anguilla English localization files for Anguilla holidays.
snapshots/countries/AI_COMMON.json Added holiday snapshot data for Anguilla (2001–2050).
tests/countries/test_anguilla.py Added comprehensive unit tests for Anguilla holiday definitions and localization.

Assessment against linked issues

Objective Addressed Explanation
Implement Anguilla public holidays (#2410)
Register Anguilla in country registry (#2410)
Add localization for Anguilla holidays (#2410)
Add tests for Anguilla holidays (#2410)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes detected. All modifications align with the objectives of adding Anguilla holidays and related support.

Suggested reviewers

  • PPsyrius

📜 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 7630381 and efec909.

📒 Files selected for processing (1)
  • README.md (2 hunks)
⏰ Context from checks skipped due to timeout of 300000ms (16)
  • GitHub Check: Test Python 3.13 on windows-latest
  • GitHub Check: Test Python 3.12 on macos-latest
  • GitHub Check: Test Python 3.12 on windows-latest
  • GitHub Check: Test Python 3.13 on ubuntu-latest
  • GitHub Check: Test Python 3.9 on ubuntu-latest
  • GitHub Check: Test Python 3.12 on ubuntu-latest
  • GitHub Check: Test Python 3.11 on windows-latest
  • GitHub Check: Test Python 3.11 on ubuntu-latest
  • GitHub Check: Test Python 3.11 on macos-latest
  • GitHub Check: Test Python 3.10 on windows-latest
  • GitHub Check: Test Python 3.9 on windows-latest
  • GitHub Check: Test Python 3.13 on macos-latest
  • GitHub Check: Test Python 3.9 on macos-latest
  • GitHub Check: Test Python 3.10 on macos-latest
  • GitHub Check: Test Python 3.10 on ubuntu-latest
  • GitHub Check: CodeQL
🔇 Additional comments (1)
README.md (1)

108-108: Confirm supported country count
The count has been updated to 190; please verify this matches the actual number of supported country codes in the registry.

✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Commit Unit Tests in branch add-anguilla
  • Post Copyable Unit Tests in 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.

Copy link

codecov bot commented Jun 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (385811f) to head (efec909).
⚠️ Report is 209 commits behind head on dev.

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 mirror msgid, or leave them empty per existing practice.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8b4f02b and ee6bf5d.

📒 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 line from 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. Ensure Language: 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 8b4f02b and ee6bf5d.

📒 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 correctly

Entry "anguilla": ("Anguilla", "AI", "AIA") follows the existing pattern and integrates the new country module as expected.

README.md (2)

108-108: Updated supported country count

The 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 table

The 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 module

The 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 fallback

All msgstr fields are empty. For the en_US locale, you may populate msgstr with the corresponding msgid, 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 other en_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 holidays

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

@KJhellico KJhellico changed the title Add Anguilla holiday Add Anguilla holidays Jun 10, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between ee6bf5d and 1cf8f20.

📒 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-generated

Nothing 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 to SAT_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 when observed=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.

Copy link
Collaborator

@PPsyrius PPsyrius left a 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 👍

arkid15r and others added 2 commits June 16, 2025 08:35
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>
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 99c25d4 and 26a3c01.

📒 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)

@arkid15r arkid15r enabled auto-merge June 16, 2025 21:51
Copy link

Copy link
Collaborator

@KJhellico KJhellico left a comment

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 Jun 16, 2025
Merged via the queue into vacanza:dev with commit 3894211 Jun 16, 2025
33 checks passed
@arkid15r arkid15r mentioned this pull request Jun 16, 2025
@Prateekshit73 Prateekshit73 deleted the add-anguilla branch June 17, 2025 03:06
@coderabbitai coderabbitai bot mentioned this pull request Jul 9, 2025
9 tasks
@coderabbitai coderabbitai bot mentioned this pull request Aug 15, 2025
9 tasks
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 Anguilla holidays
4 participants