-
Notifications
You must be signed in to change notification settings - Fork 465
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 Barbados holidays #1393
Add Barbados holidays #1393
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing this! Your persistent work is much appreciated!
Please run make check
after addressing the l10n issue comment below.
I guess that will be it to get the PR to a regular review process.
holidays/countries/barbados.py
Outdated
""" | ||
|
||
country = "BB" | ||
default_language = "en" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All right, so this is the reason why make l10n
wasn't working. You set the default_language
but didn't do any l10n work. As a quick fix you need to remove the default_language
line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, I see. I'll look into how to do that for next time (If needed). So, I removed this line and have pushed the changes. However make check fails:
make doc
sphinx-build -E -T -W -b html -D language=en -j auto -q docs/source docs/build
Traceback (most recent call last):
File "/Users/arjun/Documents/git/python-holidays/holidayenv/bin/sphinx-build", line 8, in <module>
sys.exit(main())
^^^^^^
File "/Users/arjun/Documents/git/python-holidays/holidayenv/lib/python3.11/site-packages/sphinx/cmd/build.py", line 313, in main
locale.setlocale(locale.LC_ALL, '')
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/locale.py", line 626, in setlocale
return _setlocale(category, locale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
locale.Error: unsupported locale setting
make[1]: *** [doc] Error 1
make: *** [check] Error 2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a Windows specific issue. @KJhellico any suggestions here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually on a mac @arkid15r.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Test Coverage Report for Build 5648588296Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arjunanan6 , thank you for your efforts! Please look at suggestions below.
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
@KJhellico Could you please check again? Thank you :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @arjunanan6 it's great to have you back! I hope your moving process wasn't too exhaustive!
Yeah, some changes have been introduced recently so the PR requires a bit more work (nothing really serious, just modifying 5 more lines of code).
holidays/countries/barbados.py
Outdated
self._add_new_years_day("New Year's Day") | ||
|
||
# Errol Barrow Day | ||
self._add_holiday("Errol Barrow Day", JAN, 21) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self._add_holiday_1st_mon_of_aug("Kadooment Day")
The same way you can now use
self._add_holiday("Errol Barrow Day", JAN, 21) | |
self._add_holiday_jan_21("Errol Barrow Day") |
type of methods for month/day holidays and get rid of the
from holidays.calendars.gregorian import JAN, APR, AUG, NOV
in the import line above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @arkid15r, thank you! It went pretty okay, but you know, the actual work begins after the move, but we're almost there! :)
Just made the suggested changes and pushing it now after testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And there we go @arkid15r, tests passed :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🇧🇧 LGTM
Super, I hope to contribute more going forward! :) |
All right, it's in beta now! |
Proposed change
Adding Barbados holidays.
closes: #1153
Type of change
Checklist
beta
branch of the repositorymake pre-commit
make test
,make tox
(we strongly encourage adding tests to your code)