Skip to content

Update Estonia holidays#3089

Merged
arkid15r merged 1 commit intovacanza:devfrom
KJhellico:upd-estonia
Nov 29, 2025
Merged

Update Estonia holidays#3089
arkid15r merged 1 commit intovacanza:devfrom
KJhellico:upd-estonia

Conversation

@KJhellico
Copy link
Copy Markdown
Collaborator

Proposed change

Update Estonia holidays:

  • update holidays years of establishment
  • add half-day holidays

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 27, 2025

Summary by CodeRabbit

  • New Features

    • Estonia now supports HALF_DAY holidays, marking workdays with 3-hour reductions before major holidays (applies from 2001 onward)
    • Added Day of Declaration of Sovereignty as a recognized holiday for Estonia
  • Improvements

    • Enhanced historical accuracy of Estonia holidays with year-based refinements
    • Expanded localization support with updated translations

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Adds Estonian holiday refinements by gating multiple holidays on year thresholds (1991, 1993, 1994, 2001), introduces half-day holiday support for pre-holiday workday reductions, adds Day of Declaration of Sovereignty, updates locale translations, and extends test coverage.

Changes

Cohort / File(s) Summary
Core Estonia holiday logic
holidays/countries/estonia.py
Added start_year = 1991 and supported_categories = (HALF_DAY, PUBLIC). Introduced year-based gating for Good Friday/Easter Sunday (≥1994), May Day (conditional labeling by year), Whit Sunday (≥1994), and Day of Declaration of Sovereignty (≤1993). Added new _populate_half_day_holidays() method for pre-holiday shortened workdays (≥2001) covering Feb 23, Jun 22, Dec 23/24/31.
Localization updates
holidays/locale/en_US/LC_MESSAGES/EE.po,
holidays/locale/et/LC_MESSAGES/EE.po,
holidays/locale/uk/LC_MESSAGES/EE.po
Updated metadata (Project-Id-Version 0.28/0.66 → 0.86, X-Generator → Poedit 3.5). Removed Spring Day entries; added May Day, International Workers' Solidarity Day, Day of Declaration of Sovereignty, and Pre-holiday day translations in English, Estonian, and Ukrainian locales.
Snapshot updates
snapshots/countries/EE_COMMON.json
Replaced Spring Day entries with May Day, added International Workers' Solidarity Day and Day of Declaration of Sovereignty across multiple years (1991–2039+), and introduced recurring Pre-holiday day entries for Feb 23, Jun 22, Dec 23/24/31 across years ≥2001.
Test coverage expansion
tests/countries/test_estonia.py
Added HALF_DAY import. Added four new test methods: test_no_holidays(), test_new_years_day(), test_day_of_declaration_of_sovereignty(), test_pre_holiday_day(). Refactored to use class attributes (self.full_range, self.start_year, self.end_year). Extended assertions for localized holiday names and translations across multiple locales.
Documentation
README.md
Updated Estonia row in country table to show HALF_DAY support in Supported Categories cell.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Year threshold verification: Confirm 1991, 1993, 1994, and 2001 thresholds are correctly applied across the implementation and match snapshot expectations.
  • Translation accuracy: Verify Estonian msgid–msgstr mappings and translations in all three locales (en_US, et, uk) align semantically, especially for new entries like "pühade-eelne päev (tööpäev lüheneb 3 tunni võrra)".
  • Snapshot consistency: Spot-check that snapshot entries for pre-holiday days and new holidays match the coded logic, particularly recurring patterns across years ≥2001.
  • Test assertions: Ensure new test methods correctly verify presence/absence of holidays before and after key year boundaries.

Suggested labels

l10n, snapshot, test

Suggested reviewers

  • arkid15r
  • PPsyrius

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Update Estonia holidays' directly aligns with the main changeset, which comprehensively updates Estonian holiday handling including year thresholds, half-day holidays, and metadata.
Description check ✅ Passed The description accurately describes the changeset's core updates: establishing holiday years and adding half-day holidays, matching the implemented modifications.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bd7e31f and 079511a.

📒 Files selected for processing (7)
  • README.md (1 hunks)
  • holidays/countries/estonia.py (4 hunks)
  • holidays/locale/en_US/LC_MESSAGES/EE.po (4 hunks)
  • holidays/locale/et/LC_MESSAGES/EE.po (4 hunks)
  • holidays/locale/uk/LC_MESSAGES/EE.po (4 hunks)
  • snapshots/countries/EE_COMMON.json (7 hunks)
  • tests/countries/test_estonia.py (1 hunks)
