python-holidays icon indicating copy to clipboard operation
python-holidays copied to clipboard

Migrate Equinoxes and Solstices logic to `International` holiday group

Open PPsyrius opened this issue 1 year ago • 4 comments

Proposed change

This PR migrates the existing Vernal Equinox, Summer Solstice, Autumnal Equinox, and Winter Solstice implementation logic to the common International holidays group, hopefully, reducing code redundancy for future holiday additions.

(Done in preparation for future #784 implementations i.e. Zurich's historic "Sechseläuten" cases from 1902-1951)

Type of change

  • [ ] New country/market holidays support (thank you!)
  • [ ] Supported country/market holidays update (calendar discrepancy fix, localization)
  • [x] 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

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

PPsyrius avatar Aug 28 '24 09:08 PPsyrius

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (66bf2df) to head (41f17b6). Report is 216 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #1958   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          187       187           
  Lines        11380     11386    +6     
  Branches      1792      1792           
=========================================
+ Hits         11380     11386    +6     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 28 '24 09:08 codecov[bot]

This is a useful change. 👍 However, when using these methods for holidays in other countries, you should be careful, as the existing date interpolation code is tested and valid only for the corresponding countries (Chile, Japan, Hong Kong).

KJhellico avatar Aug 28 '24 14:08 KJhellico

@arkid15r @KJhellico ~~Is there a way to convert this PR back to draft status in the meantime? I'd like to work on this a bit more and perhaps expand the supported date ranges down to 1901 before putting this up for review again.~~

Nevermind, I think I found the button now.

PPsyrius avatar Aug 28 '24 17:08 PPsyrius

Closed as outdated.

PPsyrius avatar Dec 19 '24 02:12 PPsyrius