Skip to content

Conversation

@KJhellico
Copy link
Collaborator

Proposed change

Update Uzbekistan holidays.

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
Contributor

coderabbitai bot commented Jun 25, 2025

Summary by CodeRabbit

  • New Features
    • Updated Uzbekistan holiday calendar with confirmed dates for 2024 and 2025, including Islamic holidays and special public holidays.
  • Bug Fixes
    • Corrected a 2018 holiday date and updated holiday descriptions for accuracy.
  • Documentation
    • Enhanced documentation with official references for Uzbekistan holidays.
  • Tests
    • Expanded test coverage for Uzbekistan holidays, including special, substituted, and working days.

Walkthrough

Uzbekistan holiday data and tests were updated. New and corrected dates for Islamic holidays and special public holidays were added for 2024 and 2025. Documentation and comments were refined. Tests now cover more holiday scenarios, including substituted and working days, and validate holiday names and observance logic.

Changes

Files/Groups Change Summary
holidays/countries/uzbekistan.py Updated and added 2024–2025 Islamic and special holiday dates; added docstrings; fixed comment punctuation.
snapshots/countries/UZ_COMMON.json Adjusted holiday entries: confirmed dates, added/removed days off, updated descriptions for 2018, 2024, 2025.
tests/countries/test_uzbekistan.py Expanded test coverage for holidays, substituted days, working days; enhanced assertions and inheritance.

📜 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 ee60201 and fbdfdf5.

📒 Files selected for processing (3)
  • holidays/countries/uzbekistan.py (5 hunks)
  • snapshots/countries/UZ_COMMON.json (3 hunks)
  • tests/countries/test_uzbekistan.py (3 hunks)
🧰 Additional context used
🧠 Learnings (1)
tests/countries/test_uzbekistan.py (3)
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:31-49
Timestamp: 2025-04-05T04:50:40.752Z
Learning: For Turkmenistan holiday tests, use this class structure: `class TestTurkmenistan(CommonCountryTests, TestCase)` with imports `from unittest import TestCase`, `from holidays.countries import Turkmenistan, TM, TKM`, and `from tests.common import CommonCountryTests`. Ensure to call `super().setUp()` in the setUp method.
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:33:53.254Z
Learning: For Turkmenistan holiday tests, recommend using CommonCountryTests as the base class rather than unittest.TestCase to follow project conventions, be consistent with other country test files, and gain access to common test utilities.
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:85-86
Timestamp: 2025-04-05T04:29:38.042Z
Learning: For testing holiday implementations in the vacanza/holidays repository, recommend using `from tests.common import CommonCountryTests` as the base class instead of directly using `unittest.TestCase` to maintain consistency with project conventions and leverage common test utilities.
🧬 Code Graph Analysis (1)
tests/countries/test_uzbekistan.py (2)
tests/common.py (7)
  • WorkingDayTests (423-442)
  • TestCase (28-338)
  • setUpClass (32-53)
  • assertHoliday (150-152)
  • assertWorkingDay (436-438)
  • assertHolidayName (195-199)
  • assertHolidays (228-230)
holidays/countries/uzbekistan.py (2)
  • Uzbekistan (22-104)
  • UZ (107-108)
🪛 Pylint (3.3.7)
holidays/countries/uzbekistan.py

[refactor] 163-163: Too few public methods (0/2)

(R0903)

tests/countries/test_uzbekistan.py

[convention] 19-19: Missing class docstring

(C0115)


[warning] 21-21: Number of parameters was 4 in 'TestCase.setUpClass' and is now 1 in overriding 'TestUzbekistan.setUpClass' method

(W0221)


[convention] 26-26: Missing function or method docstring

(C0116)


[convention] 29-29: Missing function or method docstring

(C0116)


[convention] 32-32: Missing function or method docstring

(C0116)


[convention] 62-62: Missing function or method docstring

(C0116)


[convention] 93-93: Missing function or method docstring

(C0116)


