-
-
Notifications
You must be signed in to change notification settings - Fork 554
Add Comoros holidays #2827
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 Comoros holidays #2827
Conversation
Summary by CodeRabbit
WalkthroughAdds Comoros (KM/COM) holiday support: new country provider module, registry entry and package export, KM snapshot dataset, comprehensive tests, and README update increasing country count to 237. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 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. 📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (4)
🧰 Additional context used🧠 Learnings (38)📓 Common learnings
📚 Learning: 2025-07-10T11:00:13.195Z
Applied to files:
📚 Learning: 2025-08-08T14:37:03.045Z
Applied to files:
📚 Learning: 2025-04-18T21:13:55.589Z
Applied to files:
📚 Learning: 2025-08-03T12:59:53.286Z
Applied to files:
📚 Learning: 2025-08-08T10:33:55.695Z
Applied to files:
📚 Learning: 2025-07-15T15:00:32.728Z
Applied to files:
📚 Learning: 2025-07-14T19:32:44.256Z
Applied to files:
📚 Learning: 2025-08-24T11:55:06.800Z
Applied to files:
📚 Learning: 2025-07-17T11:07:04.986Z
Applied to files:
📚 Learning: 2025-08-08T14:37:03.045Z
Applied to files:
📚 Learning: 2025-08-09T18:31:23.218Z
Applied to files:
📚 Learning: 2025-07-12T20:54:28.749Z
Applied to files:
📚 Learning: 2025-06-06T16:02:09.910Z
Applied to files:
📚 Learning: 2025-06-13T12:18:03.539Z
Applied to files:
📚 Learning: 2025-08-11T10:14:28.517Z
Applied to files:
📚 Learning: 2025-08-25T10:51:08.023Z
Applied to files:
📚 Learning: 2025-08-25T09:57:22.263Z
Applied to files:
📚 Learning: 2025-08-03T13:48:11.910Z
Applied to files:
📚 Learning: 2025-08-21T04:51:55.283Z
Applied to files:
📚 Learning: 2025-08-19T20:14:40.340Z
Applied to files:
📚 Learning: 2025-08-19T20:39:52.024Z
Applied to files:
📚 Learning: 2025-03-30T18:22:11.939Z
Applied to files:
📚 Learning: 2025-08-25T09:57:22.263Z
Applied to files:
📚 Learning: 2025-08-24T06:53:35.878Z
Applied to files:
📚 Learning: 2025-04-03T13:03:16.558Z
Applied to files:
📚 Learning: 2025-04-03T13:03:16.558Z
Applied to files:
📚 Learning: 2025-08-19T21:00:47.849Z
Applied to files:
📚 Learning: 2025-03-30T13:54:34.376Z
Applied to files:
📚 Learning: 2025-04-13T20:41:56.613Z
Applied to files:
📚 Learning: 2025-06-19T02:34:18.382Z
Applied to files:
📚 Learning: 2025-06-10T12:43:10.577Z
Applied to files:
📚 Learning: 2025-06-14T20:13:29.536Z
Applied to files:
📚 Learning: 2025-06-29T10:36:06.138Z
Applied to files:
📚 Learning: 2025-04-13T19:10:31.502Z
Applied to files:
📚 Learning: 2025-06-04T10:09:28.732Z
Applied to files:
📚 Learning: 2025-03-30T08:08:30.415Z
Applied to files:
📚 Learning: 2025-06-06T14:40:31.932Z
Applied to files:
🧬 Code graph analysis (2)holidays/countries/__init__.py (1)
holidays/countries/comoros.py (5)
🪛 LanguageToolREADME.md[grammar] ~108-~108: There might be a mistake here. (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). (3)
🔇 Additional comments (8)
✨ 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 #2827 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 289 290 +1
Lines 17194 17235 +41
Branches 2241 2242 +1
=========================================
+ Hits 17194 17235 +41 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 (6)
README.md
(2 hunks)holidays/countries/__init__.py
(1 hunks)holidays/countries/comoros.py
(1 hunks)holidays/registry.py
(1 hunks)snapshots/countries/KM_COMMON.json
(1 hunks)tests/countries/test_comoros.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (26)
📓 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-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:
holidays/registry.py
📚 Learning: 2025-04-18T21:13:55.589Z
Learnt from: KJhellico
PR: vacanza/holidays#2483
File: holidays/registry.py:177-177
Timestamp: 2025-04-18T21:13:55.589Z
Learning: In the holidays/registry.py file, COUNTRIES dictionary entries should use the class name (without spaces) as the first element of the tuple (e.g., "TurksAndCaicosIslands"), not the human-readable country name with spaces.
Applied to files:
holidays/registry.py
📚 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:
holidays/registry.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: 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:
holidays/registry.py
holidays/countries/__init__.py
tests/countries/test_comoros.py
📚 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:
holidays/registry.py
📚 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:
holidays/registry.py
📚 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:
holidays/registry.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-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-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/KM_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/KM_COMMON.json
📚 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:
snapshots/countries/KM_COMMON.json
📚 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/comoros.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:
holidays/countries/__init__.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:
holidays/countries/__init__.py
tests/countries/test_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.py
🧬 Code Graph Analysis (3)
holidays/countries/comoros.py (4)
holidays/groups/christian.py (2)
ChristianHolidays
(23-499)_add_christmas_day
(224-232)holidays/groups/islamic.py (6)
IslamicHolidays
(20-443)_add_eid_al_fitr_day
(152-163)_add_eid_al_adha_day
(109-120)_add_islamic_new_year_day
(283-295)_add_mawlid_day
(329-339)_add_isra_and_miraj_day
(297-306)holidays/groups/international.py (3)
InternationalHolidays
(20-236)_add_new_years_day
(142-150)_add_labor_day
(115-124)holidays/observed_holiday_base.py (1)
ObservedHolidayBase
(102-246)
holidays/countries/__init__.py (1)
holidays/countries/comoros.py (3)
Comoros
(17-78)KM
(81-82)COM
(85-86)
tests/countries/test_comoros.py (2)
tests/common.py (2)
CommonCountryTests
(356-374)assertAliases
(121-130)holidays/countries/comoros.py (3)
Comoros
(17-78)KM
(81-82)COM
(85-86)
🪛 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 Python 3.13 on windows-latest
🔇 Additional comments (15)
holidays/registry.py (1)
70-70
: Comoros registry entry — tuple format and ordering look correct
- Uses the class name "Comoros" as the first tuple element per registry conventions.
- Includes alpha-2 "KM" and alpha-3 "COM".
- Positioned alphabetically between "colombia" and "congo".
README.md (2)
479-484
: Comoros row formatting and placement look good
- Row is alphabetically placed between Colombia and Congo.
- Code column uses only alpha-2 "KM" per table conventions.
108-108
: No action needed – country-code count is in sync
The script confirms 234 entries in COUNTRIES and the README already states “We currently support 234 country codes.”snapshots/countries/KM_COMMON.json (1)
1-833
: Snapshot looks consistent; no manual edits here
- Dates span from 1976 per start_year.
- Islamic holidays include "(estimated)" per default toggle.
- Multiple holidays on the same date are separated by semicolons, matching snapshot conventions.
holidays/countries/comoros.py (4)
26-33
: Class metadata aligns with conventions
- country = "KM"
- estimated_label and observed_estimated_label customized
- start_year = 1976 matches snapshot coverage
34-45
: Constructor signature and Islamic estimated toggle — goodUses the standardized signature with islamic_show_estimated and initializes mixins correctly.
46-79
: Holiday population uses canonical helpers and expected setFixed-date, Christian, and Islamic holidays are added via standard helpers. Looks correct for KM.
81-86
: Alias classes KM and COM — good for compatibilityPublic aliases are consistent with registry and exports.
holidays/countries/__init__.py (1)
62-62
: Re-export added — alphabetical and absolute import are correctImport is placed after Colombia and before Congo, and follows absolute-import style.
tests/countries/test_comoros.py (6)
13-16
: Good: Follows project test conventions and import style.Uses CommonCountryTests and the per-country import path (holidays.countries.comoros) as per repo norms.
29-31
: Good negative control.Covers pre-start year cleanly.
117-130
: LGTM: Solid localization snapshot for 2022.Covers fixed and Islamic holidays with estimated labels; matches provider naming.
63-63
: Also include 2050 for non-estimated Islamic holiday coverage.Keep consistency by extending the year range to 2051 wherever you validate the non-estimated names.
Apply:
- self.assertHolidayName(name, self.no_estimated_holidays, range(1976, 2050)) + self.assertHolidayName(name, self.no_estimated_holidays, range(1976, 2051))Apply the same change to lines 76, 89, 102, and 115.
Also applies to: 76-76, 89-89, 102-102, 115-115
⛔ Skipped due to learnings
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.
Learnt from: PPsyrius PR: vacanza/holidays#2629 File: tests/countries/test_namibia.py:22-23 Timestamp: 2025-06-14T10:58:43.636Z Learning: In the vacanza/holidays project, country test files consistently use range(start_year, 2050) which intentionally excludes 2050 and stops at 2049. This is a library-wide implementation pattern, not an off-by-one error.
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.
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.
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.
19-25
: Include 2050 in the test window.Project convention tests through 2050 (use stop=2051). Align setUpClass years.
Apply:
- years = range(1976, 2050) + years = range(1976, 2051)⛔ Skipped due to learnings
Learnt from: PPsyrius PR: vacanza/holidays#2629 File: tests/countries/test_namibia.py:22-23 Timestamp: 2025-06-14T10:58:43.636Z Learning: In the vacanza/holidays project, country test files consistently use range(start_year, 2050) which intentionally excludes 2050 and stops at 2049. This is a library-wide implementation pattern, not an off-by-one error.
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.
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#2642 File: tests/countries/test_wallis_and_futuna.py:19-23 Timestamp: 2025-06-18T17:01:58.067Z Learning: In the vacanza/holidays repository, the standard pattern for test class setUpClass methods is `super().setUpClass(HolidayClass)` or `super().setUpClass(HolidayClass, years=...)` where HolidayClass is passed as the first argument. This is the correct signature that matches the CommonCountryTests.setUpClass method which accepts test_class as the first parameter after cls. Pylint warnings about parameter count mismatch are false positives when comparing against TestCase.setUpClass instead of the immediate parent CommonCountryTests.setUpClass.
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#2642 File: tests/countries/test_wallis_and_futuna.py:19-23 Timestamp: 2025-06-18T17:01:58.067Z Learning: In the vacanza/holidays repository, the standard pattern for test class setUpClass methods is `super().setUpClass(HolidayClass)` where HolidayClass is passed as the first argument. This is the correct signature used across all country test files.
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: KJhellico PR: vacanza/holidays#2671 File: tests/countries/test_libya.py:19-24 Timestamp: 2025-06-22T21:36:18.015Z Learning: In the vacanza/holidays project, test classes for countries do not use docstrings. All test classes follow the same pattern: class declaration directly followed by classmethod def setUpClass(cls) without any docstrings for the class or methods.
32-51
: Extend fixed-date generators to include 2050.Your generators stop at 2049. Use 2051 to include 2050 per repo convention.
Apply:
- self.assertHolidayName("New Year's Day", (f"{year}-01-01" for year in range(1976, 2050))) + self.assertHolidayName("New Year's Day", (f"{year}-01-01" for year in range(1976, 2051))) - self.assertHolidayName( - "Cheikh al Maarouf", (f"{year}-03-18" for year in range(1976, 2050)) - ) + self.assertHolidayName( + "Cheikh al Maarouf", (f"{year}-03-18" for year in range(1976, 2051)) + ) - self.assertHolidayName("Labour Day", (f"{year}-05-01" for year in range(1976, 2050))) + self.assertHolidayName("Labour Day", (f"{year}-05-01" for year in range(1976, 2051))) - self.assertHolidayName("National Day", (f"{year}-07-06" for year in range(1976, 2050))) + self.assertHolidayName("National Day", (f"{year}-07-06" for year in range(1976, 2051))) - self.assertHolidayName("Maore Day", (f"{year}-11-12" for year in range(1976, 2050))) + self.assertHolidayName("Maore Day", (f"{year}-11-12" for year in range(1976, 2051))) - self.assertHolidayName("Christmas Day", (f"{year}-12-25" for year in range(1976, 2050))) + self.assertHolidayName("Christmas Day", (f"{year}-12-25" for year in range(1976, 2051)))⛔ Skipped due to learnings
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.
Learnt from: PPsyrius PR: vacanza/holidays#2629 File: tests/countries/test_namibia.py:22-23 Timestamp: 2025-06-14T10:58:43.636Z Learning: In the vacanza/holidays project, country test files consistently use range(start_year, 2050) which intentionally excludes 2050 and stops at 2049. This is a library-wide implementation pattern, not an off-by-one error.
Learnt from: PPsyrius PR: vacanza/holidays#2601 File: tests/countries/test_mongolia.py:128-156 Timestamp: 2025-06-15T11:52:39.572Z Learning: In the vacanza/holidays project tests, when testing holidays that span multiple consecutive days across many years (like Mongolia's National Festival spanning July 11-13), prefer explicit for loops over complex nested generator expressions with unpacking. The explicit loops are more readable, easier to maintain, and better communicate the testing intent even though the Big O complexity is equivalent.
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.
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.
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: 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.
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: 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.
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.
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.
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: 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.
Fix holiday durations, update references, and correct holiday dates.
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
♻️ Duplicate comments (1)
snapshots/countries/KM_COMMON.json (1)
1-1034
: Snapshot looks internally consistent; don’t hand-edit these filesEntries align with the provider logic: fixed-date holidays, 3-day Eid al-Fitr, 2-day Eid al-Adha, special holidays for 2024-04-13 and 2025-01-30, and semicolon-separated multi-holiday dates. As a reminder, snapshots are auto-generated via make snapshot; any corrections should be implemented in the provider code, not here.
📜 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 (3)
holidays/countries/comoros.py
(1 hunks)snapshots/countries/KM_COMMON.json
(1 hunks)tests/countries/test_comoros.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (26)
📓 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-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/KM_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/KM_COMMON.json
📚 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/comoros.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:
holidays/countries/comoros.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/comoros.py
📚 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/comoros.py
📚 Learning: 2025-08-19T20:14:40.340Z
Learnt from: KJhellico
PR: vacanza/holidays#2831
File: holidays/countries/south_sudan.py:84-88
Timestamp: 2025-08-19T20:14:40.340Z
Learning: In South Sudan, Eid al-Fitr and Eid al-Adha holidays have variable observance patterns determined by yearly Ministry of Labour circulars. The first day of each Eid is consistently a national public holiday for everyone, while additional days (2nd, 3rd) may be either Muslim-specific or general public holidays depending on the government's annual announcement.
Applied to files:
holidays/countries/comoros.py
📚 Learning: 2025-08-19T20:39:52.024Z
Learnt from: KJhellico
PR: vacanza/holidays#2831
File: holidays/countries/south_sudan.py:84-88
Timestamp: 2025-08-19T20:39:52.024Z
Learning: In South Sudan holidays implementation, Eid al-Fitr and Eid al-Adha follow a specific two-day pattern: the first day of each Eid is a PUBLIC holiday (national holiday for everyone), while the second day is an ISLAMIC category holiday (Muslim-specific only). This should be implemented by keeping first day calls in _populate_public_holidays() and adding second day calls in _populate_islamic_holidays() method.
Applied to files:
holidays/countries/comoros.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_comoros.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_comoros.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: 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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.py
📚 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:
tests/countries/test_comoros.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_comoros.py
📚 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:
tests/countries/test_comoros.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_comoros.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_comoros.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_comoros.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_comoros.py
🧬 Code graph analysis (2)
holidays/countries/comoros.py (3)
holidays/calendars/islamic.py (1)
_CustomIslamicHolidays
(4085-4086)holidays/groups/islamic.py (4)
IslamicHolidays
(20-443)_add_eid_al_fitr_day
(152-163)_add_eid_al_adha_day
(109-120)_add_islamic_new_year_day
(283-295)holidays/groups/custom.py (1)
StaticHolidays
(18-47)
tests/countries/test_comoros.py (2)
tests/common.py (6)
CommonCountryTests
(356-374)assertAliases
(121-130)assertNoHolidays
(292-294)assertHolidayName
(195-199)assertNoHolidayName
(273-275)assertLocalizedHolidays
(327-338)holidays/countries/comoros.py (3)
Comoros
(26-97)KM
(100-101)COM
(104-105)
⏰ 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 (12)
snapshots/countries/KM_COMMON.json (2)
656-664
: Special holiday presence confirmed“National Holiday” (2024-04-13) and “Maore Day” are present as expected; this matches the static holidays defined in the provider. No action needed.
665-679
: 2025 data matches provider intent“The Prophet’s Ascension (estimated)” on 2025-01-27 and “Election Partial Day Holiday” on 2025-01-30 are included as expected. Good parity with provider constants.
tests/countries/test_comoros.py (5)
19-25
: Good test harness setup using CommonCountryTests and a no-estimated instancesetUpClass wires the standard years range and adds a Comoros instance with islamic_show_estimated=False for name checks without the “(estimated)” suffix. This mirrors project conventions.
46-50
: Maore Day gating from 2006 is asserted correctlyAsserting absence before 2006 and presence from 2006 onward reflects the policy start year. Nice clarity.
54-66
: Islamic holiday name assertions cover estimated and non-estimated pathsExplicit date checks for recent years plus the wide-range check against the no-estimated instance provide solid coverage for Eid al-Fitr naming behavior.
93-105
: Confirmed Mawlid 2021 date is handled distinctlyThe single non-estimated 2021 case is tested explicitly, ensuring the custom Islamic calendar override is exercised.
119-127
: Special public holidays are testedBoth 2024-04-13 and 2025-01-30 are asserted. This guards against regressions in static holiday wiring.
holidays/countries/comoros.py (5)
41-42
: Start year rationale is correctIndependence in 1975 with holidays starting 1976 aligns with the project’s approach for country start years.
72-75
: Maore Day correctly gated to ≥ 2006Matches discussion and source notes; aligns with tests and snapshot content.
79-89
: Eid durations match expectations (3-day Fitr, 2-day Adha)The explicit three calls for Fitr and two for Adha line up with regional observance patterns and the snapshots/tests.
108-113
: Custom Mawlid override for 2021 is narrowly scoped and correctThe confirmed 2021 date is encoded without affecting other years, letting the estimation label apply elsewhere. Good balance.
115-120
: Static special holidays are wired via StaticHolidays as intendedEncoding 2024-04-13 and 2025-01-30 here keeps the provider clean and snapshot in sync. Nicely done.
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: 3
♻️ Duplicate comments (2)
holidays/countries/comoros.py (2)
29-33
: References are fine as-is (keep the archived 2021 post)The archived post substantiates the 2021 Mawlid variance and complements Wikipedia. No change suggested here.
87-95
: Order Islamic holidays in Hijri chronological order (readability)Place Islamic New Year, Mawlid, and Isra’ and Mi’raj before the Eid blocks to follow the Hijri sequence. This is a style/readability tweak only.
Apply:
@@ - # Eid al-Adha. - name = "Eid al-Adha" - self._add_eid_al_adha_day(name) - self._add_eid_al_adha_day_two(name) - - # Eid al-Fitr. - name = "Eid al-Fitr" - self._add_eid_al_fitr_day(name) - self._add_eid_al_fitr_day_two(name) - self._add_eid_al_fitr_day_three(name) - - # Islamic New Year. - self._add_islamic_new_year_day("Islamic New Year") - - # Isra' and Mi'raj. - self._add_isra_and_miraj_day("Isra' and Mi'raj") - - # Prophet's Birthday. - self._add_mawlid_day("Prophet's Birthday") + # Islamic New Year. + self._add_islamic_new_year_day("Islamic New Year") + + # Prophet's Birthday. + self._add_mawlid_day("Prophet's Birthday") + + # Isra' and Mi'raj. + self._add_isra_and_miraj_day("Isra' and Mi'raj") + + # Eid al-Fitr. + name = "Eid al-Fitr" + self._add_eid_al_fitr_day(name) + self._add_eid_al_fitr_day_two(name) + self._add_eid_al_fitr_day_three(name) + + # Eid al-Adha. + name = "Eid al-Adha" + self._add_eid_al_adha_day(name) + self._add_eid_al_adha_day_two(name)
📜 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 (6)
README.md
(2 hunks)holidays/countries/__init__.py
(1 hunks)holidays/countries/comoros.py
(1 hunks)holidays/registry.py
(1 hunks)snapshots/countries/KM_COMMON.json
(1 hunks)tests/countries/test_comoros.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (42)
📓 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-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:
holidays/registry.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: 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:
holidays/registry.py
holidays/countries/__init__.py
tests/countries/test_comoros.py
📚 Learning: 2025-04-18T21:13:55.589Z
Learnt from: KJhellico
PR: vacanza/holidays#2483
File: holidays/registry.py:177-177
Timestamp: 2025-04-18T21:13:55.589Z
Learning: In the holidays/registry.py file, COUNTRIES dictionary entries should use the class name (without spaces) as the first element of the tuple (e.g., "TurksAndCaicosIslands"), not the human-readable country name with spaces.
Applied to files:
holidays/registry.py
📚 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:
holidays/registry.py
tests/countries/test_comoros.py
📚 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:
holidays/registry.py
📚 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:
holidays/registry.py
tests/countries/test_comoros.py
📚 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:
holidays/registry.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:
holidays/countries/__init__.py
tests/countries/test_comoros.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:
holidays/countries/__init__.py
tests/countries/test_comoros.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:
holidays/countries/__init__.py
tests/countries/test_comoros.py
📚 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/KM_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/KM_COMMON.json
📚 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-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/comoros.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:
holidays/countries/comoros.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/comoros.py
📚 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/comoros.py
📚 Learning: 2025-08-19T20:14:40.340Z
Learnt from: KJhellico
PR: vacanza/holidays#2831
File: holidays/countries/south_sudan.py:84-88
Timestamp: 2025-08-19T20:14:40.340Z
Learning: In South Sudan, Eid al-Fitr and Eid al-Adha holidays have variable observance patterns determined by yearly Ministry of Labour circulars. The first day of each Eid is consistently a national public holiday for everyone, while additional days (2nd, 3rd) may be either Muslim-specific or general public holidays depending on the government's annual announcement.
Applied to files:
holidays/countries/comoros.py
📚 Learning: 2025-08-19T20:39:52.024Z
Learnt from: KJhellico
PR: vacanza/holidays#2831
File: holidays/countries/south_sudan.py:84-88
Timestamp: 2025-08-19T20:39:52.024Z
Learning: In South Sudan holidays implementation, Eid al-Fitr and Eid al-Adha follow a specific two-day pattern: the first day of each Eid is a PUBLIC holiday (national holiday for everyone), while the second day is an ISLAMIC category holiday (Muslim-specific only). This should be implemented by keeping first day calls in _populate_public_holidays() and adding second day calls in _populate_islamic_holidays() method.
Applied to files:
holidays/countries/comoros.py
📚 Learning: 2025-06-14T11:04:24.104Z
Learnt from: KJhellico
PR: vacanza/holidays#2629
File: holidays/countries/namibia.py:70-73
Timestamp: 2025-06-14T11:04:24.104Z
Learning: In Namibia's holiday system, holidays declared by presidential proclamation under Section 1(3) of the Public Holidays Act may not automatically be subject to the Sunday-to-Monday observation rule in Section 1(2), which primarily applies to holidays listed in the Schedule. Genocide Remembrance Day (May 28) starting in 2025 is treated as a fixed commemorative date without observed day handling.
Applied to files:
holidays/countries/comoros.py
📚 Learning: 2025-03-30T18:22:11.939Z
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/countries/ivory_coast.py:127-128
Timestamp: 2025-03-30T18:22:11.939Z
Learning: The IvoryCoast class in holidays/countries/ivory_coast.py already includes documentation in its class docstring explaining the "day after" naming convention for Islamic holidays, noting that in the Islamic calendar, days begin at sunset and the "day after" refers to daylight hours following the night of celebration.
Applied to files:
holidays/countries/comoros.py
📚 Learning: 2025-08-24T06:53:35.878Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2852
File: holidays/countries/tajikistan.py:55-56
Timestamp: 2025-08-24T06:53:35.878Z
Learning: In Tajikistan, March 8th is celebrated as Mother's Day (Рӯзи Модар) rather than International Women's Day, so the country-specific implementation should use _add_holiday_mar_8() rather than the shared _add_womens_day() helper from InternationalHolidays.
Applied to files:
holidays/countries/comoros.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.
Applied to files:
holidays/countries/comoros.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/comoros.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:
holidays/countries/comoros.py
📚 Learning: 2025-03-30T13:54:34.376Z
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/countries/ivory_coast.py:98-107
Timestamp: 2025-03-30T13:54:34.376Z
Learning: In the Islamic calendar, days begin at sunset rather than midnight. For holidays like "Lendemain de la Nuit du Destin" (Day after Night of Destiny) in Ivory Coast, the name refers to the daylight hours following the night of Laylat al-Qadr (27th of Ramadan). The implementation uses `_add_laylat_al_qadr_day` which correctly calculates this as the 27th day of Ramadan in the Gregorian calendar.
Applied to files:
holidays/countries/comoros.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/comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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:
tests/countries/test_comoros.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_comoros.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_comoros.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_comoros.py
🧬 Code graph analysis (3)
holidays/countries/__init__.py (1)
holidays/countries/comoros.py (3)
Comoros
(24-94)KM
(97-98)COM
(101-102)
holidays/countries/comoros.py (5)
holidays/calendars/islamic.py (1)
_CustomIslamicHolidays
(4085-4086)holidays/groups/christian.py (1)
_add_christmas_day
(224-232)holidays/groups/islamic.py (9)
IslamicHolidays
(20-443)_add_eid_al_adha_day
(109-120)_add_eid_al_adha_day_two
(122-130)_add_eid_al_fitr_day
(152-163)_add_eid_al_fitr_day_two
(165-173)_add_eid_al_fitr_day_three
(175-183)_add_islamic_new_year_day
(283-295)_add_isra_and_miraj_day
(297-306)_add_mawlid_day
(329-339)holidays/groups/international.py (2)
_add_new_years_day
(142-150)_add_labor_day
(115-124)holidays/groups/custom.py (1)
StaticHolidays
(18-47)
tests/countries/test_comoros.py (1)
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)
🪛 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). (3)
- GitHub Check: Test build on windows-latest
- GitHub Check: Test build on ubuntu-latest
- GitHub Check: Test build on macos-latest
🔇 Additional comments (16)
README.md (2)
479-484
: Comoros row added in the right place with ISO alpha‑2 (KM) only — good.Alphabetical placement between Colombia and Congo is correct and the Code column uses only KM, consistent with table conventions.
108-121
: Country count verified and in sync (236)I’ve adjusted the verification snippet to correctly pull out the README number and use sed for in-place updates. Running it confirms that both the registry and README show 236 country codes, so no change to README.md is needed.
Improved verification script:
#!/usr/bin/env bash set -euo pipefail # Count registry entries between COUNTRIES: and FINANCIAL: REG_COUNT=$(awk ' /^COUNTRIES:/{in_c=1} /^FINANCIAL:/{in_c=0} in_c ' holidays/registry.py | grep -cP '^\s*"[a-z0-9_ ]+":\s*\(') # Extract just the number from README.md README_COUNT=$(grep -oP '(?<=^We currently support\s)\d+(?=\s+country codes\.)' README.md | head -1) echo "Registry: $REG_COUNT, README: $README_COUNT" if [ "$REG_COUNT" -ne "$README_COUNT" ]; then # Backup and update in one step sed -i.bak "s/^We currently support [0-9]\+ country codes\./We currently support $REG_COUNT country codes./" README.md echo "README.md updated to $REG_COUNT country codes." else echo "Counts are in sync." fiSince it reports 236 ≔ 236, no README update is required at this time. Let me know if you’d like me to push this snippet (or the backup-removal step) as a follow-up.
holidays/registry.py (1)
70-71
: Registry wiring for Comoros looks correct.
- Key: "comoros"
- Tuple: ("Comoros", "KM", "COM") with class-name token first, per style.
- Alphabetical insertion after "colombia" is consistent.
holidays/countries/__init__.py (1)
62-62
: Aggregated export added, absolute import, and alphabetically placed — all good.
from holidays.countries.comoros import Comoros, KM, COM
sits between Colombia and Congo and follows the absolute-import convention for this file.snapshots/countries/KM_COMMON.json (1)
1-16
: Treat snapshot as generated artifact; don’t hand‑edit.Assuming this was produced via
make snapshot
. If any holiday names/dates need tweaks, adjust the provider (holidays/countries/comoros.py) and regenerate.Please confirm this file was generated by the standard snapshot target (or re-run
make snapshot
to refresh before merging).tests/countries/test_comoros.py (3)
15-17
: Test import pattern and base class conform to project conventions.Direct module import and CommonCountryTests usage match the dominant pattern across country tests.
19-25
: Good: comprehensive fixture setup including “no estimated” instance.Using
islamic_show_estimated=False
to validate name variants is the right approach.
134-151
: Year snapshot assertion is solid and mirrors provider output.Anchoring a full-year check (2022) alongside per-holiday tests strengthens coverage.
holidays/countries/comoros.py (8)
24-26
: Good class composition and mixins orderInheritance stack and alias plan look consistent with the codebase patterns.
41-55
: Constructor matches project-standard signature and init flowUses
__init__(self, *args, islamic_show_estimated: bool = True, **kwargs)
, wiresComorosIslamicHolidays
andComorosStaticHolidays
, then delegates tosuper()
. This aligns with recent country implementations.
56-75
: Fixed-date set looks sane; gating Maore Day from 2006 is fineNaming and helpers are consistent. The 2006 start for Maore Day matches the prior reviewer note; make sure tests assert absence in 2005 and presence in 2006+.
Would you like me to add parameterized tests for 2005/2006 boundary?
76-86
: Double-check Eid durations (days count) for KM policyCurrent code: Eid al-Adha = 2 days; Eid al-Fitr = 3 days. A prior reviewer hinted at a different split. Please confirm the authoritative policy (recent decrees/circulars) before merge; adjust if needed. If the policy is “Fitr 2, Adha 3”, we’ll need to drop Fitr day three and add Adha day three (via
_add_eid_al_adha_day_three(name)
if available; otherwise use_add_islamic_calendar_holiday(..., days_delta=+2)
).I can update this block once you confirm the intended pattern.
60-62
: Cheikh al Maarouf Day helper usage looks correctUsing
_add_holiday_mar_18("Cheikh al Maarouf Day")
matches project idioms and prior reviewer guidance.
119-122
: Names for special holidays: verify exact phrasing from decreesPlease confirm the labels exactly match the decree wording (e.g., “Election Partial Day Holiday” vs “Election Day (partial public holiday)”) to avoid future rename churn.
I can align the wording once you confirm the official phrasing from the two decrees.
105-109
: Tie the one-off MAWLID date to its source in-class (optional)Add a short docstring here citing the archived 2021 proof so the override is self-explanatory at point-of-use.
Apply:
class ComorosIslamicHolidays(_CustomIslamicHolidays): + """ + Comoros-specific Islamic calendar adjustments. + + References: + * [Prophet's Birthday 2021](https://web.archive.org/web/20250712053206/https://scontent-del1-2.xx.fbcdn.net/v/t39.30808-6/471586197_1113861707132176_3696210890184034016_n.jpg?_nc_cat=100&ccb=1-7&_nc_sid=833d8c&_nc_ohc=3hfvuVNGVbMQ7kNvwHvrgbW&_nc_oc=AdnuDzvtcvdBJMoN-qSW7Pnx2fnzj2TFgwMSRklpM_Na-5AaB9y8D0U5BINcxL-vVL0&_nc_zt=23&_nc_ht=scontent-del1-2.xx&_nc_gid=HWC_59SRsyDfwGxku5bqXw&oh=00_AfSk0LCPS7PARPjdX5-vfM_lr7WxZnrkA9jRyrdUFhoyMQ&oe=68736290) + """ MAWLID_DATES = { }⛔ Skipped due to learnings
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.
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.
Learnt from: PPsyrius PR: vacanza/holidays#2643 File: holidays/countries/mauritius.py:171-184 Timestamp: 2025-06-19T02:34:14.456Z Learning: In the holidays library, `_CustomIslamicHolidays` subclasses follow a consistent pattern of NOT having docstrings. They go directly to defining date dictionaries, as evidenced by Malaysia, Singapore, UAE, and dozens of other country implementations.
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.
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.
Learnt from: KJhellico PR: vacanza/holidays#2388 File: holidays/countries/ivory_coast.py:127-128 Timestamp: 2025-03-30T18:22:11.939Z Learning: The IvoryCoast class in holidays/countries/ivory_coast.py already includes documentation in its class docstring explaining the "day after" naming convention for Islamic holidays, noting that in the Islamic calendar, days begin at sunset and the "day after" refers to daylight hours following the night of celebration.
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.
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.
35-39
: Boundary tests are in place and sufficientI’ve confirmed that in tests/countries/test_comoros.py:
assertNoHolidays(Comoros(years=1975))
verifies no holidays in 1975- Every fixed and movable holiday test uses
range(1976, 2050)
, ensuring holidays are present from 1976 onwardNo changes needed. Great coverage!
order islamic holidays in correct hijri chronological 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: 1
📜 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 (2)
holidays/countries/comoros.py
(1 hunks)tests/countries/test_comoros.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (55)
📓 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-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/comoros.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:
holidays/countries/comoros.py
📚 Learning: 2025-08-25T10:51:08.023Z
Learnt from: PPsyrius
PR: vacanza/holidays#2831
File: holidays/countries/south_sudan.py:21-30
Timestamp: 2025-08-25T10:51:08.023Z
Learning: In the holidays library, references in country/market holiday implementations should be ordered as follows: Wikipedia links for the country/market holidays first, then country-specific official sources for newer implementations, then Wikipedia links for each individual non-standard holiday if any are required. Official government sources should not be placed first ahead of Wikipedia links.
Applied to files:
holidays/countries/comoros.py
📚 Learning: 2025-08-25T09:57:22.263Z
Learnt from: PPsyrius
PR: vacanza/holidays#2833
File: holidays/countries/uganda.py:50-56
Timestamp: 2025-08-25T09:57:22.263Z
Learning: In the holidays package, when adding contextual comments about holiday establishment dates, avoid making claims about specific laws, parliamentary acts, or government decisions unless they can be verified from authoritative sources like official government legal databases, gazettes, or parliamentary records. Unverified legal claims should not be added to comments even if they seem plausible.
Applied to files:
holidays/countries/comoros.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/comoros.py
📚 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/comoros.py
📚 Learning: 2025-08-19T20:14:40.340Z
Learnt from: KJhellico
PR: vacanza/holidays#2831
File: holidays/countries/south_sudan.py:84-88
Timestamp: 2025-08-19T20:14:40.340Z
Learning: In South Sudan, Eid al-Fitr and Eid al-Adha holidays have variable observance patterns determined by yearly Ministry of Labour circulars. The first day of each Eid is consistently a national public holiday for everyone, while additional days (2nd, 3rd) may be either Muslim-specific or general public holidays depending on the government's annual announcement.
Applied to files:
holidays/countries/comoros.py
📚 Learning: 2025-08-19T20:39:52.024Z
Learnt from: KJhellico
PR: vacanza/holidays#2831
File: holidays/countries/south_sudan.py:84-88
Timestamp: 2025-08-19T20:39:52.024Z
Learning: In South Sudan holidays implementation, Eid al-Fitr and Eid al-Adha follow a specific two-day pattern: the first day of each Eid is a PUBLIC holiday (national holiday for everyone), while the second day is an ISLAMIC category holiday (Muslim-specific only). This should be implemented by keeping first day calls in _populate_public_holidays() and adding second day calls in _populate_islamic_holidays() method.
Applied to files:
holidays/countries/comoros.py
📚 Learning: 2025-06-14T11:04:24.104Z
Learnt from: KJhellico
PR: vacanza/holidays#2629
File: holidays/countries/namibia.py:70-73
Timestamp: 2025-06-14T11:04:24.104Z
Learning: In Namibia's holiday system, holidays declared by presidential proclamation under Section 1(3) of the Public Holidays Act may not automatically be subject to the Sunday-to-Monday observation rule in Section 1(2), which primarily applies to holidays listed in the Schedule. Genocide Remembrance Day (May 28) starting in 2025 is treated as a fixed commemorative date without observed day handling.
Applied to files:
holidays/countries/comoros.py
📚 Learning: 2025-03-30T18:22:11.939Z
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/countries/ivory_coast.py:127-128
Timestamp: 2025-03-30T18:22:11.939Z
Learning: The IvoryCoast class in holidays/countries/ivory_coast.py already includes documentation in its class docstring explaining the "day after" naming convention for Islamic holidays, noting that in the Islamic calendar, days begin at sunset and the "day after" refers to daylight hours following the night of celebration.
Applied to files:
holidays/countries/comoros.py
📚 Learning: 2025-08-25T09:57:22.263Z
Learnt from: PPsyrius
PR: vacanza/holidays#2833
File: holidays/countries/uganda.py:50-56
Timestamp: 2025-08-25T09:57:22.263Z
Learning: In the holidays package, when adding comments for year-restricted holidays in Uganda and similar country modules, include specific legal or historical context such as the actual laws, parliamentary acts, or government decisions that established the holidays, rather than just generic "since YEAR" information. For example, reference the specific Parliament act, decree, or historical event that created the holiday.
Applied to files:
holidays/countries/comoros.py
📚 Learning: 2025-08-24T06:53:35.878Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2852
File: holidays/countries/tajikistan.py:55-56
Timestamp: 2025-08-24T06:53:35.878Z
Learning: In Tajikistan, March 8th is celebrated as Mother's Day (Рӯзи Модар) rather than International Women's Day, so the country-specific implementation should use _add_holiday_mar_8() rather than the shared _add_womens_day() helper from InternationalHolidays.
Applied to files:
holidays/countries/comoros.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.
Applied to files:
holidays/countries/comoros.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/comoros.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:
holidays/countries/comoros.py
📚 Learning: 2025-03-30T13:54:34.376Z
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/countries/ivory_coast.py:98-107
Timestamp: 2025-03-30T13:54:34.376Z
Learning: In the Islamic calendar, days begin at sunset rather than midnight. For holidays like "Lendemain de la Nuit du Destin" (Day after Night of Destiny) in Ivory Coast, the name refers to the daylight hours following the night of Laylat al-Qadr (27th of Ramadan). The implementation uses `_add_laylat_al_qadr_day` which correctly calculates this as the 27th day of Ramadan in the Gregorian calendar.
Applied to files:
holidays/countries/comoros.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/comoros.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: 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:
holidays/countries/comoros.py
tests/countries/test_comoros.py
📚 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:
holidays/countries/comoros.py
tests/countries/test_comoros.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:
holidays/countries/comoros.py
tests/countries/test_comoros.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:
holidays/countries/comoros.py
tests/countries/test_comoros.py
📚 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:
holidays/countries/comoros.py
tests/countries/test_comoros.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/comoros.py
📚 Learning: 2025-06-10T12:43:10.577Z
Learnt from: ankushhKapoor
PR: vacanza/holidays#2601
File: holidays/calendars/mongolian.py:1-1
Timestamp: 2025-06-10T12:43:10.577Z
Learning: The holidays project's calendar files (in holidays/calendars/) follow a consistent pattern of NOT having module-level docstrings. They only use class-level docstrings for their main classes. When reviewing calendar files, maintain this consistency and do not suggest adding module docstrings.
Applied to files:
holidays/countries/comoros.py
📚 Learning: 2025-08-24T11:55:06.800Z
Learnt from: KJhellico
PR: vacanza/holidays#2831
File: README.md:108-108
Timestamp: 2025-08-24T11:55:06.800Z
Learning: The actual count of countries in the holidays library should always be verified by counting entries in the COUNTRIES dictionary in holidays/registry.py using `grep -E '^\s*"[a-z_]+"\s*:' holidays/registry.py | wc -l`, rather than making assumptions about incremental changes.
Applied to files:
holidays/countries/comoros.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:
holidays/countries/comoros.py
📚 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:
holidays/countries/comoros.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:
holidays/countries/comoros.py
tests/countries/test_comoros.py
📚 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:
holidays/countries/comoros.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/comoros.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/comoros.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/comoros.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/comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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_comoros.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:
tests/countries/test_comoros.py
📚 Learning: 2025-08-25T04:28:02.030Z
Learnt from: PPsyrius
PR: vacanza/holidays#2848
File: tests/countries/test_somalia.py:44-127
Timestamp: 2025-08-25T04:28:02.030Z
Learning: In the holidays library, Islamic holiday tests use `self.no_estimated_holidays = Country(years=years, islamic_show_estimated=False)` as the library-wide standard approach to simplify test cases. This pattern is intentional and preferred over testing estimated labels.
Applied to files:
tests/countries/test_comoros.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_comoros.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_comoros.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_comoros.py
📚 Learning: 2025-08-24T12:04:48.849Z
Learnt from: KJhellico
PR: vacanza/holidays#2827
File: tests/countries/test_comoros.py:124-132
Timestamp: 2025-08-24T12:04:48.849Z
Learning: In the vacanza/holidays project, overlap holiday tests (testing dates where multiple holidays fall on the same date with names joined by semicolons) are not used as part of the standard testing approach.
Applied to files:
tests/countries/test_comoros.py
📚 Learning: 2025-06-15T11:52:39.572Z
Learnt from: PPsyrius
PR: vacanza/holidays#2601
File: tests/countries/test_mongolia.py:128-156
Timestamp: 2025-06-15T11:52:39.572Z
Learning: In the vacanza/holidays project tests, when testing holidays that span multiple consecutive days across many years (like Mongolia's National Festival spanning July 11-13), prefer explicit for loops over complex nested generator expressions with unpacking. The explicit loops are more readable, easier to maintain, and better communicate the testing intent even though the Big O complexity is equivalent.
Applied to files:
tests/countries/test_comoros.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_comoros.py
📚 Learning: 2025-06-14T21:12:07.224Z
Learnt from: KJhellico
PR: vacanza/holidays#2631
File: tests/countries/test_sint_maarten.py:62-0
Timestamp: 2025-06-14T21:12:07.224Z
Learning: KJhellico prefers to focus on completing and reviewing the main holiday implementation code before doing detailed reviews of the corresponding test files.
Applied to files:
tests/countries/test_comoros.py
📚 Learning: 2025-08-24T13:01:51.331Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2852
File: tests/countries/test_tajikistan.py:26-28
Timestamp: 2025-08-24T13:01:51.331Z
Learning: In the holidays project country test files, the standard method name for testing country aliases (ISO codes) is `test_country_aliases`, not `test_aliases`. This naming convention is consistently used across all country test files.
Applied to files:
tests/countries/test_comoros.py
📚 Learning: 2025-06-14T20:46:32.773Z
Learnt from: KJhellico
PR: vacanza/holidays#2631
File: tests/countries/test_sint_maarten.py:62-0
Timestamp: 2025-06-14T20:46:32.773Z
Learning: In the vacanza/holidays project tests, inner classes that shadow outer test class names are not standard practice. The test_sint_maarten.py file appears to be the only file using this pattern, making it an outlier rather than following project conventions.
Applied to files:
tests/countries/test_comoros.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_comoros.py
🧬 Code graph analysis (2)
holidays/countries/comoros.py (5)
holidays/calendars/islamic.py (1)
_CustomIslamicHolidays
(4085-4086)holidays/groups/christian.py (1)
_add_christmas_day
(224-232)holidays/groups/islamic.py (5)
IslamicHolidays
(20-443)_add_islamic_new_year_day
(283-295)_add_mawlid_day
(329-339)_add_isra_and_miraj_day
(297-306)_add_eid_al_fitr_day
(152-163)holidays/groups/international.py (2)
_add_new_years_day
(142-150)_add_labor_day
(115-124)holidays/groups/custom.py (1)
StaticHolidays
(18-47)
tests/countries/test_comoros.py (2)
tests/common.py (6)
TestCase
(28-338)CommonCountryTests
(356-374)assertAliases
(121-130)assertNoHolidays
(292-294)assertHolidayName
(195-199)assertNoHolidayName
(273-275)holidays/countries/comoros.py (3)
Comoros
(24-93)KM
(96-97)COM
(100-101)
🔇 Additional comments (17)
tests/countries/test_comoros.py (11)
13-19
: Good: test scaffolding follows project conventionsDirect-module import, CommonCountryTests base class, and TestCase mix-in are correct and consistent with the codebase.
20-25
: Solid setup: year range and “no_estimated” instanceUsing years=range(1976, 2050) matches start_year=1976, and the dedicated no_estimated_holidays instance with islamic_show_estimated=False is the preferred pattern for Islamic holiday assertions.
26-31
: Aliases and pre-start-year guard look good
- Alias check: Comoros, KM, COM.
- No holidays for 1975 validates start_year behavior.
32-45
: Fixed-date holiday coverage is precise and consistentGenerator-based assertions for New Year’s, Cheikh al Maarouf Day, Labour Day, National Day are clean and match the helpers used in the provider.
46-50
: Maore Day start-year gating is verified wellAsserting absence pre-2006 and presence on Nov 12 from 2006 onward aligns with the implementation and references.
54-67
: Islamic New Year tests use the correct “no_estimated” patternSpot checks for 2020–2025 plus a full-range presence check provide good confidence without mixing estimated labels.
68-81
: Prophet’s Birthday: explicit 2021 verification is a nice touchThe singled-out 2021-10-19 date (non‑estimated) plus the range check on the “no_estimated” instance is spot-on.
82-95
: Isra’ and Mi’raj coverage is thoroughGood combination of explicit recent dates and full-range presence check on the “no_estimated” instance.
96-123
: Eid day-count expectations are reflectedThree-day Eid al‑Fitr and two-day Eid al‑Adha are exercised, with sample dates and full-range checks against the “no_estimated” instance.
124-132
: Special public holidays assertions align with statics“National Holiday” (2024‑04‑13) and “Election Partial Day Holiday” (2025‑01‑30) match the provider’s special_public_holidays map.
134-151
: 2022 snapshot verification passedAll holidays asserted in
test_2022
for Comoros exactly match the entries insnapshots/countries/KM_COMMON.json
, and spot-checks for the 2024-04-13 and 2025-01-30 entries succeed. The optional validation script runs correctly and is available if you’d like to re-verify in the future.holidays/countries/comoros.py (6)
24-53
: Constructor and flags follow current package patterns
- Signature with islamic_show_estimated is correct.
- Wiring IslamicHolidays with cls=ComorosIslamicHolidays and StaticHolidays=ComorosStaticHolidays is as expected.
- start_year=1976 and estimated_label are appropriately set.
55-74
: Fixed-date holiday population is clean and idiomaticUse of _add_new_years_day, _add_holiday_mar_18, _add_labor_day, _add_holiday_jul_6, conditional Maore Day (>=2006), and _add_christmas_day aligns with helpers and the tests.
75-94
: Islamic holidays: correct Hijri ordering and day coverageOrdering is Islamic New Year → Prophet’s Birthday → Isra’ and Mi’raj → Eid al‑Fitr (3 days) → Eid al‑Adha (2 days), matching maintainers’ guidance and tests.
104-108
: Custom Islamic dates limited to verified yearsOnly 2021 Mawlid is included, matching the philosophy of recording officially verified dates. Good restraint.
110-121
: Looks good—special public holidays verified in snapshots.The entries for “2024-04-13”: “National Holiday” and “2025-01-30”: “Election Partial Day Holiday” are present in snapshots/countries/KM_COMMON.json, confirming the implementation and references are correct.
35-36
: Nit: comment punctuation for estimated_labelThe inline comment shows a trailing period that the value doesn’t have. Align for consistency.
- # %s (estimated). + # %s (estimated)⛔ Skipped due to learnings
Learnt from: KJhellico PR: vacanza/holidays#2831 File: holidays/countries/south_sudan.py:28-31 Timestamp: 2025-08-19T20:04:26.215Z Learning: In the holidays library, message comments (comments describing message format templates like "%s (estimated)." and "%s (observed, estimated).") always end with a period, even when the corresponding string values do not include the period.
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
Proposed change
Add Comoros holidays.
Resolves #1164.
Type of change
holidays
functionality in general)Checklist
make check
locally; all checks and tests passed.