🧰 Additional context used
🧠 Learnings (70)
📓 Common learnings
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: holidays/countries/south_africa.py:69-75
Timestamp: 2025-09-14T07:26:25.431Z
Learning: When reviewing historical holiday implementations in the vacanza/holidays repository, trust the maintainers' research and implementation decisions for specific historical edge cases, especially when they can provide sources like Wikipedia or other historical documentation that supports unusual or complex date calculation rules during specific time periods.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2537
File: tests/countries/test_finland.py:23-26
Timestamp: 2025-05-09T18:36:09.607Z
Learning: The holidays project prioritizes complete historical coverage in tests, verifying holidays from their first year of observance (e.g., 1853 for Finland) through future projections, rather than using shorter sliding windows.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_french_polynesia.py:19-22
Timestamp: 2025-11-08T05:09:56.159Z
Learning: In the vacanza/holidays project's test framework (PR #2881 onwards), the base class CommonCountryTests provides a default test_no_holidays implementation that automatically tests years=start_year - 1 for standard PUBLIC category cases. Individual country test files should only override test_no_holidays when the country supports additional non-PUBLIC categories (GOVERNMENT, WORKDAY, OPTIONAL, etc.) with different start years requiring separate validation.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2631
File: tests/countries/test_sint_maarten.py:62-0
Timestamp: 2025-06-14T21:12:07.224Z
Learning: KJhellico prefers to focus on completing and reviewing the main holiday implementation code before doing detailed reviews of the corresponding test files.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2777
File: holidays/countries/gambia.py:120-122
Timestamp: 2025-08-03T13:48:11.910Z
Learning: When reviewing holiday implementations in the holidays library, defer to the maintainers' choice of start years for specific holiday policies, as they likely have access to more reliable primary sources and official documentation than what can be found through web searches.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_curacao.py:29-29
Timestamp: 2025-09-20T12:24:28.864Z
Learning: For Curacao in the holidays library, PUBLIC and HALF_DAY categories have different start years - PUBLIC holidays begin at the country's start_year while HALF_DAY holidays begin in 2010. When testing no_holidays methods, each category should be tested separately with appropriate pre-start years rather than using a unified supported_categories approach.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_argentina.py:375-375
Timestamp: 2025-09-03T16:49:35.246Z
Learning: In the holidays library, national holiday tests use self.full_range (or similar comprehensive year ranges) even when explicit test dates only show modern observance. This is intentional for correctness and comprehensive coverage, unlike subdivision-specific holidays which have explicit year boundaries based on known start dates.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2398
File: holidays/countries/guinea.py:106-110
Timestamp: 2025-04-04T10:52:41.546Z
Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are properly covered by the test_eid_al_fitr_day() method, which tests both the regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2642
File: tests/countries/test_france.py:24-27
Timestamp: 2025-06-18T10:10:46.158Z
Learning: The holidays library prioritizes full test coverage over performance in test suites. Modern library-wide standards favor comprehensive testing across all subdivisions and wide year ranges (e.g., 1803-2050 for France) to ensure thorough validation, even if it creates many test objects.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_indonesia.py:221-223
Timestamp: 2025-09-28T05:42:12.777Z
Learning: In tests/countries/test_indonesia.py, the manual set inclusion checks using get_named and years_found for Lunar New Year (test_lunar_new_year) and Vesak Day (test_vesak_day) are intentional and should remain until both holidays get their own `{insert}_no_estimated` flags implemented, rather than using standard harness assertions like assertHolidayName/assertNoHolidayName.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2608
File: tests/countries/test_saint_vincent_and_the_grenadines.py:162-178
Timestamp: 2025-07-02T18:21:59.302Z
Learning: In the Saint Vincent and the Grenadines holiday tests, for holidays without observed rules that only require a single assertHolidayName call, pass the holiday name directly as a string literal rather than storing it in a variable first for cleaner, more concise code.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2530
File: tests/countries/test_andorra.py:23-28
Timestamp: 2025-05-06T21:07:11.577Z
Learning: In the holidays project, test methods for country holidays follow a standard form where year ranges are explicitly recreated in each test method rather than being stored as class variables, to maintain consistency across all country tests.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_south_africa.py:22-22
Timestamp: 2025-09-14T04:41:10.139Z
Learning: South Africa's observed holiday system only started in 1995, so in tests/countries/test_south_africa.py, using years_non_observed=range(1995, 2050) is intentional to limit testing to years where observed holidays actually exist, improving both correctness and performance.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2653
File: holidays/locale/th/LC_MESSAGES/TW.po:17-21
Timestamp: 2025-06-21T18:06:50.027Z
Learning: KJhellico's username includes a tilde character (~) as part of their nickname (appears as "~Jhellico" in Last-Translator headers), which is intentional formatting and not an error.
📚 Learning: 2025-04-03T05:59:57.480Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.

Applied to files:

  • snapshots/countries/EE_COMMON.json
📚 Learning: 2025-06-24T17:26:17.728Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2654
File: snapshots/countries/CV_RS.json:471-478
Timestamp: 2025-06-24T17:26:17.728Z
Learning: Snapshot files in the holidays library (like those in snapshots/countries/) are generated automatically and should not be manually edited. Any issues with snapshot content should be addressed in the source code that generates them, not in the snapshot files themselves.

Applied to files:

  • snapshots/countries/EE_COMMON.json
📚 Learning: 2025-11-08T05:09:56.159Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_french_polynesia.py:19-22
Timestamp: 2025-11-08T05:09:56.159Z
Learning: In the vacanza/holidays project's test framework (PR #2881 onwards), the base class CommonCountryTests provides a default test_no_holidays implementation that automatically tests years=start_year - 1 for standard PUBLIC category cases. Individual country test files should only override test_no_holidays when the country supports additional non-PUBLIC categories (GOVERNMENT, WORKDAY, OPTIONAL, etc.) with different start years requiring separate validation.

Applied to files:

  • snapshots/countries/EE_COMMON.json
  • holidays/countries/estonia.py
  • tests/countries/test_estonia.py
📚 Learning: 2025-05-09T18:36:09.607Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2537
File: tests/countries/test_finland.py:23-26
Timestamp: 2025-05-09T18:36:09.607Z
Learning: The holidays project prioritizes complete historical coverage in tests, verifying holidays from their first year of observance (e.g., 1853 for Finland) through future projections, rather than using shorter sliding windows.

Applied to files:

  • snapshots/countries/EE_COMMON.json
📚 Learning: 2025-09-14T04:41:10.139Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_south_africa.py:22-22
Timestamp: 2025-09-14T04:41:10.139Z
Learning: South Africa's observed holiday system only started in 1995, so in tests/countries/test_south_africa.py, using years_non_observed=range(1995, 2050) is intentional to limit testing to years where observed holidays actually exist, improving both correctness and performance.

Applied to files:

  • snapshots/countries/EE_COMMON.json
  • holidays/countries/estonia.py
📚 Learning: 2025-09-14T16:03:13.558Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_barbados.py:21-23
Timestamp: 2025-09-14T16:03:13.558Z
Learning: In tests/countries/test_barbados.py, using years_non_observed=range(2000, 2024) is intentional because all observed holiday examples fall within 2001-2023, making this range appropriate for limiting testing to years where observed holidays actually exist in the test data.

Applied to files:

  • snapshots/countries/EE_COMMON.json
  • tests/countries/test_estonia.py
📚 Learning: 2025-09-18T07:01:12.236Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2942
File: holidays/countries/south_africa.py:91-98
Timestamp: 2025-09-18T07:01:12.236Z
Learning: In the holidays library South Africa implementation, inline ternary operators for holiday name selection (like "Republic Day" if self._year >= 1961 else "Union Day") are intentionally kept inline rather than extracted to separate variables, as this structure is designed in preparation for future localization (l10n) support where the contextual relationship between conditions and translatable strings needs to be preserved.

Applied to files:

  • snapshots/countries/EE_COMMON.json
  • holidays/countries/estonia.py
📚 Learning: 2025-07-10T03:36:16.461Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2706
File: holidays/countries/cayman_islands.py:80-97
Timestamp: 2025-07-10T03:36:16.461Z
Learning: In the holidays library, date dictionaries that map years to specific dates (like queens_birthday_dates, spring_bank_dates, thanksgiving_day_dates, etc.) are typically defined within the _populate_public_holidays method rather than as module-level constants. This is the established library-wide pattern seen across multiple country implementations including United Kingdom, United States, Sri Lanka, and others.

Applied to files:

  • snapshots/countries/EE_COMMON.json
