Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement holidays date range limit #1835

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft

Conversation

arkid15r
Copy link
Collaborator

Proposed change

Resolves #1825

Implements holidays date range functionality requested in #1825. It touches quite deep HolidayBase code (some refactoring plus a bunch of None values were provided where it wasn't expected), so please review carefully:

  • Add HolidayBase::since and HolidayBase::until parameters
  • Refactor types into a separate module
  • Extract DateLike conversion to date to a separate module
  • Update documentation with examples
  • Fix specific observance logic cases for some countries
  • Update test_utils::TestYears 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/upgrade)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (a code change causing existing functionality to break)
  • New feature (new python-holidays functionality in general)

Checklist

  • I've followed the contributing guidelines
  • I've run make pre-commit, it didn't generate any changes
  • I've run make test, all tests passed locally

      - Add `HolidayBase::since` and `HolidayBase::until` parameters
      - Refactor types into a separate module
      - Extract DateLike conversion to date to a separate module
      - Update documentation with examples
      - Fix specific observance logic cases for some countries
      - Update `test_utils::TestYears` tests
@arkid15r arkid15r requested a review from KJhellico as a code owner June 18, 2024 17:38
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (5c84b47) to head (c7a14cd).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #1835   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          184       185    +1     
  Lines        11184     11215   +31     
  Branches      1763      1774   +11     
=========================================
+ Hits         11184     11215   +31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Jun 18, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@arkid15r arkid15r marked this pull request as draft June 21, 2024 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to check for holidays within an interval of time
1 participant