+
Skip to content

Conversation

KJhellico
Copy link
Collaborator

Proposed change

Update Slovakia holidays: additional holidays moved to WORKDAY for 2026 (May 8 and Sep 16).

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 Oct 14, 2025

Summary by CodeRabbit

  • New Features
    • Added year-specific handling for Slovakia’s 2026 calendar: designated Victory over Fascism Day (May 8) and Our Lady of the Seven Sorrows (Sep 15) as workday holidays instead of public holidays.
  • Bug Fixes
    • Corrected public holiday coverage ranges to exclude 2026 for the above holidays, aligning with updated legislation.
  • Documentation
    • Updated references and notes to reflect new legal provisions and effective periods.
  • Tests
    • Adjusted and expanded test cases to validate 2026 workday treatment and revised public holiday ranges.

Walkthrough

Implements 2026-specific exceptions in Slovakia holiday rules: excludes two public holidays for 2026 and reclassifies them as WORKDAY holidays, adds year-bounded logic tied to Laws 530/2023, 326/2020, and 261/2025, updates references, and aligns tests to validate public vs. workday classification.

Changes

Cohort / File(s) Change summary
Slovakia holiday rules
`holidays/countries/slovakia.py`
Added year-conditional logic for 2026 to omit public holidays for Victory over Fascism and Our Lady of the Seven Sorrows; added WORKDAY entries for 2026 per Law 261/2025; annotated effective periods for Laws 530/2023 and 326/2020; updated documentation references.
Slovakia tests
`tests/countries/test_slovakia.py`
Adjusted assertions to exclude 2026 from public holidays and include 2026 as WORKDAY for the two holidays; reworked year ranges and added explicit presence/absence checks for public vs. workday classifications.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

test

Suggested reviewers

  • arkid15r

Pre-merge checks and finishing touches

❌ 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%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title accurately summarizes the primary change by specifying that additional Slovak holidays are moved to the WORKDAY category for 2026, making it concise and clear about the key update.
Description Check ✅ Passed The description directly relates to the changeset by stating the update of moving specific Slovak holidays to WORKDAY for 2026 and naming the relevant dates, so it clearly aligns with the changes introduced.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0f97ba3 and 2f6fae4.

📒 Files selected for processing (2)
  • holidays/countries/slovakia.py (4 hunks)
  • tests/countries/test_slovakia.py (2 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-09-14T04:41:10.139Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_south_africa.py:22-22
Timestamp: 2025-09-14T04:41:10.139Z
Learning: South Africa's observed holiday system only started in 1995, so in tests/countries/test_south_africa.py, using years_non_observed=range(1995, 2050) is intentional to limit testing to years where observed holidays actually exist, improving both correctness and performance.

Applied to files:

  • tests/countries/test_slovakia.py
📚 Learning: 2025-05-06T21:07:11.577Z
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: tests/countries/test_andorra.py:23-28
Timestamp: 2025-05-06T21:07:11.577Z
Learning: In the holidays project, test methods for country holidays follow a standard form where year ranges are explicitly recreated in each test method rather than being stored as class variables, to maintain consistency across all country tests.

Applied to files:

  • tests/countries/test_slovakia.py
📚 Learning: 2025-04-05T04:47:27.213Z
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.

Applied to files:

  • tests/countries/test_slovakia.py
📚 Learning: 2025-05-09T18:36:09.607Z
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.

Applied to files:

  • tests/countries/test_slovakia.py
📚 Learning: 2025-09-14T17:17:14.387Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_saint_helena_ascension_and_tristan_da_cunha.py:209-209
Timestamp: 2025-09-14T17:17:14.387Z
Learning: In tests/countries/test_saint_helena_ascension_and_tristan_da_cunha.py, the explicit loop iteration pattern for subdivision-specific holiday checks (like Anniversary Day for TA subdivision) is intentionally preferred over using assertSubdivTa helper methods, as confirmed by PPsyrius.

Applied to files:

  • tests/countries/test_slovakia.py
📚 Learning: 2025-09-20T12:21:50.877Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_belgium.py:28-30
Timestamp: 2025-09-20T12:21:50.877Z
Learning: Belgium holidays implementation currently lacks a start_year attribute. In tests/countries/test_belgium.py, do not suggest adding test_no_holidays methods that rely on start_year until the start_year attribute is introduced to Belgium's holiday implementation.

Applied to files:

  • tests/countries/test_slovakia.py
🧬 Code graph analysis (2)
holidays/countries/slovakia.py (1)
holidays/groups/international.py (1)
  • _add_world_war_two_victory_day (215-226)
tests/countries/test_slovakia.py (1)
tests/common.py (2)
  • assertHolidayName (198-202)
  • assertNoHolidayName (305-307)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Test Python 3.14 on windows-latest
  • GitHub Check: Test Python 3.10 on windows-latest
🔇 Additional comments (7)
holidays/countries/slovakia.py (5)

28-30: Documentation updated with legal references.

The addition of archived law references (326/2020, 530/2023, 261/2025) properly documents the legal basis for these changes. Good practice.


64-66: 2026 exclusion correctly implemented.

The conditional self._year != 2026 properly excludes 2026 from the public holiday set while maintaining the 1997 start year for all other years.


101-108: WORKDAY reclassification for 2026 implemented correctly.

Both holidays are properly added as WORKDAY holidays exclusively for 2026, complementing their exclusion from the public holiday set. The Law 261/2025 reference is clear.


109-122: Law ordering comments improve maintainability.

The comments clearly identify which law governs each section, making the code easier to understand and maintain.


78-80: No changes required: the "Day of Our Lady of the Seven Sorrows" is rightly set to September 15.

tests/countries/test_slovakia.py (2)

81-86: Comprehensive test coverage for 2026 exclusion.

The test correctly validates:

  • Public holiday for years 1997-2025 and 2027-2049
  • No public holiday for 1993-1996 and 2026
  • WORKDAY holiday for 2026 only

Pattern matches the implementation perfectly.


112-118: Test coverage complete for Lady of Seven Sorrows.

The test validates:

  • Public holiday for all years except 2026
  • WORKDAY holiday exclusively for 2026

Consistent with the implementation and follows the same pattern as the Victory test.


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 link

codecov bot commented Oct 14, 2025

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3005   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          306       306           
  Lines        18072     18076    +4     
  Branches      2332      2334    +2     
=========================================
+ Hits         18072     18076    +4     

☔ 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
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 🇸🇰

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

👍

@arkid15r arkid15r added this pull request to the merge queue Oct 15, 2025
Merged via the queue into vacanza:dev with commit 4e7f667 Oct 15, 2025
36 checks passed
@KJhellico KJhellico deleted the upd-slovakia branch October 15, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载