+
Skip to content

Update Hungary holidays: update 1991-2026 special holidays #2568

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

Merged
merged 19 commits into from
Jun 10, 2025

Conversation

prokaj
Copy link
Contributor

@prokaj prokaj commented May 26, 2025

Proposed change

Years before 2010 and after 2025 were missing from the list of special public holidays for Hungary.
I added these to the file countries/hungary.py using another legal source (links included in the doc string)

There were no such item in 2006 so this year is empty.

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

prokaj added 4 commits May 26, 2025 05:49
adding special holidays for 2007, 2008, 2009

Signed-off-by: prokaj <79016705+prokaj@users.noreply.github.com>
comma was missing

Signed-off-by: prokaj <79016705+prokaj@users.noreply.github.com>
format update

Signed-off-by: prokaj <79016705+prokaj@users.noreply.github.com>
adding 2002, 2003, 2004, 2005 and 2026

Signed-off-by: prokaj <79016705+prokaj@users.noreply.github.com>
@Copilot Copilot AI review requested due to automatic review settings May 26, 2025 05:22
Copy link
Contributor

coderabbitai bot commented May 26, 2025

Summary by CodeRabbit

  • New Features

    • Added substituted public holiday dates for Hungary for the years 1991, 1992, 1993, 1994, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, and 2026.
  • Tests

    • Expanded test coverage to include the newly added substituted holiday dates for Hungary.
  • Chores

    • Added Vilmos Prokaj to the list of contributors.

Summary by CodeRabbit

  • New Features

    • Added information on substituted public holidays in Hungary for the years 1991, 1992, 1993, 1994, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, and 2026.
  • Documentation

    • Updated references for Hungarian public holidays to include additional years.
  • Tests

    • Enhanced tests to verify the newly added substituted holiday dates for the specified years.

Walkthrough

The Hungary holiday data was updated to add substituted holiday dates and reference links for the years 1991, 1992, 1993, 1994, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, and 2026. These updates expand the special_public_holidays dictionary and the class docstring references. Correspondingly, the test suite was extended to verify these new substituted holiday dates.

Changes

Files Change Summary
holidays/countries/hungary.py Added substituted holiday entries and reference URLs for years 1991, 1992, 1993, 1994, 1997-1999, 2001-2005, 2007-2009, and 2026 in the HungaryStaticHolidays class.
tests/countries/test_hungary.py Extended test_substituted method with new substituted holiday dates from 1991 through 2026.
CONTRIBUTORS Added contributor "Vilmos Prokaj" between "Ville Skyttä" and "Vu Nhat Chuong."

Suggested labels

snapshot

Suggested reviewers

  • arkid15r

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8b73dff and 07ee755.

📒 Files selected for processing (1)
  • CONTRIBUTORS (1 hunks)
🔇 Additional comments (1)
CONTRIBUTORS (1)

155-155: Add Vilmos Prokaj to CONTRIBUTORS
The new entry is correctly inserted in alphabetical order between Ville Skyttä and Vu Nhat Chuong.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds missing special public holiday entries for Hungary in years 2002–2009 (excluding 2006) and 2026, along with corresponding legal references in the docstring.

  • Updated the docstring to include government decree links for 2002–2005, 2007–2009, and 2026
  • Populated special_public_holidays mapping with date tuples for those years
  • Left 2006 out as there were no special holidays
Comments suppressed due to low confidence (1)

holidays/countries/hungary.py:149

  • No tests were added for the new special_public_holidays entries (2002–2005, 2007–2009, 2026). Adding unit tests for these years will help validate the mapping values.
