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

Update working day related calculations #2010

Merged
merged 4 commits into from
Sep 25, 2024

Conversation

KJhellico
Copy link
Collaborator

Proposed change

Update working day-related calculations:

  • Update HolidayBase::get_workdays_number() logic
  • Update documentation

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

- Update `HolidayBase::get_workdays_number()` logic
- Update documentation
Copy link

codecov bot commented Sep 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (2a7442d) to head (e1e3129).
Report is 12 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2010   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          188       189    +1     
  Lines        11409     11456   +47     
  Branches      1791      1793    +2     
=========================================
+ Hits         11409     11456   +47     

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

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

@KJhellico @PPsyrius do you guys think we should update the v0 with this sort of a breaking change or just leave it for v1?

holidays/holiday_base.py Outdated Show resolved Hide resolved
KJhellico and others added 2 commits September 23, 2024 23:14
Co-authored-by: Arkadii Yakovets <2201626+arkid15r@users.noreply.github.com>
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.

Some naming options to consider (based on my chat with an AI bot):

  • HolidayBase::is_workday to HolidayBase::is_working_day
  • HolidayBase::get_workdays_number to HolidayBase::get_working_days_count

holidays/holiday_base.py Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Sep 24, 2024

@arkid15r arkid15r changed the title Update working day-related calculations Update working day related calculations Sep 25, 2024
@arkid15r arkid15r added this pull request to the merge queue Sep 25, 2024
Merged via the queue into vacanza:dev with commit 041681a Sep 25, 2024
32 checks passed
@KJhellico KJhellico deleted the upd-working-days branch September 26, 2024 13:53
@arkid15r arkid15r mentioned this pull request Oct 7, 2024
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.

2 participants