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 China holidays add non-statutory holidays support, l10n, optional half-day holidays #1491

Merged
merged 13 commits into from
Oct 9, 2023

Conversation

PPsyrius
Copy link
Collaborator

Proposed change

Add non-statutory (but part of official public holiday allotment) observed holidays, as well as HALF-DAY category and general l10n support (en_US, th, zh_CN, zh_TW).

The following implementation is cross-checked with official sources from 2001-2023, with earlier date implementation based on the relevant section of the 1949 and 1999 revisions of the Chinese Holiday Act.

Happy Mid-Autumn Festival! 🌔 🥮

Closes #1475 .

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 added references to all holidays information sources used in this PR
  • This PR is filed against beta branch of the repository
  • This PR doesn't contain any merge conflicts and has clean commit history
  • The code style looks good: make pre-commit command generates no changes
  • All tests pass locally: make test, make tox (we strongly encourage adding tests to your code)
  • The related documentation has been added/updated (check off the box for free if no updates is required)

@coveralls
Copy link

coveralls commented Oct 2, 2023

Pull Request Test Coverage Report for Build 6427501304

  • 134 of 134 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 99.977%

Totals Coverage Status
Change from base Build 6413773841: -0.02%
Covered Lines: 9651
Relevant Lines: 9651

💛 - Coveralls

@PPsyrius
Copy link
Collaborator Author

PPsyrius commented Oct 3, 2023

Coverall appears to have some issue with this particular line for some reason and I'm at my wit's end here
image

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.

It's a great PR -- a lot of work towards CN holidays improvement! It feels like a whole new country support has been added 👍

Here are some suggestions on how we could make the code better:

holidays/countries/china.py Show resolved Hide resolved
holidays/countries/china.py Outdated Show resolved Hide resolved
holidays/countries/china.py Outdated Show resolved Hide resolved
holidays/countries/china.py Outdated Show resolved Hide resolved
holidays/countries/china.py Show resolved Hide resolved
holidays/locale/th/LC_MESSAGES/CN.po Outdated Show resolved Hide resolved
holidays/countries/china.py Outdated Show resolved Hide resolved
holidays/countries/china.py Outdated Show resolved Hide resolved
tests/countries/test_china.py Outdated Show resolved Hide resolved
tests/countries/test_china.py Outdated Show resolved Hide resolved
@arkid15r
Copy link
Collaborator

arkid15r commented Oct 5, 2023

Let's deal with this first and take care of the coverage after that.

PPsyrius and others added 2 commits October 5, 2023 12:33
Co-Authored-By: Arkadii Yakovets <2201626+arkid15r@users.noreply.github.com>
@PPsyrius PPsyrius requested a review from arkid15r October 5, 2023 05:48
holidays/countries/china.py Outdated Show resolved Hide resolved
holidays/countries/china.py Outdated Show resolved Hide resolved
holidays/countries/china.py Show resolved Hide resolved
PPsyrius and others added 3 commits October 6, 2023 11:00
Co-authored-by: Arkadii Yakovets <ark@cho.red>
Co-authored-by: Arkadii Yakovets <ark@cho.red>
@PPsyrius PPsyrius requested a review from arkid15r October 6, 2023 06:02
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 Oct 9, 2023
Merged via the queue into vacanza:beta with commit 5c3ac9e Oct 9, 2023
22 checks passed
@PPsyrius PPsyrius deleted the china_update_2023 branch October 9, 2023 19:41
@KJhellico KJhellico mentioned this pull request Oct 16, 2023
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.

Incomplete list of Chinese holidays
4 participants