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 FederalReserveSystem calendar #695

Closed
wants to merge 1 commit into from

Conversation

ludsoft
Copy link

@ludsoft ludsoft commented Dec 18, 2021

refs #

  • Tests with a significant number of years to be tested for your calendar.
  • Docstrings for the Calendar class and specific methods.
  • Use the workalendar.registry_tools.iso_register decorator to register your new calendar using ISO codes (optional).
  • Calendar country / label added to the README.md file.
  • Changelog amended with a mention like: "Added <country> by @pseudo (#)". Note Please do NOT change the version number here. It's the project maintainers' duty.

This is adding the calendar for the federal reserve: https://www.federalreserve.gov/aboutthefed/k8.htm

To do so I needed to add Juneteenth and found this issue: #661 and tried to follow the logic proposed there.
As I was not sure how to test only adding Juneteenth without a calendar using it, both are in a single pull request. Let me know if you would like to split it.

Thanks!

# Juneteenth started to be a federal holiday in 2021
if year < 2021:
raise ValueError("Juneteenth became a federal holiday in 2021")
return (date(year, 6, 19), "Juneteenth National Independence Day")
Copy link
Contributor

Choose a reason for hiding this comment

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

(just for the sake of it, I double checked the official holiday name: https://en.wikipedia.org/wiki/Juneteenth ✔️ )

@ludsoft
Copy link
Author

ludsoft commented Jan 3, 2022

Hi,
I've left the optional step to add the ISO code as I don't think there is one for this calendar. But let me know if it's better to remove it so that all steps are done on the summary of the pull request.
Thanks.

@brunobord
Copy link
Member

I think there's no ISO code either, they're for countries and regions, not institutions, IIRC.

@brunobord
Copy link
Member

brunobord commented Jan 18, 2022

There's a massive incoming PR with long-time due contributions. It'll most probably cause merge conflicts. You have several solutions here: either I'll merge de meta-PR and let you solve the conflict by rebasing from master ; or I'll integrate your contribution into the meta-PR.
Either way, your contribution won't be forgotten and will be integrated as soon as I can.

What do you think?

@ludsoft
Copy link
Author

ludsoft commented Jan 20, 2022

Hi, sorry for the delay responding.
I'm fine managing conflicts once you merge the meta-PR and me rebasing from master.
Thanks.

@brunobord
Copy link
Member

you're clear to rebase from master, now. Enjoy!

@brunobord
Copy link
Member

it was a long shot ; I'll take this over and integrate these changes into master and make a new release (maybe tonight). Stay tuned!

@brunobord
Copy link
Member

merged (see 45c0b8a)

@brunobord brunobord closed this Feb 22, 2022
@brunobord
Copy link
Member

The US Federal Reserve calendar has been included in the latest release of Workalendar, now available on PyPI!

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