2002: (

@PPsyrius PPsyrius changed the title Update special public holidays for Hungary between 2002-2026 Update Hungary holidays: update 2002-2026 special holidays May 26, 2025
Copy link

codecov bot commented May 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (8b4f02b) to head (07ee755).
Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2568   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          229       229           
  Lines        14571     14571           
  Branches      2039      2039           
=========================================
  Hits         14571     14571           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Feel free to add your name to the CONTRIBUTORS file as well 👍

Signed-off-by: prokaj <79016705+prokaj@users.noreply.github.com>
@github-actions github-actions bot added the test label May 26, 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.

I found some additional references for 1992-2001 here based from your sources (pre-archived for you here) 👀

For 2001 which only got extra rest day instead of the usual holiday swap, maybe something like this:

        # Day off.
        2001: (DEC, 31, tr("Pihenőnap")),

Keep in mind that you may need to add this extra entry to all Hungary's .po translation files as well [1] [2] [3]

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.

@prokaj could you take a look at the code review suggestions?
Thank you!

@prokaj
Copy link
Contributor Author

prokaj commented Jun 4, 2025 via email

@arkid15r
Copy link
Collaborator

arkid15r commented Jun 7, 2025

This is a busy week. I will do it during the weekend.

Thank you @prokaj

prokaj and others added 3 commits June 8, 2025 16:00
Co-authored-by: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com>
Signed-off-by: prokaj <79016705+prokaj@users.noreply.github.com>
Co-authored-by: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com>
Signed-off-by: prokaj <79016705+prokaj@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3ebdd86 and 31803fd.

📒 Files selected for processing (1)
  • holidays/countries/hungary.py (3 hunks)
🧰 Additional context used
🧠 Learnings (1)
holidays/countries/hungary.py (1)
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: tests/countries/test_guinea.py:237-239
Timestamp: 2025-04-02T18:38:35.164Z
Learning: In the vacanza/holidays project, the method assertLocalizedHolidays in country test files should be called with positional parameters rather than named parameters to maintain consistency with the rest of the codebase.
🪛 Pylint (3.3.7)
holidays/countries/hungary.py

[convention] 120-120: Line too long (112/100)

(C0301)


[convention] 121-121: Line too long (112/100)

(C0301)


[convention] 122-122: Line too long (112/100)

(C0301)


[convention] 123-123: Line too long (113/100)

(C0301)


[convention] 124-124: Line too long (113/100)

(C0301)


[convention] 125-125: Line too long (114/100)

(C0301)


[convention] 126-126: Line too long (114/100)

(C0301)


[convention] 141-141: Line too long (113/100)

(C0301)

🔇 Additional comments (9)
holidays/countries/hungary.py (9)

120-126: Archived references added for early special holidays.
The web.archive.org links for 2002–2009 and 2026 align with existing docstring style and provide durable references.

Also applies to: 141-141

🧰 Tools
🪛 Pylint (3.3.7)

[convention] 120-120: Line too long (112/100)

(C0301)


[convention] 121-121: Line too long (112/100)

(C0301)


[convention] 122-122: Line too long (112/100)

(C0301)


[convention] 123-123: Line too long (113/100)

(C0301)


[convention] 124-124: Line too long (113/100)

(C0301)


[convention] 125-125: Line too long (114/100)

(C0301)


[convention] 126-126: Line too long (114/100)

(C0301)


149-152: Add special holidays for 2002.
The nested tuples for Aug 19→Aug 10 and Dec 24→Dec 28 are correctly formatted and positioned.


153-157: Add special holidays for 2003.
Entries for May 2→Apr 26, Oct 24→Oct 18, and Dec 24→Dec 13 follow the established pattern.


158-161: Add special holidays for 2004.
The Jan 2→Jan 10 and Dec 24→Dec 18 tuples match the nested tuple convention.


162-165: Add special holidays for 2005.
Mar 14→Mar 19 and Oct 31→Nov 5 are properly declared within the tuple.


166-172: Add special holidays for 2007.
All six substituted dates (Mar 16, Apr 30, Oct 22, Nov 2, Dec 24, Dec 31) are present and correctly formatted.


174-178: Add special holidays for 2008.
May 2→Apr 26, Oct 24→Oct 18, and Dec 24→Dec 20 are consistent with the existing data structure.


179-183: Add special holidays for 2009.
The entries for Jan 2→Mar 28, Aug 21→Aug 29, and Dec 24→Dec 19 are correctly inserted.


248-252: Add special holidays for 2026.
The Jan 2→Jan 10, Aug 21→Aug 8, and Dec 24→Dec 12 tuples align perfectly with the pattern of previous years.

prokaj added 2 commits June 8, 2025 17:16
Signed-off-by: prokaj <79016705+prokaj@users.noreply.github.com>
fix typos, missing commas

Signed-off-by: prokaj <79016705+prokaj@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 31803fd and 2d67567.

📒 Files selected for processing (1)
  • holidays/countries/hungary.py (3 hunks)
🧰 Additional context used
🧠 Learnings (1)
holidays/countries/hungary.py (1)
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: tests/countries/test_guinea.py:237-239
Timestamp: 2025-04-02T18:38:35.164Z
Learning: In the vacanza/holidays project, the method assertLocalizedHolidays in country test files should be called with positional parameters rather than named parameters to maintain consistency with the rest of the codebase.
🪛 Ruff (0.11.9)
holidays/countries/hungary.py

120-120: Line too long (104 > 99)

(E501)


129-129: Trailing whitespace

(W291)


176-176: SyntaxError: Expected ',', found int


181-181: SyntaxError: Expected ',', found int


185-185: Trailing whitespace

(W291)

🪛 Pylint (3.3.7)
holidays/countries/hungary.py

[error] 176-176: Parsing failed: 'invalid syntax. Perhaps you forgot a comma? (holidays.countries.hungary, line 176)'

(E0001)

🔇 Additional comments (1)
holidays/countries/hungary.py (1)

120-153: Good work on the comprehensive documentation updates.

The archived reference links follow the established pattern and ensure future availability of the legal sources.

🧰 Tools
🪛 Ruff (0.11.9)

120-120: Line too long (104 > 99)

(E501)


129-129: Trailing whitespace

(W291)

prokaj and others added 2 commits June 8, 2025 17:25
some lines were too long

Signed-off-by: prokaj <79016705+prokaj@users.noreply.github.com>
@prokaj
Copy link
Contributor Author

prokaj commented Jun 8, 2025

To complete and check the data I used a subscription based database. It is indicated in the doc string.
I also added 1991.
For 2001 the free online version is incomplete, the original text in pdf is attached.
So there is no need to touch the po file.
43-2000-_-xii-_18--_gm_rendelet.pdf-1.pdf

@prokaj prokaj closed this Jun 8, 2025
@prokaj prokaj reopened this Jun 8, 2025
Signed-off-by: prokaj <79016705+prokaj@users.noreply.github.com>
prokaj and others added 6 commits June 10, 2025 01:28
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
Signed-off-by: prokaj <79016705+prokaj@users.noreply.github.com>
Signed-off-by: prokaj <79016705+prokaj@users.noreply.github.com>
Copy link

@prokaj
Copy link
Contributor Author

prokaj commented Jun 10, 2025

In the latest version of hu2002-2009

  • all changes from branch dev are merged into hu2002-2009
  • CONTIRUBTORS is updated
  • reference for 1991 is added

I hope it can be merged now into the dev branch

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 🇭🇺

Thanks again for the contribution ❤️

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.

LGTM

Thank you @prokaj 👍

@arkid15r arkid15r added this pull request to the merge queue Jun 10, 2025
Merged via the queue into vacanza:dev with commit 2efd032 Jun 10, 2025
33 checks passed
@KJhellico KJhellico changed the title Update Hungary holidays: update 2002-2026 special holidays Update Hungary holidays: update 1991-2026 special holidays Jun 14, 2025
@arkid15r arkid15r mentioned this pull request Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载