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

Add Saint Lucia holidays #2266

Merged
merged 8 commits into from
Feb 6, 2025
Merged

Conversation

Prateekshit73
Copy link
Contributor

Proposed change

Added Saint Lucia holidays
Closes #1262

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 holidays functionality in general)

Checklist

Copy link

codecov bot commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (915dafb) to head (b23a6ed).
Report is 5 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2266   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          199       200    +1     
  Lines        12144     12177   +33     
  Branches      1731      1731           
=========================================
+ Hits         12144     12177   +33     

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

holidays/countries/saint_lucia.py Outdated Show resolved Hide resolved
holidays/countries/saint_lucia.py Outdated Show resolved Hide resolved
holidays/countries/saint_lucia.py Outdated Show resolved Hide resolved
holidays/countries/saint_lucia.py Outdated Show resolved Hide resolved
holidays/countries/saint_lucia.py Outdated Show resolved Hide resolved
holidays/countries/saint_lucia.py Outdated Show resolved Hide resolved
holidays/countries/saint_lucia.py Outdated Show resolved Hide resolved
@KJhellico
Copy link
Collaborator

According to Bank Holidays Act

If any of the above days fall on a Sunday, or bank holiday, the Monday, or other day, immediately next following not being a holiday is a bank holiday, unless some other day is appointed for the purpose.

@Prateekshit73, you can apply observed holidays support for LC. The rules will be similar, for example, to Saint Kitts and Nevis.

holidays/countries/saint_lucia.py Outdated Show resolved Hide resolved
holidays/countries/saint_lucia.py Outdated Show resolved Hide resolved
holidays/countries/saint_lucia.py Show resolved Hide resolved
holidays/countries/saint_lucia.py Outdated Show resolved Hide resolved
holidays/countries/saint_lucia.py Outdated Show resolved Hide resolved
tests/countries/test_saint_lucia.py Outdated Show resolved Hide resolved
tests/countries/test_saint_lucia.py Show resolved Hide resolved
tests/countries/test_saint_lucia.py Outdated Show resolved Hide resolved
tests/countries/test_saint_lucia.py Show resolved Hide resolved
holidays/countries/saint_lucia.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@PPsyrius PPsyrius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good, just a few typoes here:

holidays/locale/en_LC/LC_MESSAGES/LC.po Outdated Show resolved Hide resolved
holidays/locale/en_US/LC_MESSAGES/LC.po Outdated Show resolved Hide resolved
Copy link
Collaborator

@PPsyrius PPsyrius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are the remaining test case changes as previously requested by @KJhellico as well as a missing one for Emancipation Day:

    def test_emancipation_day(self):
        name = "Emancipation Day"
        self.assertHolidayName(name, (f"{year}-08-01" for year in range(1979, 2050)))
        dt = (
            "2004-08-02",
            "2010-08-02",
            "2021-08-02",
        )
        self.assertHolidayName(f"{name} (observed)", dt)
        self.assertNoNonObservedHoliday(dt)

Aside from that, this PR looks more or less ready for merging to me 👍

tests/countries/test_saint_lucia.py Outdated Show resolved Hide resolved
tests/countries/test_saint_lucia.py Show resolved Hide resolved
Copy link

sonarqubecloud bot commented Feb 5, 2025

Copy link
Collaborator

@PPsyrius PPsyrius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🇱🇨

Copy link
Collaborator

@KJhellico KJhellico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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.

Another country! We're getting closer to 160 target.
Thank you @Prateekshit73 and @KJhellico @PPsyrius for reviewing

🇱🇨 LGTM

@arkid15r arkid15r added this pull request to the merge queue Feb 6, 2025
Merged via the queue into vacanza:dev with commit 4d02ea3 Feb 6, 2025
32 checks passed
@Prateekshit73 Prateekshit73 deleted the add-saint_lucia branch February 7, 2025 11:26
@KJhellico KJhellico changed the title Add Saint Lucia holidays Add Saint Lucia holidays Feb 11, 2025
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.

Add Saint Lucia holidays
4 participants