📚 Learning: 2025-09-14T06:38:41.314Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: holidays/countries/south_africa.py:69-75
Timestamp: 2025-09-14T06:38:41.314Z
Learning: South Africa's Workers' Day implementation during the apartheid era (1987-1989) used the "first Friday of May" rule rather than a fixed May 1st date, which is accurately reflected in the holidays library code despite general historical sources primarily referencing May 1st observance.

Applied to files:

  • snapshots/countries/EE_COMMON.json
📚 Learning: 2025-07-14T20:23:48.198Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2654
File: holidays/countries/cabo_verde.py:133-141
Timestamp: 2025-07-14T20:23:48.198Z
Learning: The holidays library provides helper methods `_add_holiday_2nd_sun_of_may()` and `_add_holiday_3rd_sun_of_jun()` for adding holidays on the 2nd Sunday of May and 3rd Sunday of June respectively. These methods are used across multiple country implementations including Latvia, Finland, Belarus, Malaysia, Madagascar, and Cape Verde.

Applied to files:

  • snapshots/countries/EE_COMMON.json
  • holidays/countries/estonia.py
📚 Learning: 2025-09-17T15:16:16.192Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2944
File: holidays/countries/myanmar.py:183-191
Timestamp: 2025-09-17T15:16:16.192Z
Learning: The special_public_holidays formatting pattern in the holidays codebase follows a consistent convention: single entries per year use flat tuple format like `2024: (MONTH, DAY, name)`, while multiple entries per year use tuple-of-tuples format like `2024: ((MONTH, DAY, name), (MONTH, DAY, name))`. This pattern is used consistently across all countries.

Applied to files:

  • snapshots/countries/EE_COMMON.json
📚 Learning: 2025-03-19T16:54:58.657Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.

Applied to files:

  • snapshots/countries/EE_COMMON.json
  • holidays/countries/estonia.py
📚 Learning: 2025-08-03T13:48:11.910Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2777
File: holidays/countries/gambia.py:120-122
Timestamp: 2025-08-03T13:48:11.910Z
Learning: When reviewing holiday implementations in the holidays library, defer to the maintainers' choice of start years for specific holiday policies, as they likely have access to more reliable primary sources and official documentation than what can be found through web searches.

Applied to files:

  • snapshots/countries/EE_COMMON.json
📚 Learning: 2025-07-10T03:36:16.461Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2706
File: holidays/countries/cayman_islands.py:80-97
Timestamp: 2025-07-10T03:36:16.461Z
Learning: In the holidays library, date dictionaries that map years to specific dates (like queens_birthday_dates, special holiday dates, etc.) are typically defined within the _populate_public_holidays method rather than as module-level constants. This is the established library-wide pattern and should be maintained for consistency.

Applied to files:

  • snapshots/countries/EE_COMMON.json
📚 Learning: 2025-04-03T05:58:00.033Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2407
File: holidays/locale/en_TL/LC_MESSAGES/TL.po:42-44
Timestamp: 2025-04-03T05:58:00.033Z
Learning: The en_TL (English for Timor-Leste) localization for holidays intentionally uses "World" instead of "International" (e.g., "World Labour Day") to maintain accuracy with official Timor-Leste government sources, even though code comments and other localizations like en_US use "International".

Applied to files:

  • README.md
  • holidays/locale/en_US/LC_MESSAGES/EE.po
  • holidays/locale/uk/LC_MESSAGES/EE.po
  • holidays/locale/et/LC_MESSAGES/EE.po
📚 Learning: 2025-04-05T09:44:39.998Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2402
File: holidays/countries/trinidad_and_tobago.py:75-76
Timestamp: 2025-04-05T09:44:39.998Z
Learning: In the holidays library, en_US locale is the standard for localization comments (using American English spelling like "Labor"), while the actual holiday names in code use the appropriate locale-specific spelling (like "Labour" for British English locales such as en_TT).

Applied to files:

  • README.md
📚 Learning: 2025-06-28T10:39:19.185Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2684
File: holidays/locale/it/LC_MESSAGES/SM.po:13-13
Timestamp: 2025-06-28T10:39:19.185Z
Learning: In the holidays project, .po file header comments use the format "# [Country] holidays." for default language files (without trailing hash) and "# [Country] holidays [locale] localization." for non-default language files (also without trailing hash).

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
  • holidays/locale/uk/LC_MESSAGES/EE.po
  • holidays/locale/et/LC_MESSAGES/EE.po
📚 Learning: 2025-06-26T15:34:35.476Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2676
File: holidays/locale/en_US/LC_MESSAGES/TN.po:17-28
Timestamp: 2025-06-26T15:34:35.476Z
Learning: In the holidays project, .po file header metadata updates (version numbers, revision dates, translator information) are legitimate changes when part of localization work and don't require `make l10n` regeneration. The `make l10n` command is primarily for formatting fixes and missing translator comments, not for intentional metadata updates.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
  • holidays/locale/uk/LC_MESSAGES/EE.po
  • holidays/locale/et/LC_MESSAGES/EE.po
