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

Refactor Australia holidays #1531

Merged
merged 3 commits into from Oct 26, 2023
Merged

Refactor Australia holidays #1531

merged 3 commits into from Oct 26, 2023

Conversation

KJhellico
Copy link
Collaborator

@KJhellico KJhellico commented Oct 24, 2023

Proposed change

  • Refactor some Australia holidays
  • Add Anzac Day to InternationalHolidays

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

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6625701209

  • 12 of 12 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 99.978%

Totals Coverage Status
Change from base Build 6620987603: 0.0%
Covered Lines: 10066
Relevant Lines: 10066

💛 - Coveralls

@PPsyrius
Copy link
Contributor

PPsyrius commented Oct 24, 2023

@KJhellico Would it be possible to convert (APR, 25) to self._add_anzac_day(name) too? I happen to be working on Tonga public holidays implementation at the moment, and they also celebrate Anzac Day over there (Samoa also had that as a Public Holiday up until 2008).

    def _add_anzac_day(self, name):
        """
        Add Anzac Day (April 25th)

        Anzac Day is a national day of remembrance in Australia and New Zealand
        that broadly commemorates all Australians and New Zealanders "who
        served and died in all wars, conflicts, and peacekeeping operations"
        and "the contribution and suffering of all those who have served".

        Anzac Day is a public holiday in Australia, New Zealand, and Tonga; as
        well as a public holiday in Samoa up until 2008.
        https://en.wikipedia.org/wiki/Anzac_Day
        """
        return self._add_holiday_apr_25(name)

@KJhellico
Copy link
Collaborator Author

@PPsyrius , thank for your suggestion! I remember seeing this holiday in some countries in Oceania. :)

@PPsyrius PPsyrius mentioned this pull request Oct 24, 2023
11 tasks
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.

Nice work getting rid of date/td imports!

holidays/countries/australia.py Outdated Show resolved Hide resolved
holidays/groups/international.py Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Oct 26, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

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 26, 2023
Merged via the queue into vacanza:beta with commit 7d737a9 Oct 26, 2023
27 checks passed
@KJhellico KJhellico deleted the ref-australia branch October 26, 2023 20:04
@arkid15r arkid15r mentioned this pull request Nov 6, 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.

None yet

4 participants