Conversation
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughUpdated Azerbaijan's Islamic holiday date confirmation years from 2025 to 2026 (Eid al-Fitr and Eid al-Adha). Modified observed holiday calculation to use Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (39)📓 Common learnings📚 Learning: 2025-04-03T05:59:57.480ZApplied to files:
📚 Learning: 2025-03-29T15:15:05.919ZApplied to files:
📚 Learning: 2025-06-19T02:34:18.382ZApplied to files:
📚 Learning: 2025-06-19T02:34:14.456ZApplied to files:
📚 Learning: 2025-03-19T16:53:00.375ZApplied to files:
📚 Learning: 2025-08-22T19:06:04.303ZApplied to files:
📚 Learning: 2025-04-13T19:10:31.502ZApplied to files:
📚 Learning: 2025-08-28T02:34:11.657ZApplied to files:
📚 Learning: 2025-09-28T05:42:12.777ZApplied to files:
📚 Learning: 2025-08-19T21:22:13.125ZApplied to files:
📚 Learning: 2025-03-19T16:54:58.657ZApplied to files:
📚 Learning: 2025-09-17T15:15:24.269ZApplied to files:
📚 Learning: 2025-09-17T15:16:16.192ZApplied to files:
📚 Learning: 2025-04-13T20:41:56.613ZApplied to files:
📚 Learning: 2025-04-03T13:03:16.558ZApplied to files:
📚 Learning: 2025-08-15T20:49:30.223ZApplied to files:
📚 Learning: 2025-06-04T10:09:28.732ZApplied to files:
📚 Learning: 2025-06-13T12:18:03.539ZApplied to files:
📚 Learning: 2025-03-30T18:22:11.939ZApplied to files:
📚 Learning: 2025-11-28T02:24:17.418ZApplied to files:
📚 Learning: 2025-04-04T10:52:41.546ZApplied to files:
📚 Learning: 2025-09-03T17:11:54.474ZApplied to files:
📚 Learning: 2025-08-25T10:51:08.068ZApplied to files:
📚 Learning: 2025-04-25T20:27:59.086ZApplied to files:
📚 Learning: 2025-04-04T10:52:41.546ZApplied to files:
📚 Learning: 2025-08-19T19:47:21.735ZApplied to files:
📚 Learning: 2025-12-07T18:09:57.513ZApplied to files:
📚 Learning: 2025-05-01T19:13:44.664ZApplied to files:
📚 Learning: 2025-09-18T00:32:25.031ZApplied to files:
📚 Learning: 2025-09-14T16:03:13.558ZApplied to files:
📚 Learning: 2025-08-19T21:00:47.849ZApplied to files:
📚 Learning: 2025-03-30T20:18:46.006ZApplied to files:
📚 Learning: 2025-10-03T17:46:23.800ZApplied to files:
📚 Learning: 2025-09-14T16:05:55.205ZApplied to files:
📚 Learning: 2025-05-06T13:01:22.693ZApplied to files:
📚 Learning: 2025-09-14T04:44:28.854ZApplied to files:
📚 Learning: 2025-09-10T16:17:30.428ZApplied to files:
📚 Learning: 2025-12-15T22:50:33.654ZApplied to files:
🧬 Code graph analysis (1)holidays/countries/azerbaijan.py (5)
⏰ 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). (4)
🔇 Additional comments (3)
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. Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #3207 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 307 307
Lines 18309 18309
Branches 2337 2337
=========================================
Hits 18309 18309 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
snapshots/countries/AZ_COMMON.json (1)
976-982: Add 2033 observed reallocation dates to regression tests.The test file already recognizes 2033 as special (checking for 4 Islamic holidays), but lacks explicit assertions for the observed date cascade. Add
"2033-01-04","2033-01-05", and"2033-01-06"to theobs_dtstuple intest_new_years_dayto prevent regression of this multi-day observed reallocation pattern.holidays/countries/azerbaijan.py (2)
209-229: Document why 2026 is marked as "confirmed" for Islamic dates.Setting
EID_AL_*_DATES_CONFIRMED_YEARSto (2002, 2026) marks years 2020–2026 as confirmed since explicit dates only cover through 2019. Confirm this is backed by verified sources (e.g., sosial.gov.az government calendar) and add an inline comment explaining the justification. Without documentation, the 2026 extension appears speculative rather than verified.
165-177: Separate observed holiday handling for Bayram dates to avoid unintended rule application.Currently,
_populate_observed(dts_observed.union(dts_bairami), multiple=True)applies the default observed rule to all holidays on Bayram dates, then lines 171–177 attempt to applyWORKDAY_TO_NEXT_WORKDAYspecifically to Bayram holidays. This could cause special or substituted holidays that coincide with Bayram dates to receive unintended observed shifts. Observedts_observedwith the default rule, then manually loop throughdts_bairamiand add observed versions only for Bayram names usingWORKDAY_TO_NEXT_WORKDAY.Proposed fix (filter observed-by-name for Bayram dates)
# Article 105 of the Labor Code of the Republic of Azerbaijan states: # 5. If interweekly rest days and holidays that are not considered working days overlap, # that rest day is immediately transferred to the next working day. if self.observed and self._year >= 2006: - self._populate_observed(dts_observed.union(dts_bairami), multiple=True) + # Observe "standard" observed holidays as usual. + self._populate_observed(dts_observed, multiple=True) + + # Observe Bayram holidays by name to avoid accidentally observing other + # holidays that happen to share the same date. + bayrami_names = (self.tr("Qurban bayrami"), self.tr("Ramazan bayrami")) + for dt in sorted(dts_bairami): + if not self._is_observed(dt): + continue + for holiday_name in self.get_list(dt): + if any(bayrami_name in holiday_name for bayrami_name in bayrami_names): + self._add_observed(dt, holiday_name) - bayrami_names = (self.tr("Qurban bayrami"), self.tr("Ramazan bayrami")) # 6. If the holidays of Qurban and Ramadan coincide with another holiday # that is not considered a working day, the next working day is considered a rest day. for dt_observed in sorted(dts_bairami.difference(dts_non_observed)): if len(dt_holidays := self.get_list(dt_observed)) == 1: continue for holiday_name in dt_holidays: if any(bayrami_name in holiday_name for bayrami_name in bayrami_names): self._add_observed(dt_observed, holiday_name, rule=WORKDAY_TO_NEXT_WORKDAY)
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
holidays/countries/azerbaijan.pysnapshots/countries/AZ_COMMON.json
🧰 Additional context used
🧠 Learnings (39)
📓 Common learnings
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2834
File: tests/financial/test_national_stock_exchange_of_india.py:342-360
Timestamp: 2025-08-30T12:52:58.539Z
Learning: In the NSE holidays implementation, assertLocalizedHolidays should only include holidays that are actually observed (trading holidays), not holidays that fall on weekends and are excluded by the observed_rule. For example, Eid al-Fitr 2023 falls on Saturday and is correctly excluded from localization tests.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2398
File: holidays/countries/guinea.py:106-110
Timestamp: 2025-04-04T10:52:41.546Z
Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are properly covered by the test_eid_al_fitr_day() method, which tests both the regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: holidays/countries/south_africa.py:69-75
Timestamp: 2025-09-14T07:26:25.431Z
Learning: When reviewing historical holiday implementations in the vacanza/holidays repository, trust the maintainers' research and implementation decisions for specific historical edge cases, especially when they can provide sources like Wikipedia or other historical documentation that supports unusual or complex date calculation rules during specific time periods.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_french_polynesia.py:19-22
Timestamp: 2025-11-08T05:09:56.159Z
Learning: In the vacanza/holidays project's test framework (PR #2881 onwards), the base class CommonCountryTests provides a default test_no_holidays implementation that automatically tests years=start_year - 1 for standard PUBLIC category cases. Individual country test files should only override test_no_holidays when the country supports additional non-PUBLIC categories (GOVERNMENT, WORKDAY, OPTIONAL, etc.) with different start years requiring separate validation.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2822
File: holidays/countries/azerbaijan.py:170-170
Timestamp: 2025-08-15T20:49:30.223Z
Learning: In Azerbaijan's Labor Code, there is a legal distinction between holidays (Article 105) and days of remembrance (Article 106). Martyrs' Day (January 20) is a day of remembrance under Article 106, not a holiday, which affects how Bayram rollover rules apply when they coincide - §105(6) rollover rules don't apply to days of remembrance.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2398
File: holidays/countries/guinea.py:106-110
Timestamp: 2025-04-04T10:52:41.546Z
Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are covered by the test_eid_al_fitr_day() method, which tests both regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2777
File: holidays/countries/gambia.py:120-122
Timestamp: 2025-08-03T13:48:11.910Z
Learning: When reviewing holiday implementations in the holidays library, defer to the maintainers' choice of start years for specific holiday policies, as they likely have access to more reliable primary sources and official documentation than what can be found through web searches.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2831
File: holidays/countries/south_sudan.py:84-88
Timestamp: 2025-08-19T21:22:13.125Z
Learning: In the holidays library, message comments directly above holiday addition methods must match the holiday name exactly without any additions, modifications, or explanatory text. For example, if the holiday name is "Eid al-Fitr Holiday", the comment should be "# Eid al-Fitr Holiday." with no extra context.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2623
File: holidays/countries/christmas_island.py:110-112
Timestamp: 2025-07-09T20:27:37.760Z
Learning: In Christmas Island, ANZAC Day (April 25) follows the same observed holiday rules as other holidays, using the SAT_SUN_TO_NEXT_MON rule to move to Monday when it falls on a weekend. The implementation correctly uses `_add_observed` wrapper around `_add_anzac_day`.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2928
File: holidays/countries/algeria.py:143-154
Timestamp: 2025-09-16T04:16:10.671Z
Learning: When reviewing holiday implementations, always verify the actual legal text or official sources before making assumptions about holiday durations. Traditional religious observance patterns do not necessarily reflect what national laws specify for public holidays.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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: KJhellico
Repo: vacanza/holidays PR: 2831
File: holidays/countries/south_sudan.py:84-88
Timestamp: 2025-08-19T21:00:47.849Z
Learning: In the holidays library, Islamic holidays use dedicated methods for additional days (like `_add_eid_al_fitr_day_two`, `_add_eid_al_adha_day_two`) rather than parameters. The methods don't accept a `days` parameter - each day has its own specific method.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 3088
File: tests/countries/test_gabon.py:88-110
Timestamp: 2025-11-28T02:24:17.418Z
Learning: For Gabon's holiday implementation (tests/countries/test_gabon.py), all Islamic holiday dates are currently estimates. Therefore, the correct test pattern is to use assertIslamicNoEstimatedHolidayName for both specific known dates and the full range (e.g., test_eid_al_fitr and test_eid_al_adha), rather than using assertHolidayName for specific dates followed by assertIslamicNoEstimatedHolidayName for the range.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2981
File: holidays/calendars/islamic.py:3987-4003
Timestamp: 2025-10-03T17:46:23.800Z
Learning: In the holidays library Islamic calendar implementation with calendar_shift feature, CONFIRMED_YEARS represents years where the base Umm al-Qura calculation plus the calendar_shift has been verified as correct, while confirmed_dates contains explicit dates that should not be shifted. Years within CONFIRMED_YEARS but not in the explicit date dictionaries will use the base Umm al-Qura algorithm with the calendar_shift applied and be marked as "confirmed" rather than "estimated".
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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
Repo: vacanza/holidays PR: 2869
File: tests/countries/test_bosnia_and_herzegovina.py:233-237
Timestamp: 2025-08-28T12:20:40.635Z
Learning: In Bosnia and Herzegovina's holiday implementation, 2022-05-03 serves as both an observed Labor Day and the second day of Eid al-Fitr, creating holiday overlaps that need to be considered when testing observed dates.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2653
File: holidays/locale/th/LC_MESSAGES/TW.po:17-21
Timestamp: 2025-06-21T18:06:50.027Z
Learning: KJhellico's username includes a tilde character (~) as part of their nickname (appears as "~Jhellico" in Last-Translator headers), which is intentional formatting and not an error.
📚 Learning: 2025-04-03T05:59:57.480Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.
Applied to files:
snapshots/countries/AZ_COMMON.json
📚 Learning: 2025-03-29T15:15:05.919Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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:
snapshots/countries/AZ_COMMON.jsonholidays/countries/azerbaijan.py
📚 Learning: 2025-06-19T02:34:18.382Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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:
snapshots/countries/AZ_COMMON.jsonholidays/countries/azerbaijan.py
📚 Learning: 2025-06-19T02:34:14.456Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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.
Applied to files:
snapshots/countries/AZ_COMMON.jsonholidays/countries/azerbaijan.py
📚 Learning: 2025-03-19T16:53:00.375Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2354
File: holidays/countries/fiji.py:185-188
Timestamp: 2025-03-19T16:53:00.375Z
Learning: In the Fiji holidays implementation, the `special_public_holidays_observed` dictionary in `FijiStaticHolidays` is only used for exceptions to the normal observance rules, not for documenting all holidays. Only 2019's Constitution Day needed a special entry as it didn't follow the standard patterns.
Applied to files:
snapshots/countries/AZ_COMMON.jsonholidays/countries/azerbaijan.py
📚 Learning: 2025-08-22T19:06:04.303Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2850
File: holidays/countries/christmas_island.py:75-80
Timestamp: 2025-08-22T19:06:04.303Z
Learning: Christmas Island's docstring for the `islamic_show_estimated` parameter follows the exact same format used consistently across all countries with Islamic holidays in the codebase: "Whether to add 'estimated' label to Islamic holidays name if holiday date is estimated." This is the standard, established pattern and should not be changed.
Applied to files:
snapshots/countries/AZ_COMMON.jsonholidays/countries/azerbaijan.py
📚 Learning: 2025-04-13T19:10:31.502Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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:
snapshots/countries/AZ_COMMON.jsonholidays/countries/azerbaijan.py
📚 Learning: 2025-08-28T02:34:11.657Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2860
File: holidays/groups/eastern.py:36-36
Timestamp: 2025-08-28T02:34:11.657Z
Learning: The default estimated_label change from "%s (estimated)" to "%s" in holidays/groups/eastern.py is intentional to remove English-only fallback text from localized holiday names. Countries that need estimated labels should define them properly with localization support rather than relying on the English fallback.
Applied to files:
snapshots/countries/AZ_COMMON.json
📚 Learning: 2025-09-28T05:42:12.777Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_indonesia.py:221-223
Timestamp: 2025-09-28T05:42:12.777Z
Learning: In tests/countries/test_indonesia.py, the manual set inclusion checks using get_named and years_found for Lunar New Year (test_lunar_new_year) and Vesak Day (test_vesak_day) are intentional and should remain until both holidays get their own `{insert}_no_estimated` flags implemented, rather than using standard harness assertions like assertHolidayName/assertNoHolidayName.
Applied to files:
snapshots/countries/AZ_COMMON.json
📚 Learning: 2025-08-19T21:22:13.125Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2831
File: holidays/countries/south_sudan.py:84-88
Timestamp: 2025-08-19T21:22:13.125Z
Learning: In the holidays library, message comments directly above holiday addition methods must match the holiday name exactly without any additions, modifications, or explanatory text. For example, if the holiday name is "Eid al-Fitr Holiday", the comment should be "# Eid al-Fitr Holiday." with no extra context.
Applied to files:
snapshots/countries/AZ_COMMON.json
📚 Learning: 2025-03-19T16:54:58.657Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.
Applied to files:
snapshots/countries/AZ_COMMON.jsonholidays/countries/azerbaijan.py
📚 Learning: 2025-09-17T15:15:24.269Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2944
File: holidays/countries/myanmar.py:112-121
Timestamp: 2025-09-17T15:15:24.269Z
Learning: The Myanmar government's "continuous public days for 2024-2025" policy specifically covers Tabaung and Tazaungmon full moon days by bridging gaps with weekends, but does not apply to Myanmar New Year (Thingyan) extra days, which follow a separate policy that correctly uses `self._year >= 2024`.
Applied to files:
snapshots/countries/AZ_COMMON.json
📚 Learning: 2025-09-17T15:16:16.192Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2944
File: holidays/countries/myanmar.py:183-191
Timestamp: 2025-09-17T15:16:16.192Z
Learning: The special_public_holidays formatting pattern in the holidays codebase follows a consistent convention: single entries per year use flat tuple format like `2024: (MONTH, DAY, name)`, while multiple entries per year use tuple-of-tuples format like `2024: ((MONTH, DAY, name), (MONTH, DAY, name))`. This pattern is used consistently across all countries.
Applied to files:
snapshots/countries/AZ_COMMON.jsonholidays/countries/azerbaijan.py
📚 Learning: 2025-04-13T20:41:56.613Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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:
snapshots/countries/AZ_COMMON.jsonholidays/countries/azerbaijan.py
📚 Learning: 2025-04-03T13:03:16.558Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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:
snapshots/countries/AZ_COMMON.json
📚 Learning: 2025-08-15T20:49:30.223Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2822
File: holidays/countries/azerbaijan.py:170-170
Timestamp: 2025-08-15T20:49:30.223Z
Learning: In Azerbaijan's Labor Code, there is a legal distinction between holidays (Article 105) and days of remembrance (Article 106). Martyrs' Day (January 20) is a day of remembrance under Article 106, not a holiday, which affects how Bayram rollover rules apply when they coincide - §105(6) rollover rules don't apply to days of remembrance.
Applied to files:
snapshots/countries/AZ_COMMON.jsonholidays/countries/azerbaijan.py
📚 Learning: 2025-06-04T10:09:28.732Z
Learnt from: Wasif-Shahzad
Repo: vacanza/holidays PR: 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/azerbaijan.py
📚 Learning: 2025-06-13T12:18:03.539Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2614
File: holidays/countries/guyana.py:78-90
Timestamp: 2025-06-13T12:18:03.539Z
Learning: The holidays codebase now uses the constructor signature pattern `__init__(self, *args, islamic_show_estimated: bool = True, **kwargs)` across country classes.
Applied to files:
holidays/countries/azerbaijan.py
📚 Learning: 2025-03-30T18:22:11.939Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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/azerbaijan.py
📚 Learning: 2025-11-28T02:24:17.418Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 3088
File: tests/countries/test_gabon.py:88-110
Timestamp: 2025-11-28T02:24:17.418Z
Learning: For Gabon's holiday implementation (tests/countries/test_gabon.py), all Islamic holiday dates are currently estimates. Therefore, the correct test pattern is to use assertIslamicNoEstimatedHolidayName for both specific known dates and the full range (e.g., test_eid_al_fitr and test_eid_al_adha), rather than using assertHolidayName for specific dates followed by assertIslamicNoEstimatedHolidayName for the range.
Applied to files:
holidays/countries/azerbaijan.py
📚 Learning: 2025-04-04T10:52:41.546Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2398
File: holidays/countries/guinea.py:106-110
Timestamp: 2025-04-04T10:52:41.546Z
Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are 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:
holidays/countries/azerbaijan.py
📚 Learning: 2025-09-03T17:11:54.474Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: holidays/countries/algeria.py:16-22
Timestamp: 2025-09-03T17:11:54.474Z
Learning: In Algeria's holidays implementation, Islamic holidays (like Eid al-Fitr, Eid al-Adha, Mawlid, etc.) are categorized as PUBLIC holidays rather than ISLAMIC category holidays, since they are national public holidays for all citizens. The country inherits from IslamicHolidays but only implements _populate_public_holidays() method, with all Islamic holidays added there instead of having a separate _populate_islamic_holidays() method.
Applied to files:
holidays/countries/azerbaijan.py
📚 Learning: 2025-08-25T10:51:08.068Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2831
File: holidays/countries/south_sudan.py:21-30
Timestamp: 2025-08-25T10:51:08.068Z
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/azerbaijan.py
📚 Learning: 2025-04-25T20:27:59.086Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2402
File: holidays/countries/trinidad_and_tobago.py:85-92
Timestamp: 2025-04-25T20:27:59.086Z
Learning: The `_populate_observed` method in holiday classes should maintain the same signature as the parent class `ObservedHolidayBase`, even if specific child class implementations don't use all parameters.
Applied to files:
holidays/countries/azerbaijan.py
📚 Learning: 2025-04-04T10:52:41.546Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2398
File: holidays/countries/guinea.py:106-110
Timestamp: 2025-04-04T10:52:41.546Z
Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are covered by the test_eid_al_fitr_day() method, which tests both regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).
Applied to files:
holidays/countries/azerbaijan.py
📚 Learning: 2025-08-19T19:47:21.735Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2829
File: tests/countries/test_canada.py:291-296
Timestamp: 2025-08-19T19:47:21.735Z
Learning: In the holidays library, HolidayBase objects automatically populate years on-demand when expand=True (the default). When checking dates from years not initially in the years range, those years are automatically populated via the logic at line 646 in holiday_base.py: "if self.expand and dt.year not in self.years:". This means tests can check dates outside the initial year range without needing separate holiday instances.
Applied to files:
holidays/countries/azerbaijan.py
📚 Learning: 2025-12-07T18:09:57.513Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 3111
File: holidays/financial/ny_stock_exchange.py:63-65
Timestamp: 2025-12-07T18:09:57.513Z
Learning: In the NYSE holidays implementation (holidays/financial/ny_stock_exchange.py), the _add_observed method unconditionally overrides kwargs["rule"] based on the date's year because _move_holiday calls _add_observed with rule=None, and this None value needs to be replaced with the appropriate year-based rule (SUN_TO_NEXT_MON for years <= 1952, otherwise the class's observed_rule).
Applied to files:
holidays/countries/azerbaijan.py
📚 Learning: 2025-05-01T19:13:44.664Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2386
File: holidays/countries/nepal.py:203-208
Timestamp: 2025-05-01T19:13:44.664Z
Learning: Multiple holidays on the same date are properly handled in the holidays library. When multiple `_add_...` methods are called with different holiday names for the same date, both holidays are preserved rather than the latter overwriting the former. This happens because the `__setitem__` method in `HolidayBase` merges multiple holidays on the same date by combining their names.
Applied to files:
holidays/countries/azerbaijan.py
📚 Learning: 2025-09-18T00:32:25.031Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2944
File: tests/countries/test_myanmar.py:32-39
Timestamp: 2025-09-18T00:32:25.031Z
Learning: Myanmar holidays implementation uses StaticHolidays with special_public_holidays for government-declared substitutions/bridging days, not ObservedHolidayBase for weekend-to-weekday shifting. Myanmar's substituted holidays are always present and don't have observed=False functionality.
Applied to files:
holidays/countries/azerbaijan.py
📚 Learning: 2025-09-14T16:03:13.558Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_barbados.py:21-23
Timestamp: 2025-09-14T16:03:13.558Z
Learning: In tests/countries/test_barbados.py, using years_non_observed=range(2000, 2024) is intentional because all observed holiday examples fall within 2001-2023, making this range appropriate for limiting testing to years where observed holidays actually exist in the test data.
Applied to files:
holidays/countries/azerbaijan.py
📚 Learning: 2025-08-19T21:00:47.849Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2831
File: holidays/countries/south_sudan.py:84-88
Timestamp: 2025-08-19T21:00:47.849Z
Learning: In the holidays library, Islamic holidays use dedicated methods for additional days (like `_add_eid_al_fitr_day_two`, `_add_eid_al_adha_day_two`) rather than parameters. The methods don't accept a `days` parameter - each day has its own specific method.
Applied to files:
holidays/countries/azerbaijan.py
📚 Learning: 2025-03-30T20:18:46.006Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2386
File: holidays/countries/nepal.py:24-26
Timestamp: 2025-03-30T20:18:46.006Z
Learning: In the holidays library, country classes do not directly implement `_populate()`. Instead, they implement specialized methods like `_populate_public_holidays()`, and the base class `HolidayBase` handles the orchestration by calling these specialized methods.
Applied to files:
holidays/countries/azerbaijan.py
📚 Learning: 2025-10-03T17:46:23.800Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2981
File: holidays/calendars/islamic.py:3987-4003
Timestamp: 2025-10-03T17:46:23.800Z
Learning: In the holidays library Islamic calendar implementation with calendar_shift feature, CONFIRMED_YEARS represents years where the base Umm al-Qura calculation plus the calendar_shift has been verified as correct, while confirmed_dates contains explicit dates that should not be shifted. Years within CONFIRMED_YEARS but not in the explicit date dictionaries will use the base Umm al-Qura algorithm with the calendar_shift applied and be marked as "confirmed" rather than "estimated".
Applied to files:
holidays/countries/azerbaijan.py
📚 Learning: 2025-09-14T16:05:55.205Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_iran.py:28-28
Timestamp: 2025-09-14T16:05:55.205Z
Learning: In tests/countries/test_iran.py, using years=(self.start_year - 1, 2102) in the no-holiday test is intentional because Iran uses the Persian Calendar which has specific supported year range constraints, and 2102 represents the upper limit of the Persian Calendar's supported range, not just an arbitrary far-future date.
Applied to files:
holidays/countries/azerbaijan.py
📚 Learning: 2025-05-06T13:01:22.693Z
Learnt from: Wasif-Shahzad
Repo: vacanza/holidays PR: 2522
File: holidays/countries/yemen.py:158-163
Timestamp: 2025-05-06T13:01:22.693Z
Learning: In the holidays library, the RAMADAN_BEGINNING_DATES dictionary in country-specific Islamic holiday classes (like YemenIslamicHolidays) is used indirectly through the backend. When a country class calls _add_holiday_29_ramadan(), the IslamicHolidays implementation uses the country's custom calendar dates to calculate the 29th day of Ramadan by adding 28 days to the beginning date.
Applied to files:
holidays/countries/azerbaijan.py
📚 Learning: 2025-09-14T04:44:28.854Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_indonesia.py:22-22
Timestamp: 2025-09-14T04:44:28.854Z
Learning: In Indonesia's holidays implementation, observed holidays are only available in years 2004 and 2020 due to presidential decrees, so years_non_observed=(2004, 2020) should be passed as a tuple of discrete years rather than a range.
Applied to files:
holidays/countries/azerbaijan.py
📚 Learning: 2025-09-10T16:17:30.428Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_bosnia_and_herzegovina.py:21-24
Timestamp: 2025-09-10T16:17:30.428Z
Learning: Bosnia and Herzegovina holidays implementation currently lacks a start_year attribute. In tests/countries/test_bosnia_and_herzegovina.py, using cls.full_range = range(2000, 2050) is intentional to bound assertions and setup. Do not suggest replacing it with harness default full_range until start_year is introduced.
Applied to files:
holidays/countries/azerbaijan.py
📚 Learning: 2025-12-15T22:50:33.654Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 3135
File: holidays/countries/united_states.py:1175-1178
Timestamp: 2025-12-15T22:50:33.654Z
Learning: In the holidays library (vacanza/holidays), for Puerto Rico and potentially other US territories, maintain the documented separation: place Spanish holiday name comments on one line, followed by a blank line, and then the English localization comment. Do not remove the blank line separator, as it documents the Spanish name (e.g., 'Día de la Abolición de la Esclavitud') while the English name below (e.g., 'Emancipation Day') is the actual localization.
Applied to files:
holidays/countries/azerbaijan.py
🧬 Code graph analysis (1)
holidays/countries/azerbaijan.py (5)
holidays/countries/bulgaria.py (1)
_populate_observed(67-78)holidays/observed_holiday_base.py (1)
_populate_observed(219-230)holidays/countries/rwanda.py (1)
_populate_observed(63-80)holidays/countries/trinidad_and_tobago.py (1)
_populate_observed(90-97)holidays/countries/tanzania.py (1)
_populate_observed(139-164)
⏰ 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). (4)
- GitHub Check: Test Python 3.13 on windows-latest
- GitHub Check: Test Python 3.10 on windows-latest
- GitHub Check: Test Python 3.11 on windows-latest
- GitHub Check: Test Python 3.14 on windows-latest
🔇 Additional comments (3)
holidays/countries/azerbaijan.py (1)
30-35: Refs update looks fine; keep links verifiable long-term.
Ordering stays “Wikipedia first”, which matches project conventions. Just ensure both new archive snapshots are stable/accessible.snapshots/countries/AZ_COMMON.json (2)
1116-1121: 2037 observed split/merge looks plausible under per-holiday observed behavior.
Given the density of holidays here, I’d just like confirmation that this came from running the snapshot tooling against the updated observed logic (not manual editing).
772-791: Snapshot is legitimately auto-generated; no changes needed.The snapshot reflects the
multiple=Trueflag behavior in Azerbaijan's_populate_observed()call. When multiple holidays share a date, each gets its own observed entry—so Eid al-Fitr gets separate observed dates (03-25, 03-30) even though it overlaps with Spring Festival. This is deterministic output from the source code, regenerated byscripts/generate_snapshots.py(documented in Makefile). The combined labels with semicolons are correct per the framework's multi-holiday handling.



Proposed change
Update Azerbaijan holidays:
Type of change
holidaysfunctionality in general)Checklist
make checklocally; all checks and tests passed.