Skip to content

Refactor United Kingdom holidays#3262

Merged
arkid15r merged 3 commits intovacanza:devfrom
KJhellico:ref-united-kingdom
Feb 13, 2026
Merged

Refactor United Kingdom holidays#3262
arkid15r merged 3 commits intovacanza:devfrom
KJhellico:ref-united-kingdom

Conversation

@KJhellico
Copy link
Copy Markdown
Collaborator

Proposed change

Refactor United Kingdom holidays:

  • separate shared holidays of England, Wales, and Northern Ireland (also applicable to the Isle of Man)
  • update tests

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 11, 2026

Summary by CodeRabbit

  • Refactor

    • Consolidated UK holiday rules into a shared routine and adjusted Isle of Man holiday population, changing which holidays are added for Isle of Man.
  • Documentation

    • Updated localization files and version metadata to 0.91; relocated several translation entries and removed Isle of Man translations for Easter Monday, Whit Monday, and Late Summer Bank Holiday.
  • Tests

    • Renamed several United Kingdom tests and simplified Isle of Man test coverage by removing specific holiday tests.

Walkthrough

Refactors UK/Isle of Man holiday generation by extracting cross-cutting Easter/Whit/Late Summer Bank Holiday logic into UnitedKingdom._populate_common(), updates Isle of Man to use it, adjusts locale PO files (metadata bumps and some entry removals/reordering), and updates/refactors related tests and test names.

Changes

Cohort / File(s) Summary
UK/IM holiday logic
holidays/countries/united_kingdom.py, holidays/countries/isle_of_man.py
Add UnitedKingdom._populate_common() to centralize Easter Monday / Whit Monday / Late Summer Bank Holiday rules; replace inlined calls in subdivision population methods and have IsleOfMan delegate to the common population path.
Locale PO files (metadata & small content edits)
holidays/locale/en_GB/LC_MESSAGES/GB.po, holidays/locale/en_US/LC_MESSAGES/GB.po, holidays/locale/en_GB/LC_MESSAGES/IM.po, holidays/locale/en_US/LC_MESSAGES/IM.po, holidays/locale/th/LC_MESSAGES/GB.po, holidays/locale/th/LC_MESSAGES/IM.po
Bump Project-Id-Version/PO-Revision-Date metadata (0.66 → 0.91); remove Isle of Man entries for Easter Monday, Whit Monday, Late Summer Bank Holiday; reorder several GB translation blocks (New Year/Christmas/Boxing Day).
Tests — Isle of Man
tests/countries/test_isle_of_man.py
Rename test class (TestIMTestIsleOfMan) and remove tests for Easter Monday, Whit Monday, and Late Summer Bank Holiday (coverage for those moved to common logic).
Tests — United Kingdom
tests/countries/test_united_kingdom.py
Large refactor: simplify setUpClass call, rename several test methods (e.g., New Year(s) and saint names), replace hardcoded per-subdivision/year setups with subdivision-aware helpers and dynamic year ranges, and consolidate/modernize observed/non-observed holiday assertions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • arkid15r
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Refactor United Kingdom holidays' accurately summarizes the main change: a refactoring of the UK holidays implementation to consolidate shared holiday logic.
Description check ✅ Passed The description clearly relates to the changeset, explaining the refactoring of UK holidays and consolidation of shared holidays across subdivisions, with test updates.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (493f6ec) to head (637e46a).
⚠️ Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3262   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          307       307           
  Lines        18381     18370   -11     
  Branches      2358      2351    -7     
=========================================
- Hits         18381     18370   -11     

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

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 11, 2026
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
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.

LGTM 🇬🇧

@arkid15r arkid15r added this pull request to the merge queue Feb 13, 2026
Merged via the queue into vacanza:dev with commit ad33a65 Feb 13, 2026
32 checks passed
@KJhellico KJhellico deleted the ref-united-kingdom branch February 13, 2026 16:13
@arkid15r arkid15r mentioned this pull request Feb 16, 2026
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.

3 participants