Skip to content

Add Kosovo holidays#3327

Merged
arkid15r merged 10 commits intovacanza:devfrom
bleendd:add-kosovo-holidays
Mar 16, 2026
Merged

Add Kosovo holidays#3327
arkid15r merged 10 commits intovacanza:devfrom
bleendd:add-kosovo-holidays

Conversation

@bleendd
Copy link
Copy Markdown
Contributor

@bleendd bleendd commented Mar 12, 2026

Add Kosovo holidays

Add public holidays for the Republic of Kosovo (XK/XKK) based on Law No. 03/L-064 on Public Holidays in the Republic of Kosovo.

Resolves #3129

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

  Add public holidays for Kosovo based on Law No. 03/L-064.
  Includes Catholic, Orthodox, and Islamic holidays with
  localizations for Albanian (sq), English (en_US), and Serbian (sr).

  Resolves vacanza#3129
Copilot AI review requested due to automatic review settings March 12, 2026 20:15
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 12, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds Kosovo (XK) country support: new Kosovo holiday provider and XK/XKK aliases, registry entry, package export, locale translations (en_US, sq, sr), snapshot, tests, README and CONTRIBUTORS updates.

Changes

Cohort / File(s) Summary
Repository metadata
CONTRIBUTORS, README.md
Added contributor entry and updated available countries count; inserted Kosovo row in docs table.
Registry
holidays/registry.py
Added kosovo entry with display name Kosovo and codes XK, XKK.
Package exports
holidays/countries/__init__.py
Imported and exposed new symbols: Kosovo, XK, XKK.
Country implementation
holidays/countries/kosovo.py
New Kosovo class (ObservedHolidayBase + Christian/International/Islamic mixins), attributes (country="XK", default_language="sq", supported_languages=("en_US","sq","sr"), start_year=2009), constructor option islamic_show_estimated, population logic, and XK/XKK aliases.
Localization
holidays/locale/en_US/LC_MESSAGES/XK.po, holidays/locale/sq/LC_MESSAGES/XK.po, holidays/locale/sr/LC_MESSAGES/XK.po
Added gettext catalogs for Kosovo holidays (English translations provided; Albanian placeholders; Serbian translations added).
Snapshots
snapshots/countries/XK_COMMON.json
New date→holiday snapshot (2009–2050) including observed and estimated variations.
Tests
tests/countries/test_kosovo.py
New comprehensive tests covering holidays, Easter variants, Islamic estimated labeling, 2024 snapshot, and localization checks.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • arkid15r
  • PPsyrius
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.56% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add Kosovo holidays' directly and clearly summarizes the main objective of the changeset—adding public holiday support for Kosovo.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose of adding Kosovo holidays, referencing the relevant law, and noting the resolution of issue #3129.
Linked Issues check ✅ Passed The changeset fully addresses issue #3129 by implementing a Kosovo class with ChristianHolidays and IslamicHolidays mixins, ObservedHolidayBase support, and comprehensive holiday coverage with localization.
Out of Scope Changes check ✅ Passed All changes are in scope: the implementation adds Kosovo support as required, updates registry and documentation, includes localization files, tests, and snapshots—all directly supporting the feature objective.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Kosovo (XK/XKK) as a supported country with public holiday definitions and localization, expanding the library’s country registry and documentation.

Changes:

  • Introduces holidays.countries.kosovo.Kosovo with Kosovo public holidays (incl. Catholic/Orthodox Easter and Islamic holidays).
  • Adds localization catalogs for sq (default), en_US, and sr, plus a snapshot baseline for XK.
  • Registers Kosovo in the country registry/public API exports and documents it in the README; adds a dedicated test suite.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
