-
-
Notifications
You must be signed in to change notification settings - Fork 550
Add Eritrea holidays #2783
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 Eritrea holidays #2783
Conversation
…, and adjust test cases.
Refactor Eritrea holidays: update references, add and remove holidays, and adjust test cases.
Summary by CodeRabbit
WalkthroughAdds Eritrea holiday support: new country module, package import and registry entry, snapshot data (1994–2050), tests, and README update inserting Eritrea into the Available Countries list. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Assessment against linked issues
Possibly related PRs
Suggested reviewers
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #2783 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 286 287 +1
Lines 17040 17077 +37
Branches 2229 2229
=========================================
+ Hits 17040 17077 +37 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Prateekshit Jaiswal <67361301+Prateekshit73@users.noreply.github.com>
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.
Actionable comments posted: 8
♻️ Duplicate comments (1)
holidays/countries/eritrea.py (1)
100-105
: Extract and reuse the Ethiopic leap-year shift for New Year & MeskelWe’ve confirmed that Ethiopia’s module adjusts both Enkutatash and Meskel by +1 day in leap years (see holidays/countries/ethiopia.py lines 103–106). To avoid duplication in Eritrea we should:
• In holidays/groups/christian.py
– Add a helper (e.g._add_ethiopic_holiday(name, month, day)
) that usesself._is_leap_year()
to add eitherday
orday+1
.• In holidays/countries/ethiopia.py
– Replace the inline…SEP, 12 if … else 11
andSEP, 28 if … else 27
with calls to the new helper.• In holidays/countries/eritrea.py
– Replace
python self._add_holiday_sep_11(tr("Keddus Yohannes")) self._add_holiday_sep_27(tr("Meskel"))
with
python self._add_ethiopic_holiday(tr("Keddus Yohannes"), SEP, 11) self._add_ethiopic_holiday(tr("Meskel"), SEP, 27)
Let me know if you’d like me to draft the helper and update both modules.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (6)
README.md
(2 hunks)holidays/countries/eritrea.py
(1 hunks)holidays/locale/en_ER/LC_MESSAGES/ER.po
(1 hunks)holidays/locale/en_US/LC_MESSAGES/ER.po
(1 hunks)snapshots/countries/ER_COMMON.json
(1 hunks)tests/countries/test_eritrea.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (51)
📓 Common learnings
Learnt from: KJhellico
PR: vacanza/holidays#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).
Learnt from: KJhellico
PR: vacanza/holidays#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: Wasif-Shahzad
PR: vacanza/holidays#2522
File: holidays/countries/yemen.py:158-163
Timestamp: 2025-05-06T13:01:22.693Z
Learning: In the holidays library, the RAMADAN_BEGINNING_DATES dictionary in country-specific Islamic holiday classes (like YemenIslamicHolidays) is used indirectly through the backend. When a country class calls _add_holiday_29_ramadan(), the IslamicHolidays implementation uses the country's custom calendar dates to calculate the 29th day of Ramadan by adding 28 days to the beginning date.
Learnt from: PPsyrius
PR: vacanza/holidays#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.
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.031Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.
Learnt from: KJhellico
PR: vacanza/holidays#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
PR: vacanza/holidays#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.
📚 Learning: 2025-07-12T20:54:28.749Z
Learnt from: KJhellico
PR: vacanza/holidays#2719
File: README.md:108-108
Timestamp: 2025-07-12T20:54:28.749Z
Learning: In PR #2719 adding Faroe Islands, KJhellico confirmed that the country count in README.md should be updated from 213 to 214, making 214 the accurate total after this addition.
Applied to files:
README.md
📚 Learning: 2025-06-06T16:02:09.910Z
Learnt from: KJhellico
PR: vacanza/holidays#2606
File: README.md:562-568
Timestamp: 2025-06-06T16:02:09.910Z
Learning: The README.md country table displays ISO 3166-1 alpha-2 codes only in the "Code" column. Alpha-3 codes or country aliases should not be included in this table format, maintaining consistency with all other country entries.
Applied to files:
README.md
📚 Learning: 2025-03-30T18:25:07.087Z
Learnt from: KJhellico
PR: vacanza/holidays#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/ER.po
holidays/locale/en_ER/LC_MESSAGES/ER.po
holidays/countries/eritrea.py
📚 Learning: 2025-04-17T17:08:48.082Z
Learnt from: PPsyrius
PR: vacanza/holidays#2438
File: holidays/locale/ar_IQ/LC_MESSAGES/IQ.po:35-81
Timestamp: 2025-04-17T17:08:48.082Z
Learning: In holiday PO files, when the file represents the default language of an entity (e.g., ar_IQ for Iraq), no translations in `msgstr` are required as the `msgid` values are already in the target language.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/ER.po
holidays/locale/en_ER/LC_MESSAGES/ER.po
📚 Learning: 2025-05-06T15:25:44.333Z
Learnt from: KJhellico
PR: vacanza/holidays#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/ER.po
holidays/locale/en_ER/LC_MESSAGES/ER.po
📚 Learning: 2025-06-28T10:39:19.185Z
Learnt from: KJhellico
PR: vacanza/holidays#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/ER.po
holidays/locale/en_ER/LC_MESSAGES/ER.po
📚 Learning: 2025-03-08T11:28:48.652Z
Learnt from: KJhellico
PR: vacanza/holidays#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/ER.po
holidays/locale/en_ER/LC_MESSAGES/ER.po
📚 Learning: 2025-04-05T08:12:19.986Z
Learnt from: PPsyrius
PR: vacanza/holidays#2402
File: holidays/locale/en_TT/LC_MESSAGES/TT.po:46-48
Timestamp: 2025-04-05T08:12:19.986Z
Learning: In the holidays library, localization (PO) files follow this convention: comments (#.) always use American English (en_US) spelling, while the msgid content follows the locale-specific spelling standards of the target language.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/ER.po
holidays/locale/en_ER/LC_MESSAGES/ER.po
📚 Learning: 2025-03-05T17:51:00.633Z
Learnt from: KJhellico
PR: vacanza/holidays#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/ER.po
holidays/locale/en_ER/LC_MESSAGES/ER.po
📚 Learning: 2025-04-23T09:53:20.043Z
Learnt from: PPsyrius
PR: vacanza/holidays#2490
File: holidays/locale/en_ET/LC_MESSAGES/ET.po:99-101
Timestamp: 2025-04-23T09:53:20.043Z
Learning: For Ethiopian holidays in the en_ET locale, translations must maintain the exact official wording from government sources such as Negarit Gazeta Proclamations, even when they contain redundancies like the word "Day" appearing twice (e.g., "Ethiopian National Unity Day (Ethiopian Nations and Nationalities) Day").
Applied to files:
holidays/locale/en_US/LC_MESSAGES/ER.po
holidays/locale/en_ER/LC_MESSAGES/ER.po
holidays/countries/eritrea.py
📚 Learning: 2025-03-30T13:33:31.598Z
Learnt from: PPsyrius
PR: vacanza/holidays#2388
File: holidays/locale/fr/LC_MESSAGES/CI.po:28-101
Timestamp: 2025-03-30T13:33:31.598Z
Learning: In the holidays library, for localization files of the default language (like French for Ivory Coast in fr/LC_MESSAGES/CI.po), the best practice is to leave the message strings (msgstr) empty to avoid possible typos, since the message IDs (msgid) are already in the target language.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/ER.po
holidays/locale/en_ER/LC_MESSAGES/ER.po
📚 Learning: 2025-04-03T05:58:00.033Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
holidays/locale/en_US/LC_MESSAGES/ER.po
holidays/countries/eritrea.py
📚 Learning: 2025-06-25T20:55:00.642Z
Learnt from: KJhellico
PR: vacanza/holidays#2651
File: holidays/locale/nl/LC_MESSAGES/BQ.po:29-95
Timestamp: 2025-06-25T20:55:00.642Z
Learning: In the holidays library, Dutch locale files (.po) with `X-Source-Language: nl` should have empty msgstr entries when the target language is also Dutch. The library uses fallback=True with gettext, which returns the original msgid when msgstr is empty. This is the correct pattern for native language files and does not cause blank holiday names.
Applied to files:
holidays/locale/en_ER/LC_MESSAGES/ER.po
📚 Learning: 2025-04-03T05:59:57.480Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/ER_COMMON.json
📚 Learning: 2025-06-24T17:26:17.728Z
Learnt from: KJhellico
PR: vacanza/holidays#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/ER_COMMON.json
📚 Learning: 2025-04-05T04:50:40.752Z
Learnt from: PPsyrius
PR: vacanza/holidays#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_eritrea.py
📚 Learning: 2025-05-06T21:07:11.577Z
Learnt from: KJhellico
PR: vacanza/holidays#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_eritrea.py
📚 Learning: 2025-04-05T04:47:27.213Z
Learnt from: PPsyrius
PR: vacanza/holidays#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_eritrea.py
📚 Learning: 2025-04-05T04:29:38.042Z
Learnt from: PPsyrius
PR: vacanza/holidays#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_eritrea.py
📚 Learning: 2025-08-08T14:37:03.031Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.031Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.
Applied to files:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-04-05T04:33:53.254Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:33:53.254Z
Learning: For Turkmenistan holiday tests, recommend using CommonCountryTests as the base class rather than unittest.TestCase to follow project conventions, be consistent with other country test files, and gain access to common test utilities.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-06-16T15:48:48.680Z
Learnt from: PPsyrius
PR: vacanza/holidays#2615
File: tests/countries/test_anguilla.py:1-12
Timestamp: 2025-06-16T15:48:48.680Z
Learning: Test files in the holidays repository follow a standardized structure without module or class docstrings. All country test files use the same pattern: license header, imports, and class definition (`class Test{Country}(CommonCountryTests, TestCase):`) without docstrings. This is an established codebase convention that should be maintained for consistency.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-04-04T10:52:41.546Z
Learnt from: KJhellico
PR: vacanza/holidays#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).
Applied to files:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-04-04T10:52:41.546Z
Learnt from: KJhellico
PR: vacanza/holidays#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:
tests/countries/test_eritrea.py
📚 Learning: 2025-04-05T06:49:06.217Z
Learnt from: PPsyrius
PR: vacanza/holidays#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_eritrea.py
📚 Learning: 2025-07-24T15:21:31.632Z
Learnt from: PPsyrius
PR: vacanza/holidays#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_eritrea.py
📚 Learning: 2025-08-08T14:37:03.031Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.031Z
Learning: In holidays/countries/__init__.py, re-export country classes using absolute imports (e.g., 'from holidays.countries.liberia import Liberia, LR, LBR') and keep alphabetical ordering (e.g., Lesotho, Liberia, Libya). Avoid relative imports in this file.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-06-13T12:18:03.539Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/eritrea.py
📚 Learning: 2025-06-19T02:34:18.382Z
Learnt from: PPsyrius
PR: vacanza/holidays#2643
File: holidays/countries/mauritius.py:144-169
Timestamp: 2025-06-19T02:34:18.382Z
Learning: Custom holiday classes that extend _CustomHinduHolidays, _CustomIslamicHolidays, _CustomBuddhistHolidays, etc. in the holidays library do not use docstrings. They follow a pattern of using only inline comments above date dictionaries, as seen in Malaysia, Singapore, UAE, and other country implementations.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-06-16T11:42:28.293Z
Learnt from: PPsyrius
PR: vacanza/holidays#2638
File: holidays/countries/svalbard_and_jan_mayen.py:1-12
Timestamp: 2025-06-16T11:42:28.293Z
Learning: In the holidays library codebase, country implementation files in holidays/countries/ follow a standard convention of NOT having module-level docstrings. They start with the license header comment block, followed by imports, then class definitions. This is consistent across all country implementations like austria.py, belgium.py, canada.py, etc.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-04-23T09:59:19.886Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/eritrea.py
📚 Learning: 2025-04-13T20:41:56.613Z
Learnt from: KJhellico
PR: vacanza/holidays#2386
File: holidays/countries/nepal.py:266-284
Timestamp: 2025-04-13T20:41:56.613Z
Learning: The Islamic holiday dates in the holidays library should only include officially verified dates, not predicted ones, to maintain accuracy. This is especially important for holidays that depend on lunar observations like Eid al-Fitr and Eid al-Adha.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-05-06T13:01:22.693Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2522
File: holidays/countries/yemen.py:158-163
Timestamp: 2025-05-06T13:01:22.693Z
Learning: In the holidays library, the RAMADAN_BEGINNING_DATES dictionary in country-specific Islamic holiday classes (like YemenIslamicHolidays) is used indirectly through the backend. When a country class calls _add_holiday_29_ramadan(), the IslamicHolidays implementation uses the country's custom calendar dates to calculate the 29th day of Ramadan by adding 28 days to the beginning date.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-03-29T15:15:05.919Z
Learnt from: KJhellico
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:171-183
Timestamp: 2025-03-29T15:15:05.919Z
Learning: In the Fiji holidays implementation, the maintainers are aware of the need to extend the MAWLID_DATES dictionary beyond 2025 when future official references become available, and will do so when appropriate. No suggestions about extending this dictionary should be made in future reviews.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-03-19T16:54:58.657Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
holidays/countries/eritrea.py
📚 Learning: 2025-06-04T10:09:28.732Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2593
File: holidays/calendars/islamic.py:3993-3994
Timestamp: 2025-06-04T10:09:28.732Z
Learning: In the holidays/calendars/islamic.py file, the Islamic calendar date methods in the _IslamicLunar class (like ali_al_rida_death_dates, ashura_dates, etc.) follow a consistent pattern of being single-line methods that return self._get_holiday(CONSTANT, year) without docstrings. New methods should follow this same pattern for consistency.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-07-10T03:36:16.461Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
holidays/countries/eritrea.py
📚 Learning: 2025-07-10T03:36:16.461Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
holidays/countries/eritrea.py
📚 Learning: 2025-04-13T19:10:31.502Z
Learnt from: KJhellico
PR: vacanza/holidays#2465
File: holidays/countries/suriname.py:219-251
Timestamp: 2025-04-13T19:10:31.502Z
Learning: The `_CustomIslamicHolidays` classes in this project contain only exact verified holiday dates from reliable sources, rather than calculated or estimated future dates. This is by design to ensure accuracy, particularly for religious holidays that may follow lunar calendars or depend on local observations.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-04-03T13:03:16.558Z
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:101-106
Timestamp: 2025-04-03T13:03:16.558Z
Learning: For Islamic holidays in Guinea like "Lendemain de la nuit Lailatoul Qadr" (Day after Night of Power) and "Lendemain de la nuit du Maoloud" (Day after Prophet's Birthday), the naming refers to the daylight hours following the night when these Islamic observances occur. Since in the Islamic calendar days begin at sunset rather than midnight, methods like `_add_laylat_al_qadr_day` and `_add_mawlid_day` correctly calculate these dates without requiring an additional day offset in the implementation, following the same pattern as in the Ivory Coast implementation.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-04-23T09:51:03.951Z
Learnt from: PPsyrius
PR: vacanza/holidays#2490
File: holidays/locale/en_ET/LC_MESSAGES/ET.po:95-101
Timestamp: 2025-04-23T09:51:03.951Z
Learning: Ethiopian holiday translations should follow the exact wording from official government sources (such as Negarit Gazeta Proclamations), even when they contain seemingly redundant wording like "Day" appearing twice.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-06-14T10:58:16.431Z
Learnt from: PPsyrius
PR: vacanza/holidays#2629
File: holidays/locale/en_US/LC_MESSAGES/NA.po:17-28
Timestamp: 2025-06-14T10:58:16.431Z
Learning: In the holidays library localization system, different variants of the same language (like en_NA and en_US) can serve as source and target languages, with X-Source-Language correctly indicating the regional variant that serves as the original text.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-06-14T11:00:25.835Z
Learnt from: KJhellico
PR: vacanza/holidays#2629
File: holidays/locale/en_US/LC_MESSAGES/NA.po:17-28
Timestamp: 2025-06-14T11:00:25.835Z
Learning: In the holidays library localization files, the X-Source-Language field should contain the value that matches the country's default language setting (e.g., if a country class has default_language = "en_NA", then X-Source-Language should be "en_NA").
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-07-08T10:20:04.069Z
Learnt from: KJhellico
PR: vacanza/holidays#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/countries/eritrea.py
📚 Learning: 2025-06-29T10:36:06.138Z
Learnt from: KJhellico
PR: vacanza/holidays#2671
File: holidays/countries/libya.py:51-108
Timestamp: 2025-06-29T10:36:06.138Z
Learning: There is no project-wide convention in the holidays library to organize holidays by calendar type (Islamic holidays first, then Gregorian holidays). Countries organize holidays in various ways - often chronologically, by importance, or by logical grouping - and Islamic holidays are frequently placed at the end of the _populate_public_holidays method rather than at the beginning.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-06-06T14:40:31.932Z
Learnt from: KJhellico
PR: vacanza/holidays#2593
File: holidays/countries/senegal.py:66-110
Timestamp: 2025-06-06T14:40:31.932Z
Learning: In the holidays library, within the _populate_public_holidays method, holidays should be arranged by calendar type (Islamic holidays first, then Gregorian holidays) without additional type grouping comments. The organization by calendar type is sufficient and follows the project's established conventions.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-03-30T08:08:30.415Z
Learnt from: PPsyrius
PR: vacanza/holidays#2388
File: holidays/countries/ivory_coast.py:84-85
Timestamp: 2025-03-30T08:08:30.415Z
Learning: Islamic holiday logic should be implemented in the holidays/groups/islamic.py file, with country-specific files only calling these methods with the appropriate translated names.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-03-26T08:55:08.917Z
Learnt from: PPsyrius
PR: vacanza/holidays#2362
File: holidays/ical.py:53-80
Timestamp: 2025-03-26T08:55:08.917Z
Learning: The holidays library intentionally limits language code support to ISO 639-1 and ISO 639-2 standards (2-3 letter language codes with optional region) to maintain consistency with other modules like `common_holidays` and `financial_holidays`, rather than implementing full RFC 5646 compliance.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-05-10T04:02:13.815Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/countries/eritrea.py
📚 Learning: 2025-07-02T10:22:33.053Z
Learnt from: KJhellico
PR: vacanza/holidays#2651
File: tests/countries/test_bonaire_sint_eustatius_and_saba.py:225-306
Timestamp: 2025-07-02T10:22:33.053Z
Learning: The `assertLocalizedHolidays` method in the vacanza/holidays project requires a complete list of all holidays from all subdivisions, not just subdivision-specific holidays. This is a framework requirement for proper localization testing.
Applied to files:
holidays/countries/eritrea.py
🧬 Code Graph Analysis (1)
tests/countries/test_eritrea.py (2)
tests/common.py (7)
TestCase
(28-338)CommonCountryTests
(356-374)assertAliases
(121-130)assertNoHolidays
(292-294)assertHolidayName
(195-199)assertNoHolidayName
(273-275)assertLocalizedHolidays
(327-338)holidays/countries/eritrea.py (3)
Eritrea
(22-116)ER
(119-120)ERI
(123-124)
⏰ 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). (1)
- GitHub Check: Build distribution
🔇 Additional comments (10)
README.md (2)
598-603
: Eritrea row looks consistent.Alpha-2 code only in “Code”, default language bolded. Good.
108-121
: COUNTRIES total matches README – no change required
- holidays/registry.py’s
COUNTRIES
dict contains 230 country entries"eritrea": ("Eritrea", "ER", "ERI")
is present (line 67)README’s “We currently support 230 country codes.” is accurate. Great work!
tests/countries/test_eritrea.py (1)
15-16
: Add Eritrea re-export and update test importThe re-export for Eritrea isn’t present yet in holidays/countries/init.py, so updating the test import will break. Please:
• In holidays/countries/init.py, add:
from .eritrea import Eritrea, ER, ERI
(insert alphabetically between Lesotho and Libya)
• In tests/countries/test_eritrea.py, change the import to:-from holidays.countries.eritrea import Eritrea, ER, ERI +from holidays.countries import Eritrea, ER, ERI⛔ Skipped due to learnings
Learnt from: KJhellico PR: vacanza/holidays#2774 File: tests/countries/test_liberia.py:15-16 Timestamp: 2025-08-08T14:37:03.031Z Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.
Learnt from: KJhellico PR: vacanza/holidays#2774 File: tests/countries/test_liberia.py:15-16 Timestamp: 2025-08-08T14:37:03.031Z Learning: In holidays/countries/__init__.py, re-export country classes using absolute imports (e.g., 'from holidays.countries.liberia import Liberia, LR, LBR') and keep alphabetical ordering (e.g., Lesotho, Liberia, Libya). Avoid relative imports in this file.
Learnt from: KJhellico PR: vacanza/holidays#2778 File: tests/countries/test_kiribati.py:15-15 Timestamp: 2025-08-09T18:31:23.207Z Learning: In the holidays project test files, the standard import pattern is `from holidays.countries.<country> import Country, CODE1, CODE2` (used in ~97% of test files), not `from holidays.countries import Country, CODE1, CODE2`. Only a few exceptions (Suriname, Sierra Leone, Mauritius, Mali, Ivory Coast, Guyana) use the aggregated import pattern.
Learnt from: PPsyrius PR: vacanza/holidays#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.
Learnt from: PPsyrius PR: vacanza/holidays#2416 File: tests/countries/test_turkmenistan.py:52-64 Timestamp: 2025-04-05T04:33:53.254Z Learning: For Turkmenistan holiday tests, recommend using CommonCountryTests as the base class rather than unittest.TestCase to follow project conventions, be consistent with other country test files, and gain access to common test utilities.
Learnt from: PPsyrius PR: vacanza/holidays#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.
Learnt from: PPsyrius PR: vacanza/holidays#2615 File: tests/countries/test_anguilla.py:1-12 Timestamp: 2025-06-16T15:48:48.680Z Learning: Test files in the holidays repository follow a standardized structure without module or class docstrings. All country test files use the same pattern: license header, imports, and class definition (`class Test{Country}(CommonCountryTests, TestCase):`) without docstrings. This is an established codebase convention that should be maintained for consistency.
Learnt from: KJhellico PR: vacanza/holidays#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.
holidays/countries/eritrea.py (7)
41-53
: Init pattern and Islamic customization look solidConstructor signature matches project pattern and correctly wires EritreaIslamicHolidays with estimated labeling toggle.
106-116
: Islamic holidays wiring looks correctUsing EritreaIslamicHolidays with estimated labeling is consistent with project rules (official dates where known, estimated otherwise).
127-181
: Custom Islamic dates follow the new confirmed-years pattern
- Uses CONFIRMED_YEARS bounds and includes only officially verified dates.
- No forward-looking predictions beyond 2025. Good.
119-125
: Re-export and registry entries validated for Eritrea aliases
All set—holidays/countries/__init__.py
andholidays/registry.py
already include the correct entries for Eritrea, ER, and ERI. No further changes needed.
56-64
: Ignore naming alignment suggestion for Eritrea holidaysThe code in holidays/countries/eritrea.py intentionally uses “New Year” and “Women's Day” to match the existing msgids in holidays/locale/en_ER/LC_MESSAGES/ER.po (and the en_US ER catalog). Since those translations already exist and are specific to the Eritrean locale, no renaming is needed here.
Likely an incorrect or invalid review comment.
89-96
: Cite effective-from year for Eritrea holidays ≥2011I wasn’t able to locate an official source confirming that Mariam Debre Sina (June 28) or Debre Bizen Abune Libanos (August 11) were first observed in 2011. Please verify the start year against an authoritative Eritrean government or church publication and include the URL in a short inline comment.
• File: holidays/countries/eritrea.py
Lines 89–96
75-75
: No changes needed — Good Friday uses the Julian (Orthodox) calendar
Confirmed that_add_good_friday
calls__get_easter_sunday(calendar)
, which defaults to the instance’sJULIAN_CALENDAR
whencalendar=None
.
…ng with verified sources and improved structure.
Signed-off-by: Prateekshit Jaiswal <67361301+Prateekshit73@users.noreply.github.com>
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.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
README.md
(2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.
📚 Learning: 2025-07-12T20:54:28.749Z
Learnt from: KJhellico
PR: vacanza/holidays#2719
File: README.md:108-108
Timestamp: 2025-07-12T20:54:28.749Z
Learning: In PR #2719 adding Faroe Islands, KJhellico confirmed that the country count in README.md should be updated from 213 to 214, making 214 the accurate total after this addition.
Applied to files:
README.md
📚 Learning: 2025-06-06T16:02:09.910Z
Learnt from: KJhellico
PR: vacanza/holidays#2606
File: README.md:562-568
Timestamp: 2025-06-06T16:02:09.910Z
Learning: The README.md country table displays ISO 3166-1 alpha-2 codes only in the "Code" column. Alpha-3 codes or country aliases should not be included in this table format, maintaining consistency with all other country entries.
Applied to files:
README.md
⏰ 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). (3)
- GitHub Check: Test build on windows-latest
- GitHub Check: Test build on ubuntu-latest
- GitHub Check: Test build on macos-latest
🔇 Additional comments (2)
README.md (2)
598-604
: Eritrea row placement and ISO code look good.Alphabetical order is correct (Eritrea between Equatorial Guinea and Estonia). Code column uses the ISO alpha-2 “ER” only, which matches our README convention.
108-108
: Country codes count is accurateThe declared count (233) matches the computed count from the “Available Countries” table. No update needed in README.md.
…rder test methods to match holiday sequence.
Add missing tests for Good Friday and International Workers' Day; reorder test methods to match holiday sequence.
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.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
README.md
(2 hunks)holidays/countries/eritrea.py
(1 hunks)tests/countries/test_eritrea.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (86)
📓 Common learnings
Learnt from: PPsyrius
PR: vacanza/holidays#2783
File: README.md:598-603
Timestamp: 2025-08-14T03:36:55.156Z
Learning: The Eritrea holidays module in holidays/countries/eritrea.py does not have localization (l10n) support - it doesn't define default_language or supported_languages attributes, so the README.md table should show empty cells for the language columns.
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.
📚 Learning: 2025-08-08T14:37:03.045Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.
Applied to files:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-05-06T21:07:11.577Z
Learnt from: KJhellico
PR: vacanza/holidays#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_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-04-05T04:47:27.213Z
Learnt from: PPsyrius
PR: vacanza/holidays#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_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-08-14T03:36:55.156Z
Learnt from: PPsyrius
PR: vacanza/holidays#2783
File: README.md:598-603
Timestamp: 2025-08-14T03:36:55.156Z
Learning: The Eritrea holidays module in holidays/countries/eritrea.py does not have localization (l10n) support - it doesn't define default_language or supported_languages attributes, so the README.md table should show empty cells for the language columns.
Applied to files:
tests/countries/test_eritrea.py
README.md
holidays/countries/eritrea.py
📚 Learning: 2025-04-04T10:52:41.546Z
Learnt from: KJhellico
PR: vacanza/holidays#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).
Applied to files:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-06-16T15:48:48.680Z
Learnt from: PPsyrius
PR: vacanza/holidays#2615
File: tests/countries/test_anguilla.py:1-12
Timestamp: 2025-06-16T15:48:48.680Z
Learning: Test files in the holidays repository follow a standardized structure without module or class docstrings. All country test files use the same pattern: license header, imports, and class definition (`class Test{Country}(CommonCountryTests, TestCase):`) without docstrings. This is an established codebase convention that should be maintained for consistency.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-04-04T10:52:41.546Z
Learnt from: KJhellico
PR: vacanza/holidays#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:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-04-05T04:50:40.752Z
Learnt from: PPsyrius
PR: vacanza/holidays#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_eritrea.py
📚 Learning: 2025-04-05T04:33:53.254Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:33:53.254Z
Learning: For Turkmenistan holiday tests, recommend using CommonCountryTests as the base class rather than unittest.TestCase to follow project conventions, be consistent with other country test files, and gain access to common test utilities.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-20T19:46:15.595Z
Learnt from: KJhellico
PR: vacanza/holidays#2833
File: tests/countries/test_uganda.py:15-0
Timestamp: 2025-08-20T19:46:15.595Z
Learning: In the holidays project, the standard import pattern for country test files is `from holidays.countries.<country> import Country, CODE1, CODE2` (direct module import), used by ~75% of country test files. Only a minority (~25%) use the aggregated public API import `from holidays.countries import Country, CODE1, CODE2`. The direct module import pattern should be used for new country test files to follow the established convention.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-07-10T15:55:34.523Z
Learnt from: KJhellico
PR: vacanza/holidays#2706
File: holidays/countries/cayman_islands.py:50-55
Timestamp: 2025-07-10T15:55:34.523Z
Learning: The `islamic_show_estimated` parameter in country class constructors is only needed for countries that implement Islamic holidays (inherit from IslamicHolidays or _CustomIslamicHolidays groups). Countries with only Christian and secular holidays do not need this parameter.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-06-13T12:18:03.539Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-07-24T15:21:31.632Z
Learnt from: PPsyrius
PR: vacanza/holidays#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_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-06-25T10:12:30.448Z
Learnt from: PPsyrius
PR: vacanza/holidays#2676
File: holidays/countries/tunisia.py:25-25
Timestamp: 2025-06-25T10:12:30.448Z
Learning: The holidays library intentionally duplicates label strings like `estimated_label` across country modules rather than centralizing them. This duplication is the established library-wide approach and should not be suggested for refactoring.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-11T10:14:28.517Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-04-02T18:38:35.164Z
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.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-06-10T05:08:07.939Z
Learnt from: PPsyrius
PR: vacanza/holidays#2608
File: holidays/locale/en_US/LC_MESSAGES/VC.po:76-76
Timestamp: 2025-06-10T05:08:07.939Z
Learning: For the holidays project, localization file formatting issues (like missing terminal periods in .po files) should be automatically fixed by running `make l10n` command (which is included in `make check`). Authors should be directed to use this automated tooling instead of manual formatting fixes.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-11T10:14:14.399Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/groups/christian.py:344-357
Timestamp: 2025-08-11T10:14:14.399Z
Learning: For Ethiopian Orthodox Tewahedo Church references in code documentation, use "holiday" rather than "holy day" as this is the source-accurate terminology for Ethiopia.
Applied to files:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-08-21T04:56:03.711Z
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.711Z
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:
tests/countries/test_eritrea.py
README.md
holidays/countries/eritrea.py
📚 Learning: 2025-08-21T04:56:03.711Z
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.711Z
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:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-04-05T06:49:06.217Z
Learnt from: PPsyrius
PR: vacanza/holidays#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_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-04-23T09:59:19.886Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-07-09T21:16:35.145Z
Learnt from: KJhellico
PR: vacanza/holidays#2623
File: tests/countries/test_christmas_island.py:136-146
Timestamp: 2025-07-09T21:16:35.145Z
Learning: In Christmas Island's holiday implementation, the test_christmas_day method cannot use assertNoNonObservedHoliday because in some years observed Christmas Day overlaps with Boxing Day when both holidays are moved due to weekend conflicts, causing the standard non-observed holiday check to fail inappropriately.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-12T17:16:54.497Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: tests/calendars/test_julian.py:35-36
Timestamp: 2025-08-12T17:16:54.497Z
Learning: In the vacanza/holidays project calendar tests (Thai, Ethiopian, Julian, etc.), the established testing pattern for validation methods is to use simple for loops like `for year in known_data_dict:` followed by `self.assertEqual(expected, actual)` without using unittest's subTest feature. This pattern is consistently maintained across all calendar test files.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-12T18:40:16.160Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/countries/ethiopia.py:63-63
Timestamp: 2025-08-12T18:40:16.160Z
Learning: Ethiopian Epiphany (Timkat) date calculation correctly uses `is_ethiopian_leap_year(self._year - 1)` in the `_add_epiphany_day` helper in `holidays/groups/christian.py`. Since Epiphany occurs in January and belongs to the Ethiopian year that started in the previous Gregorian year, it checks Ethiopian leap year rules for `self._year - 1`. This is the proper approach, not using Gregorian leap year rules.
Applied to files:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-08-18T13:06:16.919Z
Learnt from: KJhellico
PR: vacanza/holidays#2783
File: tests/countries/test_eritrea.py:130-147
Timestamp: 2025-08-18T13:06:16.919Z
Learning: The `assertLocalizedHolidays` method in the vacanza/holidays project requires a complete list of all holidays from all categories (PUBLIC, GOVERNMENT, etc.), not just the holidays from the default category. This is a framework requirement for comprehensive localization testing.
Applied to files:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-07-02T10:22:33.053Z
Learnt from: KJhellico
PR: vacanza/holidays#2651
File: tests/countries/test_bonaire_sint_eustatius_and_saba.py:225-306
Timestamp: 2025-07-02T10:22:33.053Z
Learning: The `assertLocalizedHolidays` method in the vacanza/holidays project requires a complete list of all holidays from all subdivisions, not just subdivision-specific holidays. This is a framework requirement for proper localization testing.
Applied to files:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-08-09T18:31:23.218Z
Learnt from: KJhellico
PR: vacanza/holidays#2778
File: tests/countries/test_kiribati.py:15-15
Timestamp: 2025-08-09T18:31:23.218Z
Learning: In the holidays project test files, the standard import pattern is `from holidays.countries.<country> import Country, CODE1, CODE2` (used in ~97% of test files), not `from holidays.countries import Country, CODE1, CODE2`. Only a few exceptions (Suriname, Sierra Leone, Mauritius, Mali, Ivory Coast, Guyana) use the aggregated import pattern.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-08T14:37:03.045Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: In holidays/countries/__init__.py, re-export country classes using absolute imports (e.g., 'from holidays.countries.liberia import Liberia, LR, LBR') and keep alphabetical ordering (e.g., Lesotho, Liberia, Libya). Avoid relative imports in this file.
Applied to files:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-04-05T04:29:38.042Z
Learnt from: PPsyrius
PR: vacanza/holidays#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_eritrea.py
📚 Learning: 2025-07-17T11:07:04.986Z
Learnt from: KJhellico
PR: vacanza/holidays#2720
File: README.md:108-110
Timestamp: 2025-07-17T11:07:04.986Z
Learning: Always verify country counts in the holidays library by checking the current count in the COUNTRIES dictionary in holidays/registry.py directly, rather than relying on information from previous PRs, as the count changes frequently with new country additions.
Applied to files:
tests/countries/test_eritrea.py
README.md
holidays/countries/eritrea.py
📚 Learning: 2025-05-12T15:31:58.079Z
Learnt from: KJhellico
PR: vacanza/holidays#2532
File: tests/countries/test_cocos_islands.py:78-89
Timestamp: 2025-05-12T15:31:58.079Z
Learning: In the holidays project, tests for movable holidays (like Easter Monday) should always use static date sets only, not calculation functions.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-04-23T14:55:35.504Z
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:22-26
Timestamp: 2025-04-23T14:55:35.504Z
Learning: References in holidays classes should only be included if they're used for test case cross-checks or provide historical context about when holidays were added/removed, not just for the sake of having more references.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-05-09T18:36:09.607Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-07-02T18:21:59.302Z
Learnt from: KJhellico
PR: vacanza/holidays#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.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-06-14T20:43:15.370Z
Learnt from: KJhellico
PR: vacanza/holidays#2631
File: holidays/countries/sint_maarten.py:94-95
Timestamp: 2025-06-14T20:43:15.370Z
Learning: The `_add_*` helper methods in the holidays library (such as `_add_christmas_day_two()`, `_add_labor_day()`, etc.) don't have default holiday names, so the name parameter should always be explicitly specified when calling these methods.
Applied to files:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-06-04T10:09:28.732Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2593
File: holidays/calendars/islamic.py:3993-3994
Timestamp: 2025-06-04T10:09:28.732Z
Learning: In the holidays/calendars/islamic.py file, the Islamic calendar date methods in the _IslamicLunar class (like ali_al_rida_death_dates, ashura_dates, etc.) follow a consistent pattern of being single-line methods that return self._get_holiday(CONSTANT, year) without docstrings. New methods should follow this same pattern for consistency.
Applied to files:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-08-19T21:00:47.849Z
Learnt from: KJhellico
PR: vacanza/holidays#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:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-03-19T16:54:58.657Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-04-13T19:10:31.502Z
Learnt from: KJhellico
PR: vacanza/holidays#2465
File: holidays/countries/suriname.py:219-251
Timestamp: 2025-04-13T19:10:31.502Z
Learning: The `_CustomIslamicHolidays` classes in this project contain only exact verified holiday dates from reliable sources, rather than calculated or estimated future dates. This is by design to ensure accuracy, particularly for religious holidays that may follow lunar calendars or depend on local observations.
Applied to files:
tests/countries/test_eritrea.py
holidays/countries/eritrea.py
📚 Learning: 2025-06-25T10:36:39.909Z
Learnt from: PPsyrius
PR: vacanza/holidays#2678
File: tests/countries/test_united_states_virgin_islands.py:59-84
Timestamp: 2025-06-25T10:36:39.909Z
Learning: In the holidays library, test methods typically do not have docstrings. Only special test methods that need specific explanation (like edge cases or unique behaviors) have docstrings. Regular test methods like test_l10n_default, test_l10n_th, test_government_holidays, etc. should not have docstrings added.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-06-25T10:36:39.103Z
Learnt from: PPsyrius
PR: vacanza/holidays#2678
File: tests/countries/test_puerto_rico.py:84-108
Timestamp: 2025-06-25T10:36:39.103Z
Learning: In the holidays library, test methods (including localization test methods like test_l10n_th, test_l10n_default) follow a standard library-wide approach of not including docstrings. This is the established convention across the codebase.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-06-25T10:39:18.504Z
Learnt from: PPsyrius
PR: vacanza/holidays#2678
File: tests/countries/test_american_samoa.py:83-107
Timestamp: 2025-06-25T10:39:18.504Z
Learning: In the holidays library, test methods (especially localization test methods like test_l10n_th, test_l10n_default) do not require docstrings as this is the standard library-wide approach.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-07-12T20:54:28.749Z
Learnt from: KJhellico
PR: vacanza/holidays#2719
File: README.md:108-108
Timestamp: 2025-07-12T20:54:28.749Z
Learning: In PR #2719 adding Faroe Islands, KJhellico confirmed that the country count in README.md should be updated from 213 to 214, making 214 the accurate total after this addition.
Applied to files:
README.md
📚 Learning: 2025-07-26T13:30:58.728Z
Learnt from: KJhellico
PR: vacanza/holidays#2757
File: README.md:1592-1597
Timestamp: 2025-07-26T13:30:58.728Z
Learning: In the holidays project README.md, supported languages in the country table are always arranged in alphabetical order, with the default language marked in bold but maintaining its alphabetical position rather than being moved to a special position.
Applied to files:
README.md
📚 Learning: 2025-03-26T08:55:08.917Z
Learnt from: PPsyrius
PR: vacanza/holidays#2362
File: holidays/ical.py:53-80
Timestamp: 2025-03-26T08:55:08.917Z
Learning: The holidays library intentionally limits language code support to ISO 639-1 and ISO 639-2 standards (2-3 letter language codes with optional region) to maintain consistency with other modules like `common_holidays` and `financial_holidays`, rather than implementing full RFC 5646 compliance.
Applied to files:
README.md
holidays/countries/eritrea.py
📚 Learning: 2025-07-10T11:00:13.195Z
Learnt from: KJhellico
PR: vacanza/holidays#2623
File: README.md:0-0
Timestamp: 2025-07-10T11:00:13.195Z
Learning: The COUNTRIES dictionary in holidays/registry.py contains 211 entries as confirmed by KJhellico in PR #2623, not 214 as previously calculated.
Applied to files:
README.md
📚 Learning: 2025-08-08T10:33:55.695Z
Learnt from: KJhellico
PR: vacanza/holidays#2763
File: README.md:108-110
Timestamp: 2025-08-08T10:33:55.695Z
Learning: When verifying the country total in holidays/registry.py, isolate between '^COUNTRIES:' and '^FINANCIAL:' and count only lines matching the strict key pattern '^\s*"[a-z0-9_ ]+":\s*\(' to avoid overcounting non-entry quoted lines. As of PR vacanza/holidays#2763, this yields 227 entries.
Applied to files:
README.md
📚 Learning: 2025-06-14T20:13:29.536Z
Learnt from: KJhellico
PR: vacanza/holidays#2614
File: README.md:108-108
Timestamp: 2025-06-14T20:13:29.536Z
Learning: In the vacanza/holidays repository, the team prefers to manually update the country count in README.md when adding new countries, with tests in place to verify the count stays accurate. They are satisfied with this approach and do not want it automated.
Applied to files:
README.md
📚 Learning: 2025-07-14T19:32:44.256Z
Learnt from: PPsyrius
PR: vacanza/holidays#2716
File: holidays/registry.py:164-164
Timestamp: 2025-07-14T19:32:44.256Z
Learning: The COUNTRIES dictionary in holidays/registry.py contains exactly 215 entries as of PR #2716, with FINANCIAL dictionary entries (4 total) being tracked separately and not included in the country count for README.md.
Applied to files:
README.md
📚 Learning: 2025-08-03T12:59:53.286Z
Learnt from: KJhellico
PR: vacanza/holidays#2635
File: README.md:108-110
Timestamp: 2025-08-03T12:59:53.286Z
Learning: Always verify country counts in the COUNTRIES dictionary by checking the current count in the COUNTRIES dictionary in holidays/registry.py directly, rather than relying on information from previous PRs, as the count changes frequently with new country additions.
Applied to files:
README.md
📚 Learning: 2025-07-15T15:00:32.728Z
Learnt from: KJhellico
PR: vacanza/holidays#2687
File: README.md:108-108
Timestamp: 2025-07-15T15:00:32.728Z
Learning: When verifying country counts in the holidays library, always check the current count in the COUNTRIES dictionary in holidays/registry.py rather than relying on previously recorded counts, as new countries may have been added in merged PRs.
Applied to files:
README.md
📚 Learning: 2025-07-15T15:00:32.728Z
Learnt from: KJhellico
PR: vacanza/holidays#2687
File: README.md:108-108
Timestamp: 2025-07-15T15:00:32.728Z
Learning: Always verify the current count in the COUNTRIES dictionary by checking the actual file rather than relying on previously recorded counts, as the count changes with each merged PR that adds new countries.
Applied to files:
README.md
📚 Learning: 2025-08-02T21:34:24.440Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: holidays/registry.py:136-136
Timestamp: 2025-08-02T21:34:24.440Z
Learning: When counting entries in the COUNTRIES dictionary in holidays/registry.py, use sed to isolate only the COUNTRIES section (between "^COUNTRIES:" and "^FINANCIAL:" lines) to avoid counting FINANCIAL dictionary entries, which would give an inflated total.
Applied to files:
README.md
📚 Learning: 2025-06-06T16:02:09.910Z
Learnt from: KJhellico
PR: vacanza/holidays#2606
File: README.md:562-568
Timestamp: 2025-06-06T16:02:09.910Z
Learning: The README.md country table displays ISO 3166-1 alpha-2 codes only in the "Code" column. Alpha-3 codes or country aliases should not be included in this table format, maintaining consistency with all other country entries.
Applied to files:
README.md
📚 Learning: 2025-08-21T04:51:55.283Z
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:24-28
Timestamp: 2025-08-21T04:51:55.283Z
Learning: In the holidays library, timeanddate.com can be included as a reference specifically for historical Islamic holiday observance date verification, even when official government sources are available, as long as the official sources are listed first in the references.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-04-13T20:41:56.613Z
Learnt from: KJhellico
PR: vacanza/holidays#2386
File: holidays/countries/nepal.py:266-284
Timestamp: 2025-04-13T20:41:56.613Z
Learning: The Islamic holiday dates in the holidays library should only include officially verified dates, not predicted ones, to maintain accuracy. This is especially important for holidays that depend on lunar observations like Eid al-Fitr and Eid al-Adha.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-05-06T13:01:22.693Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2522
File: holidays/countries/yemen.py:158-163
Timestamp: 2025-05-06T13:01:22.693Z
Learning: In the holidays library, the RAMADAN_BEGINNING_DATES dictionary in country-specific Islamic holiday classes (like YemenIslamicHolidays) is used indirectly through the backend. When a country class calls _add_holiday_29_ramadan(), the IslamicHolidays implementation uses the country's custom calendar dates to calculate the 29th day of Ramadan by adding 28 days to the beginning date.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-03-29T15:15:05.919Z
Learnt from: KJhellico
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:171-183
Timestamp: 2025-03-29T15:15:05.919Z
Learning: In the Fiji holidays implementation, the maintainers are aware of the need to extend the MAWLID_DATES dictionary beyond 2025 when future official references become available, and will do so when appropriate. No suggestions about extending this dictionary should be made in future reviews.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-07-10T03:36:16.461Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
holidays/countries/eritrea.py
📚 Learning: 2025-07-10T03:36:16.461Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
holidays/countries/eritrea.py
📚 Learning: 2025-04-23T09:53:20.043Z
Learnt from: PPsyrius
PR: vacanza/holidays#2490
File: holidays/locale/en_ET/LC_MESSAGES/ET.po:99-101
Timestamp: 2025-04-23T09:53:20.043Z
Learning: For Ethiopian holidays in the en_ET locale, translations must maintain the exact official wording from government sources such as Negarit Gazeta Proclamations, even when they contain redundancies like the word "Day" appearing twice (e.g., "Ethiopian National Unity Day (Ethiopian Nations and Nationalities) Day").
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-04-03T05:58:00.033Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
holidays/countries/eritrea.py
📚 Learning: 2025-04-23T09:51:03.951Z
Learnt from: PPsyrius
PR: vacanza/holidays#2490
File: holidays/locale/en_ET/LC_MESSAGES/ET.po:95-101
Timestamp: 2025-04-23T09:51:03.951Z
Learning: Ethiopian holiday translations should follow the exact wording from official government sources (such as Negarit Gazeta Proclamations), even when they contain seemingly redundant wording like "Day" appearing twice.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-06-14T10:58:16.431Z
Learnt from: PPsyrius
PR: vacanza/holidays#2629
File: holidays/locale/en_US/LC_MESSAGES/NA.po:17-28
Timestamp: 2025-06-14T10:58:16.431Z
Learning: In the holidays library localization system, different variants of the same language (like en_NA and en_US) can serve as source and target languages, with X-Source-Language correctly indicating the regional variant that serves as the original text.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-06-14T11:00:25.835Z
Learnt from: KJhellico
PR: vacanza/holidays#2629
File: holidays/locale/en_US/LC_MESSAGES/NA.po:17-28
Timestamp: 2025-06-14T11:00:25.835Z
Learning: In the holidays library localization files, the X-Source-Language field should contain the value that matches the country's default language setting (e.g., if a country class has default_language = "en_NA", then X-Source-Language should be "en_NA").
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-03-30T18:25:07.087Z
Learnt from: KJhellico
PR: vacanza/holidays#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/countries/eritrea.py
📚 Learning: 2025-08-12T17:39:49.804Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/groups/international.py:0-0
Timestamp: 2025-08-12T17:39:49.804Z
Learning: Ethiopian New Year (Enkutatash) calculation uses `is_ethiopian_leap_year(self._year)` instead of `isleap(self._year + 1)` to properly handle century edge cases. Ethiopian leap years follow Julian rules (every 4 years without exception) while Gregorian leap years have century exceptions, causing different results around years like 2100.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-08-12T17:39:49.804Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/groups/international.py:0-0
Timestamp: 2025-08-12T17:39:49.804Z
Learning: Ethiopian New Year (Enkutatash) calculation correctly uses `is_ethiopian_leap_year(self._year)` instead of `isleap(self._year + 1)` to properly handle century edge cases. The Ethiopian function `(year + 1) % 4 == 0` checks if the next year is divisible by 4 using Julian/Ethiopian rules (no century exceptions), while `isleap()` applies Gregorian century rules. This difference is crucial around years like 2100 where the two calendar systems diverge.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-07-08T10:20:04.069Z
Learnt from: KJhellico
PR: vacanza/holidays#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/countries/eritrea.py
📚 Learning: 2025-06-29T10:36:06.138Z
Learnt from: KJhellico
PR: vacanza/holidays#2671
File: holidays/countries/libya.py:51-108
Timestamp: 2025-06-29T10:36:06.138Z
Learning: There is no project-wide convention in the holidays library to organize holidays by calendar type (Islamic holidays first, then Gregorian holidays). Countries organize holidays in various ways - often chronologically, by importance, or by logical grouping - and Islamic holidays are frequently placed at the end of the _populate_public_holidays method rather than at the beginning.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-06-06T14:40:31.932Z
Learnt from: KJhellico
PR: vacanza/holidays#2593
File: holidays/countries/senegal.py:66-110
Timestamp: 2025-06-06T14:40:31.932Z
Learning: In the holidays library, within the _populate_public_holidays method, holidays should be arranged by calendar type (Islamic holidays first, then Gregorian holidays) without additional type grouping comments. The organization by calendar type is sufficient and follows the project's established conventions.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-03-30T08:08:30.415Z
Learnt from: PPsyrius
PR: vacanza/holidays#2388
File: holidays/countries/ivory_coast.py:84-85
Timestamp: 2025-03-30T08:08:30.415Z
Learning: Islamic holiday logic should be implemented in the holidays/groups/islamic.py file, with country-specific files only calling these methods with the appropriate translated names.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-05-10T04:02:13.815Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/countries/eritrea.py
📚 Learning: 2025-06-07T11:19:38.945Z
Learnt from: KJhellico
PR: vacanza/holidays#2608
File: holidays/countries/saint_vincent_and_the_grenadines.py:39-44
Timestamp: 2025-06-07T11:19:38.945Z
Learning: In the holidays library, it's standard practice to explicitly call ChristianHolidays.__init__(self) and InternationalHolidays.__init__(self) in country class __init__ methods, even when these mixins don't define their own __init__ methods. This follows the established codebase convention across all country implementations.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-06-07T11:19:38.945Z
Learnt from: KJhellico
PR: vacanza/holidays#2608
File: holidays/countries/saint_vincent_and_the_grenadines.py:39-44
Timestamp: 2025-06-07T11:19:38.945Z
Learning: In the holidays library, it's standard practice to explicitly call ChristianHolidays.__init__(self) and InternationalHolidays.__init__(self) in country class __init__ methods, even when these mixins don't define their own __init__ methods. This follows the established codebase convention across all country implementations (confirmed in Zimbabwe, Zambia, and other countries).
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-08-19T21:22:13.125Z
Learnt from: KJhellico
PR: vacanza/holidays#2831
File: holidays/countries/south_sudan.py:84-88
Timestamp: 2025-08-19T21:22:13.125Z
Learning: In the holidays library, message comments directly above holiday addition methods must match the holiday name exactly without any additions, modifications, or explanatory text. For example, if the holiday name is "Eid al-Fitr Holiday", the comment should be "# Eid al-Fitr Holiday." with no extra context.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-08-03T13:48:11.910Z
Learnt from: KJhellico
PR: vacanza/holidays#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:
holidays/countries/eritrea.py
📚 Learning: 2025-03-13T15:17:45.519Z
Learnt from: PPsyrius
PR: vacanza/holidays#2349
File: tests/countries/test_taiwan.py:0-0
Timestamp: 2025-03-13T15:17:45.519Z
Learning: For Taiwan's holiday system, different categories (GOVERNMENT, OPTIONAL, SCHOOL, WORKDAY) have distinct uses and contexts, justifying separate instances rather than parameterization in tests.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-03-04T11:41:56.389Z
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:284-366
Timestamp: 2025-03-04T11:41:56.389Z
Learning: For Macau holidays implementation, maintaining separate methods for each holiday category (PUBLIC, MANDATORY, GOVERNMENT) is preferred because these categories are based on different sets of laws and have distinct historical evolution.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-03-05T02:35:03.298Z
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:278-377
Timestamp: 2025-03-05T02:35:03.298Z
Learning: For Macau holiday implementations, it's preferable to maintain separate methods for different holiday categories (MANDATORY, GOVERNMENT, PUBLIC) as they are based on different sets of laws, making the code easier to maintain despite having multiple year-based conditionals.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-06-16T12:28:31.641Z
Learnt from: PPsyrius
PR: vacanza/holidays#2632
File: holidays/countries/solomon_islands.py:95-98
Timestamp: 2025-06-16T12:28:31.641Z
Learning: Library-wide holiday patterns and their optimizations should be handled at the base class level (like InternationalHolidays) rather than documenting workarounds in individual country modules. This maintains separation of concerns and avoids documentation duplication.
Applied to files:
holidays/countries/eritrea.py
📚 Learning: 2025-05-10T04:32:15.760Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/eritrea.py
📚 Learning: 2025-07-02T18:17:53.342Z
Learnt from: KJhellico
PR: vacanza/holidays#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/eritrea.py
📚 Learning: 2025-05-13T13:23:11.375Z
Learnt from: KJhellico
PR: vacanza/holidays#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/eritrea.py
🧬 Code graph analysis (2)
tests/countries/test_eritrea.py (2)
tests/common.py (7)
TestCase
(28-338)CommonCountryTests
(356-374)assertAliases
(121-130)assertNoHolidays
(292-294)assertHolidayName
(195-199)assertNoHolidayName
(273-275)assertHolidays
(228-230)holidays/countries/eritrea.py (3)
Eritrea
(19-96)ER
(99-100)ERI
(103-104)
holidays/countries/eritrea.py (4)
holidays/groups/christian.py (6)
ChristianHolidays
(23-499)_add_christmas_day
(224-232)_add_epiphany_day
(306-328)_add_good_friday
(344-353)_add_easter_sunday
(286-295)_add_finding_of_true_cross
(330-342)holidays/groups/international.py (5)
InternationalHolidays
(20-236)_add_new_years_day
(142-150)_add_womens_day
(203-213)_add_labor_day
(115-124)_add_ethiopian_new_year
(90-102)holidays/groups/islamic.py (4)
IslamicHolidays
(20-443)_add_mawlid_day
(329-339)_add_eid_al_fitr_day
(152-163)_add_eid_al_adha_day
(109-120)holidays/holiday_base.py (1)
HolidayBase
(57-1296)
🪛 LanguageTool
README.md
[grammar] ~108-~108: There might be a mistake here.
Context: ... refer to a country is by using its [ISO 3166-1 alpha-2 code](https://en.wikipedi...
(QB_NEW_EN)
⏰ 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). (1)
- GitHub Check: Test build on windows-latest
🔇 Additional comments (11)
README.md (1)
598-604
: LGTM: Eritrea row formatting and placement are correct.
- Languages cell left empty matches the current module (no l10n attributes).
- Supported Categories shows GOVERNMENT only (PUBLIC is implicit per the table preface).
- Alphabetical placement (Eritrea before Estonia) looks right.
holidays/countries/eritrea.py (5)
36-47
: Constructor wiring is solid (Ethiopian calendar + Islamic estimated toggle).
- ChristianHolidays initialized with ETHIOPIAN_CALENDAR.
- IslamicHolidays respects islamic_show_estimated.
- Base ctor called last. All consistent with project patterns.
29-35
: Good: start_year and categories.
- start_year=1994 aligns with the project’s post-independence coverage.
- supported_categories includes GOVERNMENT and PUBLIC; default PUBLIC remains implicit.
48-93
: Holiday set, naming, and order look consistent.
- English names used throughout as agreed in review thread.
- Ethiopian/Orthodox items use the ChristianHolidays helpers backed by the Ethiopian calendar.
- Islamic holidays placed after Gregorian/Ethiopian ones; labels rely on estimated_label as intended.
94-97
: Correct category split for Fenkil Day (GOVERNMENT).Moving Fenkil Day into _populate_government_holidays with GOVERNMENT enabled matches the latest guidance and avoids surfacing it in PUBLIC by default.
99-105
: Aliases exported cleanly.ER and ERI subclassing maintains the standard alias pattern.
tests/countries/test_eritrea.py (5)
20-27
: Test scaffolding looks good and follows conventions.
- Direct module import for the country and aliases.
- Instances for GOVERNMENT and islamic_show_estimated=False created once in setUpClass.
52-64
: Coverage and date sets look solid.Good Friday, Orthodox Easter, and other fixed/movable dates include spot checks and a full-range presence assertion. Order mirrors the implementation.
Also applies to: 78-91, 92-105
121-147
: Islamic holiday tests validate the estimated-toggle path correctly.Specific dates plus the full-year-range assertion against no_estimated_holidays ensure the suffix is suppressed when desired.
149-155
: Government category behavior verified cleanly.Fenkil Day is absent in PUBLIC and present when GOVERNMENT is selected, plus a year-specific check for 2020.
Also applies to: 175-180
31-36
: Nice: start_year guard.Asserting no holidays for 1993 across both categories prevents accidental backfills.
Nit: use the default instance for non-Islamic checks.
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.
Last fixes.
Fix test case for government holidays in 2020.
|
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.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
tests/countries/test_eritrea.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (44)
📓 Common learnings
Learnt from: PPsyrius
PR: vacanza/holidays#2783
File: README.md:598-603
Timestamp: 2025-08-14T03:36:55.156Z
Learning: The Eritrea holidays module in holidays/countries/eritrea.py does not have localization (l10n) support - it doesn't define default_language or supported_languages attributes, so the README.md table should show empty cells for the language columns.
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.
📚 Learning: 2025-08-08T14:37:03.045Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-04-05T04:47:27.213Z
Learnt from: PPsyrius
PR: vacanza/holidays#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_eritrea.py
📚 Learning: 2025-04-05T04:50:40.752Z
Learnt from: PPsyrius
PR: vacanza/holidays#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_eritrea.py
📚 Learning: 2025-05-06T21:07:11.577Z
Learnt from: KJhellico
PR: vacanza/holidays#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_eritrea.py
📚 Learning: 2025-06-16T15:48:48.680Z
Learnt from: PPsyrius
PR: vacanza/holidays#2615
File: tests/countries/test_anguilla.py:1-12
Timestamp: 2025-06-16T15:48:48.680Z
Learning: Test files in the holidays repository follow a standardized structure without module or class docstrings. All country test files use the same pattern: license header, imports, and class definition (`class Test{Country}(CommonCountryTests, TestCase):`) without docstrings. This is an established codebase convention that should be maintained for consistency.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-04-05T04:29:38.042Z
Learnt from: PPsyrius
PR: vacanza/holidays#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_eritrea.py
📚 Learning: 2025-04-05T06:49:06.217Z
Learnt from: PPsyrius
PR: vacanza/holidays#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_eritrea.py
📚 Learning: 2025-04-04T10:52:41.546Z
Learnt from: KJhellico
PR: vacanza/holidays#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).
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-04-05T04:33:53.254Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:33:53.254Z
Learning: For Turkmenistan holiday tests, recommend using CommonCountryTests as the base class rather than unittest.TestCase to follow project conventions, be consistent with other country test files, and gain access to common test utilities.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-08T14:37:03.045Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: In holidays/countries/__init__.py, re-export country classes using absolute imports (e.g., 'from holidays.countries.liberia import Liberia, LR, LBR') and keep alphabetical ordering (e.g., Lesotho, Liberia, Libya). Avoid relative imports in this file.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-07-10T15:55:34.523Z
Learnt from: KJhellico
PR: vacanza/holidays#2706
File: holidays/countries/cayman_islands.py:50-55
Timestamp: 2025-07-10T15:55:34.523Z
Learning: The `islamic_show_estimated` parameter in country class constructors is only needed for countries that implement Islamic holidays (inherit from IslamicHolidays or _CustomIslamicHolidays groups). Countries with only Christian and secular holidays do not need this parameter.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-06-13T12:18:03.539Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
tests/countries/test_eritrea.py
📚 Learning: 2025-04-04T10:52:41.546Z
Learnt from: KJhellico
PR: vacanza/holidays#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:
tests/countries/test_eritrea.py
📚 Learning: 2025-07-24T15:21:31.632Z
Learnt from: PPsyrius
PR: vacanza/holidays#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_eritrea.py
📚 Learning: 2025-06-25T10:12:30.448Z
Learnt from: PPsyrius
PR: vacanza/holidays#2676
File: holidays/countries/tunisia.py:25-25
Timestamp: 2025-06-25T10:12:30.448Z
Learning: The holidays library intentionally duplicates label strings like `estimated_label` across country modules rather than centralizing them. This duplication is the established library-wide approach and should not be suggested for refactoring.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-11T10:14:28.517Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
tests/countries/test_eritrea.py
📚 Learning: 2025-04-02T18:38:35.164Z
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.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-06-10T05:08:07.939Z
Learnt from: PPsyrius
PR: vacanza/holidays#2608
File: holidays/locale/en_US/LC_MESSAGES/VC.po:76-76
Timestamp: 2025-06-10T05:08:07.939Z
Learning: For the holidays project, localization file formatting issues (like missing terminal periods in .po files) should be automatically fixed by running `make l10n` command (which is included in `make check`). Authors should be directed to use this automated tooling instead of manual formatting fixes.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-11T10:14:14.399Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/groups/christian.py:344-357
Timestamp: 2025-08-11T10:14:14.399Z
Learning: For Ethiopian Orthodox Tewahedo Church references in code documentation, use "holiday" rather than "holy day" as this is the source-accurate terminology for Ethiopia.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-21T04:56:03.711Z
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.711Z
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:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-21T04:56:03.711Z
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.711Z
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:
tests/countries/test_eritrea.py
📚 Learning: 2025-04-23T09:59:19.886Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
tests/countries/test_eritrea.py
📚 Learning: 2025-07-09T21:16:35.145Z
Learnt from: KJhellico
PR: vacanza/holidays#2623
File: tests/countries/test_christmas_island.py:136-146
Timestamp: 2025-07-09T21:16:35.145Z
Learning: In Christmas Island's holiday implementation, the test_christmas_day method cannot use assertNoNonObservedHoliday because in some years observed Christmas Day overlaps with Boxing Day when both holidays are moved due to weekend conflicts, causing the standard non-observed holiday check to fail inappropriately.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-12T17:16:54.497Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: tests/calendars/test_julian.py:35-36
Timestamp: 2025-08-12T17:16:54.497Z
Learning: In the vacanza/holidays project calendar tests (Thai, Ethiopian, Julian, etc.), the established testing pattern for validation methods is to use simple for loops like `for year in known_data_dict:` followed by `self.assertEqual(expected, actual)` without using unittest's subTest feature. This pattern is consistently maintained across all calendar test files.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-12T18:40:16.160Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/countries/ethiopia.py:63-63
Timestamp: 2025-08-12T18:40:16.160Z
Learning: Ethiopian Epiphany (Timkat) date calculation correctly uses `is_ethiopian_leap_year(self._year - 1)` in the `_add_epiphany_day` helper in `holidays/groups/christian.py`. Since Epiphany occurs in January and belongs to the Ethiopian year that started in the previous Gregorian year, it checks Ethiopian leap year rules for `self._year - 1`. This is the proper approach, not using Gregorian leap year rules.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-18T13:06:16.919Z
Learnt from: KJhellico
PR: vacanza/holidays#2783
File: tests/countries/test_eritrea.py:130-147
Timestamp: 2025-08-18T13:06:16.919Z
Learning: The `assertLocalizedHolidays` method in the vacanza/holidays project requires a complete list of all holidays from all categories (PUBLIC, GOVERNMENT, etc.), not just the holidays from the default category. This is a framework requirement for comprehensive localization testing.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-07-02T10:22:33.053Z
Learnt from: KJhellico
PR: vacanza/holidays#2651
File: tests/countries/test_bonaire_sint_eustatius_and_saba.py:225-306
Timestamp: 2025-07-02T10:22:33.053Z
Learning: The `assertLocalizedHolidays` method in the vacanza/holidays project requires a complete list of all holidays from all subdivisions, not just subdivision-specific holidays. This is a framework requirement for proper localization testing.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-09T18:31:23.218Z
Learnt from: KJhellico
PR: vacanza/holidays#2778
File: tests/countries/test_kiribati.py:15-15
Timestamp: 2025-08-09T18:31:23.218Z
Learning: In the holidays project test files, the standard import pattern is `from holidays.countries.<country> import Country, CODE1, CODE2` (used in ~97% of test files), not `from holidays.countries import Country, CODE1, CODE2`. Only a few exceptions (Suriname, Sierra Leone, Mauritius, Mali, Ivory Coast, Guyana) use the aggregated import pattern.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-07-17T11:07:04.986Z
Learnt from: KJhellico
PR: vacanza/holidays#2720
File: README.md:108-110
Timestamp: 2025-07-17T11:07:04.986Z
Learning: Always verify country counts in the holidays library by checking the current count in the COUNTRIES dictionary in holidays/registry.py directly, rather than relying on information from previous PRs, as the count changes frequently with new country additions.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-20T19:46:15.595Z
Learnt from: KJhellico
PR: vacanza/holidays#2833
File: tests/countries/test_uganda.py:15-0
Timestamp: 2025-08-20T19:46:15.595Z
Learning: In the holidays project, the standard import pattern for country test files is `from holidays.countries.<country> import Country, CODE1, CODE2` (direct module import), used by ~75% of country test files. Only a minority (~25%) use the aggregated public API import `from holidays.countries import Country, CODE1, CODE2`. The direct module import pattern should be used for new country test files to follow the established convention.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-14T03:36:55.156Z
Learnt from: PPsyrius
PR: vacanza/holidays#2783
File: README.md:598-603
Timestamp: 2025-08-14T03:36:55.156Z
Learning: The Eritrea holidays module in holidays/countries/eritrea.py does not have localization (l10n) support - it doesn't define default_language or supported_languages attributes, so the README.md table should show empty cells for the language columns.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-05-12T15:31:58.079Z
Learnt from: KJhellico
PR: vacanza/holidays#2532
File: tests/countries/test_cocos_islands.py:78-89
Timestamp: 2025-05-12T15:31:58.079Z
Learning: In the holidays project, tests for movable holidays (like Easter Monday) should always use static date sets only, not calculation functions.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-04-23T14:55:35.504Z
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:22-26
Timestamp: 2025-04-23T14:55:35.504Z
Learning: References in holidays classes should only be included if they're used for test case cross-checks or provide historical context about when holidays were added/removed, not just for the sake of having more references.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-05-09T18:36:09.607Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
tests/countries/test_eritrea.py
📚 Learning: 2025-07-02T18:21:59.302Z
Learnt from: KJhellico
PR: vacanza/holidays#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.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-06-14T20:43:15.370Z
Learnt from: KJhellico
PR: vacanza/holidays#2631
File: holidays/countries/sint_maarten.py:94-95
Timestamp: 2025-06-14T20:43:15.370Z
Learning: The `_add_*` helper methods in the holidays library (such as `_add_christmas_day_two()`, `_add_labor_day()`, etc.) don't have default holiday names, so the name parameter should always be explicitly specified when calling these methods.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-06-04T10:09:28.732Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2593
File: holidays/calendars/islamic.py:3993-3994
Timestamp: 2025-06-04T10:09:28.732Z
Learning: In the holidays/calendars/islamic.py file, the Islamic calendar date methods in the _IslamicLunar class (like ali_al_rida_death_dates, ashura_dates, etc.) follow a consistent pattern of being single-line methods that return self._get_holiday(CONSTANT, year) without docstrings. New methods should follow this same pattern for consistency.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-08-19T21:00:47.849Z
Learnt from: KJhellico
PR: vacanza/holidays#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:
tests/countries/test_eritrea.py
📚 Learning: 2025-03-19T16:54:58.657Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
tests/countries/test_eritrea.py
📚 Learning: 2025-04-13T19:10:31.502Z
Learnt from: KJhellico
PR: vacanza/holidays#2465
File: holidays/countries/suriname.py:219-251
Timestamp: 2025-04-13T19:10:31.502Z
Learning: The `_CustomIslamicHolidays` classes in this project contain only exact verified holiday dates from reliable sources, rather than calculated or estimated future dates. This is by design to ensure accuracy, particularly for religious holidays that may follow lunar calendars or depend on local observations.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-06-25T10:36:39.909Z
Learnt from: PPsyrius
PR: vacanza/holidays#2678
File: tests/countries/test_united_states_virgin_islands.py:59-84
Timestamp: 2025-06-25T10:36:39.909Z
Learning: In the holidays library, test methods typically do not have docstrings. Only special test methods that need specific explanation (like edge cases or unique behaviors) have docstrings. Regular test methods like test_l10n_default, test_l10n_th, test_government_holidays, etc. should not have docstrings added.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-06-25T10:36:39.103Z
Learnt from: PPsyrius
PR: vacanza/holidays#2678
File: tests/countries/test_puerto_rico.py:84-108
Timestamp: 2025-06-25T10:36:39.103Z
Learning: In the holidays library, test methods (including localization test methods like test_l10n_th, test_l10n_default) follow a standard library-wide approach of not including docstrings. This is the established convention across the codebase.
Applied to files:
tests/countries/test_eritrea.py
📚 Learning: 2025-06-25T10:39:18.504Z
Learnt from: PPsyrius
PR: vacanza/holidays#2678
File: tests/countries/test_american_samoa.py:83-107
Timestamp: 2025-06-25T10:39:18.504Z
Learning: In the holidays library, test methods (especially localization test methods like test_l10n_th, test_l10n_default) do not require docstrings as this is the standard library-wide approach.
Applied to files:
tests/countries/test_eritrea.py
🧬 Code graph analysis (1)
tests/countries/test_eritrea.py (2)
tests/common.py (7)
TestCase
(28-338)CommonCountryTests
(356-374)assertAliases
(121-130)assertNoHolidays
(292-294)assertHolidayName
(195-199)assertNoHolidayName
(273-275)assertHolidays
(228-230)holidays/countries/eritrea.py (3)
Eritrea
(19-96)ER
(99-100)ERI
(103-104)
⏰ 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). (3)
- GitHub Check: Test build on macos-latest
- GitHub Check: Test build on windows-latest
- GitHub Check: Test build on ubuntu-latest
🔇 Additional comments (12)
tests/countries/test_eritrea.py (12)
13-17
: Imports and base classes match project conventions.Direct module import and using CommonCountryTests are aligned with the dominant pattern in this repo. Good adherence to learnings.
21-27
: Solid test fixtures: cover default, GOVERNMENT, and islamic_show_estimated=False.This neatly exercises category scoping and the Islamic “estimated” toggle without polluting individual tests.
31-33
: Good boundary check for start_year.Asserting no holidays in 1993 across all supported categories matches Eritrea.start_year=1994.
34-41
: Fixed-date checks look correct.New Year’s Day and Orthodox Christmas ranges are comprehensive and consistent.
42-47
: Epiphany (Timket) leap-year shift encoded correctly.Using Jan 19 except Gregorian years divisible by 4 maps to the Ethiopian leap handling for these ranges.
52-64
: Orthodox Good Friday coverage is correct and future-proofed.Known dates plus a full-range presence check is the right balance.
65-77
: Orthodox Easter coverage is correct.Known dates for 2020–2025 and a full-range check match the Ethiopian calendar settings.
78-91
: Secular fixed-date holidays covered well.International Workers’ Day, Independence Day, Martyrs’ Day, and Revolution Day assertions are straightforward and complete.
92-105
: Ethiopian New Year and Finding of the True Cross parity checks look right.The 3-modulo pattern is correct for these September shifts.
148-153
: Government-only holiday check is precise.Verifies absence in PUBLIC and presence in GOVERNMENT across the full span—clean.
155-172
: Year-specific snapshot test is well composed.
- Confirms combined-name behavior on 2020-05-24.
- Validates “estimated” suffixes under default settings.
All aligned with the country implementation.
13-17
: Exports, registry entry, and snapshot all present 🎉Everything checks out:
- holidays/countries/init.py re-exports Eritrea, ER, ERI on line 79
- holidays/registry.py lists
"eritrea": ("Eritrea", "ER", "ERI")
on line 88- snapshots/countries/ER_COMMON.json is in place
No further action needed 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.
LGTM.
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 🇪🇷
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.
Good progress @Prateekshit73 👍
Proposed change
Add Eritrea holidays.
Resolves #1179.
Type of change
holidays
functionality in general)Checklist
make check
locally; all checks and tests passed.