📚 Learning: 2025-09-26T13:58:49.363Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2960
File: holidays/locale/ca/LC_MESSAGES/ES.po:148-151
Timestamp: 2025-09-26T13:58:49.363Z
Learning: In the holidays project, when translating holiday names in .po files, the msgstr should be a faithful translation of the original msgid (in the country's default language), not influenced by English commentary or common en_US names. For example, "Día de la Pascua Granada" (Spanish) correctly translates to "Dia de la Pasqua Granada" (Catalan), even though the English comment refers to it as "Whit Monday".

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
  • holidays/locale/uk/LC_MESSAGES/EE.po
  • holidays/locale/et/LC_MESSAGES/EE.po
📚 Learning: 2025-06-29T09:37:35.283Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2687
File: holidays/locale/en_US/LC_MESSAGES/CF.po:13-28
Timestamp: 2025-06-29T09:37:35.283Z
Learning: In the holidays project, .po files follow a standard formatting convention where there is always a blank line after the metadata header section (after the "X-Source-Language" line). This blank line separates the header from the actual translation content and should not be removed.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
  • holidays/locale/uk/LC_MESSAGES/EE.po
  • holidays/locale/et/LC_MESSAGES/EE.po
📚 Learning: 2025-05-06T15:25:44.333Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2530
File: holidays/locale/ca/LC_MESSAGES/AD.po:31-40
Timestamp: 2025-05-06T15:25:44.333Z
Learning: In the Holidays project, msgid fields in localization files contain strings in the entity's default language (as defined by default_language attribute), not English source strings as in standard gettext implementations.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
  • holidays/locale/uk/LC_MESSAGES/EE.po
  • holidays/locale/et/LC_MESSAGES/EE.po
📚 Learning: 2025-03-30T18:25:07.087Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
  • holidays/locale/uk/LC_MESSAGES/EE.po
  • holidays/locale/et/LC_MESSAGES/EE.po
📚 Learning: 2025-06-11T18:32:25.595Z
Learnt from: ankushhKapoor
Repo: vacanza/holidays PR: 2601
File: holidays/locale/en_MN/LC_MESSAGES/MN.po:13-14
Timestamp: 2025-06-11T18:32:25.595Z
Learning: For non-default locale `.po` files, the header comment format is:
`# <Country> holidays <locale> localization.` (no trailing hash).

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
  • holidays/locale/uk/LC_MESSAGES/EE.po
  • holidays/locale/et/LC_MESSAGES/EE.po
📚 Learning: 2025-06-10T12:17:58.880Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2608
File: holidays/locale/en_VC/LC_MESSAGES/VC.po:1-14
Timestamp: 2025-06-10T12:17:58.880Z
Learning: In the holidays project, .po files should use the full multi-line header format including the project description, authors, website, and license information, rather than a single-line comment format.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
  • holidays/locale/uk/LC_MESSAGES/EE.po
📚 Learning: 2025-09-26T13:44:12.652Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2960
File: holidays/locale/ca/LC_MESSAGES/ES.po:97-100
Timestamp: 2025-09-26T13:44:12.652Z
Learning: When fixing localization issues in the holidays project, corrections should be made in both the Python source code comments and the en_US .po file msgstr entries, then all other language .po files should be regenerated to pick up the corrected en_US comments.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
  • holidays/locale/uk/LC_MESSAGES/EE.po
📚 Learning: 2025-09-17T15:53:16.940Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2944
File: holidays/countries/myanmar.py:108-111
Timestamp: 2025-09-17T15:53:16.940Z
Learning: In the holidays package, explanatory comments about year restrictions or policy context should be placed above conditional blocks or at method level, never directly above holiday name comments that precede tr() function calls, as this would include the explanatory text in .po localization files when running `make l10n`.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
📚 Learning: 2025-05-10T04:02:13.815Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2537
File: holidays/countries/finland.py:249-253
Timestamp: 2025-05-10T04:02:13.815Z
Learning: Holiday name comments directly above tr() function calls in the holidays package should only contain the holiday name itself (e.g., "# Independence Day.") without any additional context, dates, or historical information.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
  • holidays/locale/uk/LC_MESSAGES/EE.po
  • holidays/countries/estonia.py
  • holidays/locale/et/LC_MESSAGES/EE.po
📚 Learning: 2025-03-05T17:51:00.633Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:30-299
Timestamp: 2025-03-05T17:51:00.633Z
Learning: In the Holidays project, .po files for a country's default locale use empty msgstr fields as a standard convention.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
  • holidays/locale/uk/LC_MESSAGES/EE.po
📚 Learning: 2025-06-25T10:09:29.029Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2676
File: holidays/locale/ar/LC_MESSAGES/EG.po:0-0
Timestamp: 2025-06-25T10:09:29.029Z
Learning: In the holidays library, msgstr fields can be left empty for source/default_language files when using Lingva, the localization tool used by the project.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
  • holidays/locale/uk/LC_MESSAGES/EE.po
  • holidays/locale/et/LC_MESSAGES/EE.po
📚 Learning: 2025-08-11T10:14:28.517Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2794
File: holidays/groups/christian.py:328-343
Timestamp: 2025-08-11T10:14:28.517Z
Learning: For Ethiopian holidays in the `holidays/groups/christian.py` file, docstring wording should maintain source-accurate phrasing (e.g., "in coincidence of" for Ethiopian New Year/Enkutatash), even when it might read awkwardly in English, to ensure consistency with official Ethiopian documentation.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
📚 Learning: 2025-07-04T03:26:56.759Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2651
File: holidays/locale/en_US/LC_MESSAGES/BQ.po:61-63
Timestamp: 2025-07-04T03:26:56.759Z
Learning: In the holidays library, "Eerste Pinksterdag" (Dutch for Pentecost Sunday) is consistently translated as "Whit Sunday" across all Dutch-speaking territories' en_US locale files, rather than "Pentecost", to maintain consistency within the codebase.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
  • holidays/locale/uk/LC_MESSAGES/EE.po
  • holidays/locale/et/LC_MESSAGES/EE.po
📚 Learning: 2025-03-31T11:50:50.488Z
Learnt from: Wasif-Shahzad
Repo: vacanza/holidays PR: 2385
File: holidays/countries/pakistan.py:59-60
Timestamp: 2025-03-31T11:50:50.488Z
Learning: In the holidays library, function names and comments follow en_US spelling conventions (e.g., "Labor Day"), while the default strings may use different locale conventions (e.g., "Labour Day" for en_PK) and are translated appropriately using the gettext function.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
📚 Learning: 2025-03-08T11:28:48.652Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:285-299
Timestamp: 2025-03-08T11:28:48.652Z
Learning: In the holidays project, message IDs (msgids) in locale files use region-specific naming conventions (e.g., "Muharram", "Id-ul-Fitr" in en_IN locale for India), while translator comments use internationally recognized names from the project's default locale (en_US) such as "Ashura", "Eid al-Fitr". This difference is intentional for proper localization.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
📚 Learning: 2025-06-25T14:08:09.323Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2651
File: holidays/locale/pap_BQ/LC_MESSAGES/BQ.po:70-72
Timestamp: 2025-06-25T14:08:09.323Z
Learning: The Papiamento translation "Di dos dia di Pasku" for "Tweede Kerstdag" (Boxing Day) in holidays/locale/pap_BQ/LC_MESSAGES/BQ.po comes from an authoritative source, despite the literal meaning potentially seeming to refer to Easter rather than Christmas.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
  • holidays/locale/uk/LC_MESSAGES/EE.po
  • holidays/locale/et/LC_MESSAGES/EE.po
📚 Learning: 2025-03-04T10:06:57.171Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2323
File: holidays/locale/en_MO/LC_MESSAGES/MO.po:86-96
Timestamp: 2025-03-04T10:06:57.171Z
Learning: In Macau holiday localizations, having multiple Chinese variants (聖誕節前日, 聖誕節前夕, 聖誕前夕) for "Christmas Eve" is intentional design, as confirmed by the developer.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/EE.po
  • holidays/locale/uk/LC_MESSAGES/EE.po
📚 Learning: 2025-08-28T02:34:11.657Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2860
File: holidays/groups/eastern.py:36-36
Timestamp: 2025-08-28T02:34:11.657Z
Learning: The default estimated_label change from "%s (estimated)" to "%s" in holidays/groups/eastern.py is intentional to remove English-only fallback text from localized holiday names. Countries that need estimated labels should define them properly with localization support rather than relying on the English fallback.

Applied to files:

  • holidays/locale/uk/LC_MESSAGES/EE.po
  • holidays/locale/et/LC_MESSAGES/EE.po
📚 Learning: 2025-07-08T10:20:04.069Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2701
File: holidays/countries/palestine.py:131-131
Timestamp: 2025-07-08T10:20:04.069Z
Learning: In Palestine, both the first and second days of Christmas (Orthodox and Catholic) are holidays. The first day is a nationwide public holiday, while the second day is a holiday for the relevant religious groups (Catholic or Orthodox) with the same name. The implementation correctly uses `_add_christmas_day` for nationwide holidays and `_add_christmas_day_two` for group-specific second days.

Applied to files:

  • holidays/locale/uk/LC_MESSAGES/EE.po
  • holidays/countries/estonia.py
📚 Learning: 2025-09-20T12:24:28.864Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_curacao.py:29-29
Timestamp: 2025-09-20T12:24:28.864Z
Learning: For Curacao in the holidays library, PUBLIC and HALF_DAY categories have different start years - PUBLIC holidays begin at the country's start_year while HALF_DAY holidays begin in 2010. When testing no_holidays methods, each category should be tested separately with appropriate pre-start years rather than using a unified supported_categories approach.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-06-14T11:04:31.180Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2609
File: holidays/countries/nauru.py:57-60
Timestamp: 2025-06-14T11:04:31.180Z
Learning: In the holidays library, the base `HolidayBase._populate()` method already includes a guard clause that prevents holiday population methods like `_populate_public_holidays()` from being called when the year is before `start_year` or after `end_year`. Therefore, individual country implementations do not need to add their own guard clauses for years before independence or other start dates.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-09-20T12:21:50.877Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_belgium.py:28-30
Timestamp: 2025-09-20T12:21:50.877Z
Learning: Belgium holidays implementation currently lacks a start_year attribute. In tests/countries/test_belgium.py, do not suggest adding test_no_holidays methods that rely on start_year until the start_year attribute is introduced to Belgium's holiday implementation.

Applied to files:

  • holidays/countries/estonia.py
  • tests/countries/test_estonia.py
📚 Learning: 2025-06-14T11:05:21.250Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2609
File: holidays/countries/nauru.py:48-50
Timestamp: 2025-06-14T11:05:21.250Z
Learning: In the holidays library, newer implementations use `start_year` to indicate the earliest year with complete holiday data coverage, not necessarily the first year a holiday existed. If a holiday system starts partway through a year (like Nauru's Public Holidays Act starting Jan 31, 1968), the start_year should be set to the following year (1969) to ensure users get full annual holiday coverage.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-09-28T05:42:12.777Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_indonesia.py:221-223
Timestamp: 2025-09-28T05:42:12.777Z
Learning: In tests/countries/test_indonesia.py, the manual set inclusion checks using get_named and years_found for Lunar New Year (test_lunar_new_year) and Vesak Day (test_vesak_day) are intentional and should remain until both holidays get their own `{insert}_no_estimated` flags implemented, rather than using standard harness assertions like assertHolidayName/assertNoHolidayName.

Applied to files:

  • holidays/countries/estonia.py
  • tests/countries/test_estonia.py
📚 Learning: 2025-06-13T12:18:03.539Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2614
File: holidays/countries/guyana.py:78-90
Timestamp: 2025-06-13T12:18:03.539Z
Learning: The holidays codebase now uses the constructor signature pattern `__init__(self, *args, islamic_show_estimated: bool = True, **kwargs)` across country classes.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-09-10T16:17:30.428Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_bosnia_and_herzegovina.py:21-24
Timestamp: 2025-09-10T16:17:30.428Z
Learning: Bosnia and Herzegovina holidays implementation currently lacks a start_year attribute. In tests/countries/test_bosnia_and_herzegovina.py, using cls.full_range = range(2000, 2050) is intentional to bound assertions and setup. Do not suggest replacing it with harness default full_range until start_year is introduced.

Applied to files:

  • holidays/countries/estonia.py
  • tests/countries/test_estonia.py
📚 Learning: 2025-04-23T09:59:19.886Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2490
File: holidays/countries/ethiopia.py:45-45
Timestamp: 2025-04-23T09:59:19.886Z
Learning: For the Ethiopia holidays class, it's appropriate to add a return type hint only to the `_is_leap_year` method to match the base class implementation in `holidays/holiday_base.py`, while keeping other methods without type hints to maintain consistency with other country implementations.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-08-21T04:56:03.780Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.780Z
Learning: In the holidays library, countries with localization support consistently use tr() wrappers around holiday names when calling _add_* methods (e.g., self._add_new_years_day(tr("Holiday Name"))). This is the established pattern across United States, Thailand, and other l10n-enabled countries, contrary to any suggestion that translation is handled internally by _add_* methods.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-08-26T21:24:41.827Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2860
File: holidays/countries/burkina_faso.py:27-30
Timestamp: 2025-08-26T21:24:41.827Z
Learning: Countries in the holidays library that don't have localization support yet should use plain English strings for labels (e.g., `estimated_label = "%s (estimated)"`), while only countries with existing .po translation files should use `tr()` wrapping. Check for the presence of .po files in holidays/locale to determine if a country has localization support.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-03-04T11:32:45.095Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (`government`, `mandatory`, and `public`), which are utilized by syntactic sugar methods.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-05-10T04:32:15.760Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2537
File: holidays/countries/finland.py:0-0
Timestamp: 2025-05-10T04:32:15.760Z
Learning: In the holidays package, detailed historical context and additional information should be added as comments at the method level or above conditional blocks, while comments directly above tr() function calls should only contain the holiday name itself (e.g., "# Independence Day.").

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-08-21T04:56:03.780Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.780Z
Learning: In the holidays library, countries with localization support DO use tr() wrappers around holiday names when calling _add_* methods. This is the correct pattern for l10n-enabled country implementations, contrary to previous learning about translation being handled internally by _add_* methods.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-04-03T16:58:27.175Z
Learnt from: Wasif-Shahzad
Repo: vacanza/holidays PR: 2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants like FEB, TUE, MAR, and SUN internally through parent class implementations even when these constants don't appear directly in the file.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-06-16T14:08:09.492Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2635
File: holidays/countries/bhutan.py:13-16
Timestamp: 2025-06-16T14:08:09.492Z
Learning: In the holidays library, translation is performed in the `_add_holiday` methods, not at the string level. Holiday strings passed to `_add_holiday_*` methods are processed through the translation machinery within those methods, so using `tr()` or `self.tr()` wrappers is unnecessary.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-08-24T06:53:35.897Z
Learnt from: Wasif-Shahzad
Repo: vacanza/holidays PR: 2852
File: holidays/countries/tajikistan.py:55-56
Timestamp: 2025-08-24T06:53:35.897Z
Learning: In Tajikistan, March 8th is celebrated as Mother's Day (Рӯзи Модар) rather than International Women's Day, so the country-specific implementation should use _add_holiday_mar_8() rather than the shared _add_womens_day() helper from InternationalHolidays.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-08-25T09:57:22.291Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2833
File: holidays/countries/uganda.py:50-56
Timestamp: 2025-08-25T09:57:22.291Z
Learning: In the holidays package, when adding comments for year-restricted holidays in Uganda and similar country modules, include specific legal or historical context such as the actual laws, parliamentary acts, or government decisions that established the holidays, rather than just generic "since YEAR" information. For example, reference the specific Parliament act, decree, or historical event that created the holiday.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-07-02T18:17:53.342Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2608
File: tests/countries/test_saint_vincent_and_the_grenadines.py:162-178
Timestamp: 2025-07-02T18:17:53.342Z
Learning: In the Saint Vincent and the Grenadines holidays implementation, New Year's Day is added without observed rules using `_add_new_years_day()` and should not include observed rule testing in its test method. Only holidays explicitly wrapped with `_add_observed()` have observed behavior.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-05-13T13:23:11.375Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2483
File: holidays/countries/turks_and_caicos_islands.py:117-118
Timestamp: 2025-05-13T13:23:11.375Z
Learning: The holidays library uses `_add_christmas_day_two` method to add Boxing Day holiday, not `_add_boxing_day`.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-06-18T10:07:58.780Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2642
File: holidays/countries/french_southern_territories.py:41-44
Timestamp: 2025-06-18T10:07:58.780Z
Learning: Territorial holiday classes that inherit from parent countries (like HolidaysAX from Finland, HolidaysSJ from Norway, HolidaysTF from France) follow a standard pattern of silently overriding self.subdiv in their _populate_public_holidays() method without validation, as this ensures they always use the correct subdivision code for their territory regardless of user input.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-10-27T21:23:12.690Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 3008
File: holidays/financial/_sifma.py:146-150
Timestamp: 2025-10-27T21:23:12.690Z
Learning: In the holidays library, `_christmas_day` is a property defined in the `ChristianHolidays` mixin class and is always available to any class that inherits from `ChristianHolidays`, regardless of whether `_populate_public_holidays` is called or which categories are requested. It does not depend on populating public holidays.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-08-19T21:00:47.849Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2831
File: holidays/countries/south_sudan.py:84-88
Timestamp: 2025-08-19T21:00:47.849Z
Learning: In the holidays library, Islamic holidays use dedicated methods for additional days (like `_add_eid_al_fitr_day_two`, `_add_eid_al_adha_day_two`) rather than parameters. The methods don't accept a `days` parameter - each day has its own specific method.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-03-30T20:18:46.006Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2386
File: holidays/countries/nepal.py:24-26
Timestamp: 2025-03-30T20:18:46.006Z
Learning: In the holidays library, country classes do not directly implement `_populate()`. Instead, they implement specialized methods like `_populate_public_holidays()`, and the base class `HolidayBase` handles the orchestration by calling these specialized methods.

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-04-04T10:52:41.546Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2398
File: holidays/countries/guinea.py:106-110
Timestamp: 2025-04-04T10:52:41.546Z
Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are covered by the test_eid_al_fitr_day() method, which tests both regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).

Applied to files:

  • holidays/countries/estonia.py
📚 Learning: 2025-09-18T03:19:23.722Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_algeria.py:28-30
Timestamp: 2025-09-18T03:19:23.722Z
Learning: In the vacanza/holidays project, tests now use self.start_year and self.end_year from the TestCase class instead of country-specific aliases (like DZ.start_year) for start_year and end_year references. This approach provides the test framework with better control over test year ranges rather than being tied to specific country start years.

Applied to files:

  • tests/countries/test_estonia.py
📚 Learning: 2025-04-05T04:47:27.213Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:47:27.213Z
Learning: For holiday tests in the vacanza/holidays project, structure tests by individual holidays rather than by years. Each test method should focus on a specific holiday and test it across multiple years (from start_year through 2050) using helper methods like `assertHolidayName`. For fixed holidays, use generators like `(f"{year}-01-01" for year in range(1991, 2051))`. For movable holidays, specify individual dates for specific years followed by a range check.

Applied to files:

  • tests/countries/test_estonia.py
📚 Learning: 2025-05-06T21:07:11.577Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2530
File: tests/countries/test_andorra.py:23-28
Timestamp: 2025-05-06T21:07:11.577Z
Learning: In the holidays project, test methods for country holidays follow a standard form where year ranges are explicitly recreated in each test method rather than being stored as class variables, to maintain consistency across all country tests.

Applied to files:

  • tests/countries/test_estonia.py
📚 Learning: 2025-04-05T06:49:06.217Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2386
File: tests/countries/test_nepal.py:499-536
Timestamp: 2025-04-05T06:49:06.217Z
Learning: In the holidays project, test files follow a dual testing approach: individual methods test specific holidays across multiple years, while comprehensive year-specific tests (e.g., `test_2025`) verify all holidays for a specific year in a single assertion. Both approaches serve different testing purposes and complement each other.

Applied to files:

  • tests/countries/test_estonia.py
📚 Learning: 2025-07-24T15:21:31.632Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2750
File: tests/countries/test_germany.py:46-46
Timestamp: 2025-07-24T15:21:31.632Z
Learning: In the holidays project test files, the standard method name for testing the absence of holidays is `test_no_holidays`, not more descriptive names like `test_no_holidays_before_1990`. This is a consistent naming convention across country test files like France and Germany.

Applied to files:

  • tests/countries/test_estonia.py
📚 Learning: 2025-04-05T04:50:40.752Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2416
File: tests/countries/test_turkmenistan.py:31-49
Timestamp: 2025-04-05T04:50:40.752Z
Learning: For Turkmenistan holiday tests, use this class structure: `class TestTurkmenistan(CommonCountryTests, TestCase)` with imports `from unittest import TestCase`, `from holidays.countries import Turkmenistan, TM, TKM`, and `from tests.common import CommonCountryTests`. Ensure to call `super().setUp()` in the setUp method.

Applied to files:

  • tests/countries/test_estonia.py
📚 Learning: 2025-04-05T04:29:38.042Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2416
File: tests/countries/test_turkmenistan.py:85-86
Timestamp: 2025-04-05T04:29:38.042Z
Learning: For testing holiday implementations in the vacanza/holidays repository, recommend using `from tests.common import CommonCountryTests` as the base class instead of directly using `unittest.TestCase` to maintain consistency with project conventions and leverage common test utilities.

Applied to files:

  • tests/countries/test_estonia.py
📚 Learning: 2025-08-25T04:28:02.061Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2848
File: tests/countries/test_somalia.py:44-127
Timestamp: 2025-08-25T04:28:02.061Z
Learning: In the holidays library, Islamic holiday tests use `self.no_estimated_holidays = Country(years=years, islamic_show_estimated=False)` as the library-wide standard approach to simplify test cases. This pattern is intentional and preferred over testing estimated labels.

Applied to files:

  • tests/countries/test_estonia.py
🧬 Code graph analysis (2)
holidays/countries/estonia.py (4)
holidays/countries/turkey.py (1)
  • _populate_half_day_holidays (112-123)
holidays/countries/curacao.py (1)
  • _populate_half_day_holidays (159-166)
holidays/countries/greece.py (1)
  • _populate_half_day_holidays (91-96)
holidays/countries/iceland.py (1)
  • _populate_half_day_holidays (82-90)
tests/countries/test_estonia.py (1)
holidays/countries/estonia.py (1)
  • Estonia (20-114)
🪛 Ruff (0.14.6)
holidays/countries/estonia.py

98-98: Missing return type annotation for private function _populate_half_day_holidays

Add return type annotation: None

(ANN202)

tests/countries/test_estonia.py

22-22: Missing return type annotation for classmethod setUpClass

Add return type annotation: None

(ANN206)

⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Test Python 3.14 on windows-latest
  • GitHub Check: Test Python 3.11 on windows-latest
  • GitHub Check: Test Python 3.10 on windows-latest
  • GitHub Check: Test Python 3.13 on windows-latest
  • GitHub Check: Test Python 3.12 on windows-latest
🔇 Additional comments (23)
README.md (1)

631-631: LGTM!

Documentation correctly reflects the new HALF_DAY category for Estonia.

holidays/locale/uk/LC_MESSAGES/EE.po (3)

50-57: LGTM!

New May Day and International Workers' Solidarity Day entries properly added with appropriate Ukrainian translations.


70-73: LGTM!

Day of Declaration of Sovereignty entry correctly added.


86-88: LGTM!

Pre-holiday day entry properly added with clear Ukrainian translation conveying the 3-hour workday reduction.

holidays/locale/en_US/LC_MESSAGES/EE.po (2)

50-57: LGTM!

May Day and International Workers' Solidarity Day entries properly localized.


70-88: LGTM!

Day of Declaration of Sovereignty and Pre-holiday day entries correctly added with clear English translations.

holidays/locale/et/LC_MESSAGES/EE.po (2)

46-56: LGTM!

New Whit Sunday, May Day, and International Workers' Solidarity Day entries correctly added with empty msgstr (appropriate for default language file).


70-88: LGTM!

Day of Declaration of Sovereignty and Pre-holiday day entries properly structured.

snapshots/countries/EE_COMMON.json (1)

1-895: LGTM!

Auto-generated snapshot correctly reflects the updated Estonia holiday logic.

holidays/countries/estonia.py (5)

21-33: Solid documentation.

The legal references and links to official sources are helpful for future maintainers.


37-40: LGTM!

The start_year = 1991 correctly corresponds to the 1990 decree taking effect, and supported_categories properly includes both HALF_DAY and PUBLIC.


54-70: Year-gating logic looks correct.

Good Friday, Easter Sunday, and Whit Sunday properly gated to 1994+ per the Holidays and Anniversaries Act. The May Day name transition from "International Workers' Solidarity Day" to "May Day" in 1994 is cleanly handled with the inline ternary.


82-84: LGTM!

Day of Declaration of Sovereignty correctly limited to 1991-1993.


98-114: Consider removing explicit return None and adding return type hint.

Looking at similar implementations (Greece, Iceland, Turkey, Curacao), they don't use explicit return None. The early exit could simply be return. Also, per static analysis, adding a return type annotation would be consistent.

-    def _populate_half_day_holidays(self):
+    def _populate_half_day_holidays(self) -> None:
         # Working and Rest Hours Act (24.01.2001), § 25.
         # Employment Contracts Act (17.12.2008, in force since 01.07.2009), § 53.

         if self._year <= 2000:
-            return None
+            return

         # Pre-holiday day (workday shortened by 3 hours).
         name = tr("pühade-eelne päev (tööpäev lüheneb 3 tunni võrra)")
⛔ Skipped due to learnings
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 3026
File: holidays/countries/spain.py:189-189
Timestamp: 2025-10-28T17:26:45.090Z
Learning: In the vacanza/holidays codebase, `_populate` methods (such as `_populate_public_holidays`, `_populate_subdiv_holidays`, and subdivision-specific methods like `_populate_subdiv_XX_public_holidays`) intentionally do not include return type annotations like `-> None`. This is a consistent pattern across country implementations (e.g., Germany, United States, Spain) and should not be changed even when static analysis tools like Ruff suggest adding them.
<!-- </add_learning>
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2490
File: holidays/countries/ethiopia.py:45-45
Timestamp: 2025-04-23T09:59:19.886Z
Learning: For the Ethiopia holidays class, it's appropriate to add a return type hint only to the `_is_leap_year` method to match the base class implementation in `holidays/holiday_base.py`, while keeping other methods without type hints to maintain consistency with other country implementations.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 3025
File: holidays/exceptions.py:14-25
Timestamp: 2025-10-28T17:02:23.997Z
Learning: Do not suggest adding return type annotations (such as `-> None` for `__init__` methods) in the vacanza/holidays codebase.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2609
File: holidays/countries/nauru.py:57-60
Timestamp: 2025-06-14T11:04:31.180Z
Learning: In the holidays library, the base `HolidayBase._populate()` method already includes a guard clause that prevents holiday population methods like `_populate_public_holidays()` from being called when the year is before `start_year` or after `end_year`. Therefore, individual country implementations do not need to add their own guard clauses for years before independence or other start dates.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2942
File: holidays/countries/south_africa.py:91-98
Timestamp: 2025-09-18T07:01:12.236Z
Learning: In the holidays library South Africa implementation, inline ternary operators for holiday name selection (like "Republic Day" if self._year >= 1961 else "Union Day") are intentionally kept inline rather than extracted to separate variables, as this structure is designed in preparation for future localization (l10n) support where the contextual relationship between conditions and translatable strings needs to be preserved.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_belgium.py:28-30
Timestamp: 2025-09-20T12:21:50.877Z
Learning: Belgium holidays implementation currently lacks a start_year attribute. In tests/countries/test_belgium.py, do not suggest adding test_no_holidays methods that rely on start_year until the start_year attribute is introduced to Belgium's holiday implementation.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_cambodia.py:20-22
Timestamp: 2025-11-08T04:57:36.307Z
Learning: In the vacanza/holidays test suite, `setUpClass` methods in test files intentionally do not include return type annotations like `-> None`. This is a consistent pattern across all country test files and should not be changed, even when static analysis tools like Ruff suggest adding them.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2386
File: holidays/countries/nepal.py:24-26
Timestamp: 2025-03-30T20:18:46.006Z
Learning: In the holidays library, country classes do not directly implement `_populate()`. Instead, they implement specialized methods like `_populate_public_holidays()`, and the base class `HolidayBase` handles the orchestration by calling these specialized methods.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2437
File: holidays/calendars/tibetan.py:805-810
Timestamp: 2025-04-08T14:50:15.325Z
Learning: The standard behavior for calendar date methods in the holidays library is to return `(None, True)` when a requested year is not found in the date dictionary, rather than raising an exception or requiring documentation for out-of-range years.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2437
File: holidays/calendars/tibetan.py:805-810
Timestamp: 2025-04-08T14:50:15.325Z
Learning: The standard behavior for calendar date methods in the holidays library is to return `(None, True)` when a requested year is not found in the date dictionary, rather than raising an exception or requiring documentation for out-of-range years.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2642
File: holidays/countries/french_southern_territories.py:41-44
Timestamp: 2025-06-18T10:07:58.780Z
Learning: Territorial holiday classes that inherit from parent countries (like HolidaysAX from Finland, HolidaysSJ from Norway, HolidaysTF from France) follow a standard pattern of silently overriding self.subdiv in their _populate_public_holidays() method without validation, as this ensures they always use the correct subdivision code for their territory regardless of user input.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2642
File: holidays/countries/france.py:178-180
Timestamp: 2025-06-18T10:26:50.180Z
Learning: In the France holidays implementation, the _populate_subdiv_57_public_holidays() (Moselle) and _populate_subdiv_6ae_public_holidays() (Alsace) methods are functionally identical, both adding Good Friday (≥1893) and Saint Stephen's Day (≥1892) with the same legal references from August 16th, 1892. Therefore, for the deprecated "Alsace-Moselle" subdivision, calling either method produces the same result.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2654
File: holidays/countries/cabo_verde.py:133-141
Timestamp: 2025-07-14T20:23:48.198Z
Learning: The holidays library provides helper methods `_add_holiday_2nd_sun_of_may()` and `_add_holiday_3rd_sun_of_jun()` for adding holidays on the 2nd Sunday of May and 3rd Sunday of June respectively. These methods are used across multiple country implementations including Latvia, Finland, Belarus, Malaysia, Madagascar, and Cape Verde.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_curacao.py:29-29
Timestamp: 2025-09-20T12:24:28.864Z
Learning: For Curacao in the holidays library, PUBLIC and HALF_DAY categories have different start years - PUBLIC holidays begin at the country's start_year while HALF_DAY holidays begin in 2010. When testing no_holidays methods, each category should be tested separately with appropriate pre-start years rather than using a unified supported_categories approach.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_south_africa.py:22-22
Timestamp: 2025-09-14T04:41:10.139Z
Learning: South Africa's observed holiday system only started in 1995, so in tests/countries/test_south_africa.py, using years_non_observed=range(1995, 2050) is intentional to limit testing to years where observed holidays actually exist, improving both correctness and performance.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.
tests/countries/test_estonia.py (9)

15-27: LGTM!

The setup and test_no_holidays correctly validates both PUBLIC and HALF_DAY categories. Testing HALF_DAY for year 2000 aligns with the implementation that returns None for year <= 2000. Based on learnings, overriding test_no_holidays is the correct approach when supporting additional non-PUBLIC categories.


29-30: LGTM!

Clean and comprehensive test using self.full_range.


32-61: LGTM!

Tests correctly validate year boundaries for Good Friday and Easter Sunday (1994+), with proper assertions for both presence and absence.


63-71: LGTM!

Thorough test of the May Day name transition at 1994. Both names are validated for presence in their respective year ranges and absence outside them.


73-96: LGTM!

Year boundaries properly tested: Whit Sunday (1994+), Restoration of Independence Day (1998+), and always-present holidays using full_range.


98-101: LGTM!

New holiday test correctly validates presence for 1991-1993 and absence from 1994 onwards, matching the implementation's year <= 1993 condition.


103-112: LGTM!

Christmas Eve correctly tested from 2005, and Christmas days cover the full range.


114-124: LGTM!

Comprehensive test for half-day holidays. Correctly validates:

  • Not present in PUBLIC category
  • Dec 24 for 2001-2004, Dec 23 from 2005 (matching the implementation's conditional logic)
  • All pre-holiday days start from 2001

126-186: LGTM!

Localization tests properly updated for all three supported locales (et, en_US, uk). Pre-holiday day entries are correctly included for 2022, using Dec 23 (not Dec 24) as expected for years >= 2005.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (bd7e31f) to head (079511a).
⚠️ Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3089   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          306       306           
  Lines        18049     18065   +16     
  Branches      2300      2304    +4     
=========================================
+ Hits         18049     18065   +16     

☔ 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
Copy Markdown
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 🇪🇪

PPsyrius added a commit to PPsyrius/python-holidays that referenced this pull request Nov 29, 2025
Copy link
Copy Markdown
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 Nov 29, 2025
Merged via the queue into vacanza:dev with commit 6ac47d7 Nov 29, 2025
33 checks passed
@KJhellico KJhellico deleted the upd-estonia branch November 29, 2025 20:08
@arkid15r arkid15r mentioned this pull request Dec 1, 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.

3 participants