holidays/countries/kosovo.py Implements Kosovo holiday rules and aliases XK/XKK.
holidays/registry.py Registers kosovo with codes XK and XKK.
holidays/countries/__init__.py Exposes Kosovo, XK, XKK in the public countries namespace.
holidays/locale/sq/LC_MESSAGES/XK.po Adds source (sq) catalog entries for XK holiday names/labels.
holidays/locale/en_US/LC_MESSAGES/XK.po Adds English translations for XK holiday names/estimated label.
holidays/locale/sr/LC_MESSAGES/XK.po Adds Serbian translations for XK holiday names/estimated label.
tests/countries/test_kosovo.py Adds unit tests and localization checks for Kosovo.
snapshots/countries/XK_COMMON.json Adds snapshot output for Kosovo common holidays.
README.md Increments supported country count and adds Kosovo to the supported countries table.
CONTRIBUTORS Adds contributor name.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Copy Markdown
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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@holidays/locale/en_US/LC_MESSAGES/XK.po`:
- Around line 42-48: Update the English translations to faithfully mirror the
Albanian source strings: change the msgstr for "Dita e Pavarësisë së Republikës
së Kosovës" to include "of the Republic of Kosovo" (e.g., "Independence Day of
the Republic of Kosovo") and change the msgstr for "Dita e Kushtetutës së
Republikës së Kosovës" to "Constitution Day of the Republic of Kosovo"; also
review the Islamic holiday entries (the msgids that mention "first day") and
ensure their msgstrs include "First day of ..." so the generated English
snapshot preserves the full original meaning.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: eabb1e15-11ab-4443-9c6b-84cb610d4b49

📥 Commits

Reviewing files that changed from the base of the PR and between dbcff93 and 0c0ae7c.

📒 Files selected for processing (10)
  • CONTRIBUTORS
  • README.md
  • holidays/countries/__init__.py
  • holidays/countries/kosovo.py
  • holidays/locale/en_US/LC_MESSAGES/XK.po
  • holidays/locale/sq/LC_MESSAGES/XK.po
  • holidays/locale/sr/LC_MESSAGES/XK.po
  • holidays/registry.py
  • snapshots/countries/XK_COMMON.json
  • tests/countries/test_kosovo.py

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (661581b) to head (efca99f).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3327   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          309       310    +1     
  Lines        18543     18583   +40     
  Branches      2377      2378    +1     
=========================================
+ Hits         18543     18583   +40     

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

@KJhellico
Copy link
Copy Markdown
Collaborator

Law No. 03/L-064:

Neni 4
Kur ditët e festave zyrtare të cekura në nenin 2 të këtij ligji bien ditën e shtunë ose të diel, ditë pushimi do
të jenë ditët pasardhëse të punës.

So, observed holidays support needs to be implemented too.

And as far as I can understand from the provisions of the law and calendars (like this), Easter Monday is not a separate holiday, but a day off transferred from Sunday (observed holiday).

@KJhellico KJhellico changed the title Add Kosovo (XK) holidays Add Kosovo holidays Mar 13, 2026
@bleendd
Copy link
Copy Markdown
Contributor Author

bleendd commented Mar 13, 2026

Law No. 03/L-064:

Neni 4
Kur ditët e festave zyrtare të cekura në nenin 2 të këtij ligji bien ditën e shtunë ose të diel, ditë pushimi do
të jenë ditët pasardhëse të punës.

So, observed holidays support needs to be implemented too.

And as far as I can understand from the provisions of the law and calendars (like this), Easter Monday is not a separate holiday, but a day off transferred from Sunday (observed holiday).

Thanks for the review! Implemented ObservedHolidayBase with SAT_SUN_TO_NEXT_WORKDAY per Article 4, used the same pattern as Albania.

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@holidays/locale/en_US/LC_MESSAGES/XK.po`:
- Around line 52-54: Add English translator comments above the Kosovo holiday
msgid entries so they match the sr locale; specifically insert a translator
comment (e.g., "#. English: Independence Day" or similar descriptive comment)
immediately above the msgid "Dita e Pavarësisë së Republikës së Kosovës" that
maps to msgstr "Independence Day", and likewise add the corresponding English
translator comment above the Constitution Day msgid/msgstr pair referenced
around the other lines (the same comment style and wording used in the sr locale
for consistency).

In `@holidays/locale/sq/LC_MESSAGES/XK.po`:
- Around line 52-54: Add translator comments above the translation entries for
Kosovo's Independence Day and Constitution Day similar to other locales: insert
a translator comment (e.g., "#. Translators: name/description" or "#
Translators: comment") immediately above the msgid "Dita e Pavarësisë së
Republikës së Kosovës" and the corresponding msgid entries for the Constitution
Day entries referenced in the file so they match the style used in other locale
PO files.

In `@holidays/locale/sr/LC_MESSAGES/XK.po`:
- Around line 52-54: Add the missing English translator comment lines (the "#. "
translator comment) above the msgid entries for "Dita e Pavarësisë së Republikës
së Kosovës" and the msgid at lines 63-65 (Constitution Day entry) so they match
other entries' format; locate the two msgid strings "Dita e Pavarësisë së
Republikës së Kosovës" and the Constitution Day msgid in XK.po and insert the
appropriate English comments (e.g., "#. Independence Day" and "#. Constitution
Day" or the existing English phrases used elsewhere) directly above their
corresponding msgid lines.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: e85a4904-109d-43e5-8952-c8142e288146

📥 Commits

Reviewing files that changed from the base of the PR and between f723714 and 1e95883.

📒 Files selected for processing (6)
  • holidays/countries/kosovo.py
  • holidays/locale/en_US/LC_MESSAGES/XK.po
  • holidays/locale/sq/LC_MESSAGES/XK.po
  • holidays/locale/sr/LC_MESSAGES/XK.po
  • snapshots/countries/XK_COMMON.json
  • tests/countries/test_kosovo.py

- Remove future dates (2027+) from observed test assertions
- Inline obs_name variable (used only once)
- Move test_catholic_christmas_day before test_eid_al_fitr (holiday order)
- Change test_2024 to test_2025 (was duplicate of test_l10n_default)
@bleendd bleendd requested a review from KJhellico March 14, 2026 17:58
Copy link
Copy Markdown
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.

Last small fix, rest is LGTM.

@bleendd bleendd force-pushed the add-kosovo-holidays branch from 4b5c83a to 3f492e7 Compare March 15, 2026 17:35
@bleendd bleendd force-pushed the add-kosovo-holidays branch from 3f492e7 to 1bca614 Compare March 15, 2026 17:41
Co-authored-by: ~Jhellico <[email protected]>
Signed-off-by: Blend Halilaj <[email protected]>
KJhellico
KJhellico previously approved these changes Mar 15, 2026
Copy link
Copy Markdown
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! Great work! 👍

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Arkadii Yakovets <[email protected]>
@arkid15r arkid15r enabled auto-merge March 16, 2026 02:38
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging this for tomorrow's release. Thanks for the contribution @bleendd 👍

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 Mar 16, 2026
Merged via the queue into vacanza:dev with commit 991ad05 Mar 16, 2026
32 checks passed
@arkid15r arkid15r mentioned this pull request Mar 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.

Feature Request: Add support for Kosovo (XK)

5 participants