[refactor] 19-19: Too many public methods (22/20)

(R0904)


[convention] 169-169: Missing function or method docstring

(C0116)


[convention] 211-211: Missing function or method docstring

(C0116)

⏰ Context from checks skipped due to timeout of 300000ms (5)
  • GitHub Check: Test Python 3.11 on windows-latest
  • GitHub Check: Test Python 3.12 on windows-latest
  • GitHub Check: Test Python 3.13 on windows-latest
  • GitHub Check: Test Python 3.9 on windows-latest
  • GitHub Check: Test Python 3.10 on windows-latest
🔇 Additional comments (13)
holidays/countries/uzbekistan.py (5)

58-58: Minor punctuation improvement looks good.

Clean fix to the comment punctuation.


135-136: Islamic holiday dates updated for 2024-2025.

Good work adding the exact confirmed dates for Eid al-Adha and Eid al-Fitr. This removes the "estimated" labels and provides accurate holiday information.

Also applies to: 159-159


164-175: Excellent documentation enhancement.

Adding official references with archived links strengthens the reliability of the holiday data. The comprehensive year-by-year documentation is particularly valuable.


251-251: New 2025 substituted holiday entry looks correct.

The January 2, 2025 substitution to January 4, 2025 follows the established pattern for holiday substitutions.


190-190: Let’s pull a few lines around the “20 марта” entries to see exactly how it’s referenced in the decree:

#!/bin/bash
curl -s "https://web.archive.org/web/20250610012705/https://lex.uz/ru/docs/3479237" \
  | grep -E -C3 "20 марта"
snapshots/countries/UZ_COMMON.json (1)

233-233: Snapshot updates are consistent with holiday data changes.

The snapshot correctly reflects the updates made to the main holiday file:

  • 2018 date correction (March 20 vs March 30)
  • Removal of "estimated" labels for 2024-2025 Islamic holidays
  • Addition of 2025 substituted holiday

The consistency between the snapshot and main data file ensures test reliability.

Also applies to: 336-337, 348-348, 352-353, 355-355

tests/countries/test_uzbekistan.py (7)

16-16: Good addition of WorkingDayTests functionality.

Adding WorkingDayTests to the inheritance and imports follows project conventions and enables comprehensive testing of working day substitutions.

Also applies to: 19-19


22-24: Enhanced setUpClass configuration looks good.

The extended years range and no_estimated_holidays setup provides comprehensive test coverage across historical and future dates.


32-60: Comprehensive special holidays testing.

Good coverage of presidential decree holidays across multiple years. The test systematically covers all the additional days off mentioned in the documentation.


62-91: Thorough substituted holidays testing.

Excellent coverage of holiday substitutions including the new 2025 entry. This ensures the substitution logic works correctly across different years.


93-122: Working days testing adds valuable coverage.

Testing working days ensures that the substitution mechanism correctly identifies when holidays are moved from weekends to weekdays.


157-167: Enhanced Islamic holiday testing.

The updated tests now verify both estimated and confirmed dates, and the use of no_estimated_holidays ensures broad coverage across all years. This is particularly valuable given the 2024-2025 exact date additions.

Also applies to: 170-182


195-209: Test format updates improve clarity.

Converting to tuple format with explicit holiday names makes the tests more readable and maintainable, while ensuring exact matching of holiday data.

Also applies to: 212-230

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • 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.

@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Jun 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (ee60201) to head (fbdfdf5).
Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2679   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          251       251           
  Lines        15286     15286           
  Branches      2095      2095           
=========================================
  Hits         15286     15286           

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

LGTM

@arkid15r arkid15r added this pull request to the merge queue Jun 26, 2025
Merged via the queue into vacanza:dev with commit 29372bd Jun 26, 2025
33 checks passed
@KJhellico KJhellico deleted the upd-uzbekistan branch June 26, 2025 13:38
@KJhellico KJhellico mentioned this pull request Jul 7, 2025
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