+
Skip to content

Conversation

PPsyrius
Copy link
Collaborator

Proposed change

  • Add CHRISTIAN, HEBREW category supported as outlined in Loi n° 63-278 du 26 juillet 1963.
  • Update reference to include all the actual holiday law wording.
  • Full test case refactor.

This is part of the non-test case changes decoupling from #2881

Type of change

  • New country/market holidays support (thank you!)
  • Supported country/market holidays update (calendar discrepancy fix, localization)
  • Existing code/documentation/test/process quality improvement (best practice, cleanup, refactoring, optimization)
  • Dependency update (version deprecation/pin/upgrade)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (a code change causing existing functionality to break)
  • New feature (new holidays functionality in general)

Checklist

Copy link
Contributor

coderabbitai bot commented Sep 15, 2025

Warning

Rate limit exceeded

@PPsyrius has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 34 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 76a48bd and 31cb05b.

📒 Files selected for processing (1)
  • tests/countries/test_algeria.py (1 hunks)

Summary by CodeRabbit

  • New Features
    • Algeria: Added Christian and Hebrew holidays alongside existing calendars; expanded holiday coverage (e.g., Easter Monday, Ascension, Whit Monday, Assumption, Christmas, Rosh Hashanah, Yom Kippur, Pesach).
    • Refined public holiday rules (e.g., Independence Day naming by era, extra Eid days in specific years).
  • Localization
    • Updated Arabic orthography and added AR/EN/FR translations for new holidays; revised several existing names (e.g., Independence Day, Amazigh New Year).
  • Documentation
    • README now lists Algeria’s supported categories (CHRISTIAN, HEBREW).
  • Tests
    • Expanded multi-year, multi-locale coverage and category-filter scenarios.

Walkthrough

Algeria country module gains Christian and Hebrew holiday calendars, a start year and supported categories; public holiday rules and multi-day Eid logic adjusted. Locale PO files updated; snapshot data significantly expanded (up to 2050). Tests extended to cover multi-calendar, multi-year, and localization cases.

Changes

Cohort / File(s) Summary
Docs
README.md
Updated Algeria Supported Categories to "CHRISTIAN, HEBREW".
Country implementation
holidays/countries/algeria.py
Added mixins ChristianHolidays, HebrewCalendarHolidays; added start_year = 1964, supported_categories = (CHRISTIAN, HEBREW, PUBLIC); new _populate_christian_holidays and _populate_hebrew_holidays; refactored _populate_public_holidays (year gates, renamed Independence labels, multi-day Eid/Adha rules); __init__ extended to initialize new mixins and accept years.
Locales — Arabic
holidays/locale/ar/LC_MESSAGES/DZ.po
Metadata bump; orthography normalization for Independence; added msgids for Christian and Hebrew holidays and new Independence/FLN label (msgstrs mostly empty).
Locales — English (US)
holidays/locale/en_US/LC_MESSAGES/DZ.po
Metadata bump; corrected Arabic msgid; added English translations for new Christian and Hebrew holidays and "Independence and National Liberation Front Day".
Locales — French
holidays/locale/fr/LC_MESSAGES/DZ.po
Metadata bump; updated French translations; added entries for Christian/Hebrew holidays and "Fête de l'Indépendance et du F.L.N."; adjusted several existing strings.
Snapshots / Data
snapshots/countries/DZ_COMMON.json
Large expansion of DZ snapshot data (extended year range to 1950–2050); added Christian and Hebrew holidays, many multi-holiday same-date entries, and renamed Independence entries.
Tests
tests/countries/test_algeria.py
Expanded test coverage across years (1964–2050), added category-filtered instantiations, islamic_show_estimated=False checks, many per-holiday assertions (Christian, Hebrew, Islamic, public), and updated localization expectations.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Suggested reviewers

  • arkid15r
  • KJhellico

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title accurately and concisely summarizes the primary change—adding the CHRISTIAN and HEBREW supported categories for Algeria—and directly reflects the modifications in holidays/countries/algeria.py, tests, and locale updates. It is specific, on-topic, and free of noisy or misleading content. This makes it suitable for a teammate scanning the project history.
Description Check ✅ Passed The PR description clearly states the main objectives—adding CHRISTIAN and HEBREW categories, updating legal references, and performing a full test refactor—and notes that local checks were run; these points align with the file-level changes in the patch (algeria.py, locale PO files, snapshots, and tests). The content is related to the changeset and not off-topic. Given the lenient criteria for this check, it passes.

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

❤️ Share

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

Copy link

codecov bot commented Sep 15, 2025

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2928   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          296       296           
  Lines        17596     17612   +16     
  Branches      2270      2269    -1     
=========================================
+ Hits         17596     17612   +16     

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

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

@KJhellico KJhellico changed the title Refactor Algeria Holidays: add CHRISTIAN, HEBREW supported categories Update Algeria holidays: add CHRISTIAN, HEBREW supported categories Sep 15, 2025
@PPsyrius PPsyrius requested a review from KJhellico September 16, 2025 03:57
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

♻️ Duplicate comments (1)
holidays/countries/algeria.py (1)

107-114: Eid al‑Fitr days — OK; verify year gate for Day 3.

Single name across days is correct (matches prior guidance).

Algeria "Loi n° 23-10 du 8 Dhou El Hidja 1444": from which Gregorian year is the 3rd day of Eid al‑Fitr a legal holiday in Algeria?
#!/bin/bash
# Sanity: ensure helper exists in codebase.
rg -nP 'def\s+_add_eid_al_fitr_day_three\(' holidays/groups -C2
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1b9c5fa and a2521d0.

📒 Files selected for processing (6)
  • holidays/countries/algeria.py (4 hunks)
  • holidays/locale/ar/LC_MESSAGES/DZ.po (3 hunks)
  • holidays/locale/en_US/LC_MESSAGES/DZ.po (3 hunks)
  • holidays/locale/fr/LC_MESSAGES/DZ.po (2 hunks)
  • snapshots/countries/DZ_COMMON.json (1 hunks)
  • tests/countries/test_algeria.py (1 hunks)
🧰 Additional context used
🧠 Learnings (52)
📓 Common learnings
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: holidays/locale/fr/LC_MESSAGES/DZ.po:37-41
Timestamp: 2025-09-03T17:10:35.672Z
Learning: In Algerian French localization (holidays/locale/fr/LC_MESSAGES/DZ.po), capitalization should follow Algerian source-accurate conventions rather than standard French orthographic rules. For example, "Jour de l'An Grégorien" with capital "G" is correct for Algerian usage, even though standard French would typically use lowercase "grégorien".
Learnt from: PPsyrius
PR: vacanza/holidays#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.
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: holidays/locale/fr/LC_MESSAGES/DZ.po:112-114
Timestamp: 2025-09-03T17:11:01.030Z
Learning: In Algerian French localization (holidays/locale/fr/LC_MESSAGES/DZ.po), transliteration of foreign terms follows Algerian source-accurate conventions rather than standard French forms. For example, "Youm Kippour" is correct for Algerian French usage, even though standard French would typically use "Yom Kippour".
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: holidays/locale/fr/LC_MESSAGES/DZ.po:108-110
Timestamp: 2025-09-03T17:10:47.327Z
Learning: In Algeria French localization (DZ.po), "Roch Achana" is the correct Algerian French transliteration for "رأس السنة العبرية" (Rosh Hashanah), not the standard French "Roch Hachana". Regional French variants in the holidays library use locale-specific transliterations rather than standard French forms.
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: holidays/countries/algeria.py:33-40
Timestamp: 2025-09-03T17:53:29.103Z
Learning: For Algeria's holidays implementation, the Google Drive links in the legal references are the official government sources redirected from https://portailjuridique.esi.dz/français/fêtes-et-congés-légales. These should be kept as-is when properly archived via Wayback Machine, as they represent the actual official documents served by the Algerian government portal.
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.
📚 Learning: 2025-09-03T17:11:54.474Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/algeria.py
  • snapshots/countries/DZ_COMMON.json
  • tests/countries/test_algeria.py
📚 Learning: 2025-06-13T12:18:03.539Z
Learnt from: PPsyrius
PR: vacanza/holidays#2614
File: holidays/countries/guyana.py:78-90
Timestamp: 2025-06-13T12:18:03.539Z
Learning: The holidays codebase now uses the constructor signature pattern `__init__(self, *args, islamic_show_estimated: bool = True, **kwargs)` across country classes.

Applied to files:

  • holidays/countries/algeria.py
  • tests/countries/test_algeria.py
📚 Learning: 2025-09-03T18:17:24.626Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: holidays/countries/algeria.py:46-49
Timestamp: 2025-09-03T18:17:24.626Z
Learning: In the holidays library, supported_categories tuples are ordered alphabetically rather than having PUBLIC listed first. For example, in Algeria's implementation, (CHRISTIAN, HEBREW, PUBLIC) follows alphabetical order and should not be reordered to put PUBLIC first.

Applied to files:

  • holidays/countries/algeria.py
📚 Learning: 2025-06-18T10:26:50.180Z
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/france.py:178-180
Timestamp: 2025-06-18T10:26:50.180Z
Learning: In the France holidays implementation, the _populate_subdiv_57_public_holidays() (Moselle) and _populate_subdiv_6ae_public_holidays() (Alsace) methods are functionally identical, both adding Good Friday (≥1893) and Saint Stephen's Day (≥1892) with the same legal references from August 16th, 1892. Therefore, for the deprecated "Alsace-Moselle" subdivision, calling either method produces the same result.

Applied to files:

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

Applied to files:

  • holidays/countries/algeria.py
📚 Learning: 2025-06-06T14:40:31.932Z
Learnt from: KJhellico
PR: vacanza/holidays#2593
File: holidays/countries/senegal.py:66-110
Timestamp: 2025-06-06T14:40:31.932Z
Learning: In the holidays library, within the _populate_public_holidays method, holidays should be arranged by calendar type (Islamic holidays first, then Gregorian holidays) without additional type grouping comments. The organization by calendar type is sufficient and follows the project's established conventions.

Applied to files:

  • holidays/countries/algeria.py
📚 Learning: 2025-06-18T10:58:28.058Z
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/france.py:184-206
Timestamp: 2025-06-18T10:58:28.058Z
Learning: In the holidays library France implementation, creating shared private methods between subdivision-specific holiday population methods (like _populate_subdiv_57_public_holidays and _populate_subdiv_6ae_public_holidays) is not supported by the current framework architecture, so duplicate code between functionally identical subdivision methods should be left as-is.

Applied to files:

  • holidays/countries/algeria.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/algeria.py
📚 Learning: 2025-09-03T17:53:29.103Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: holidays/countries/algeria.py:33-40
Timestamp: 2025-09-03T17:53:29.103Z
Learning: For Algeria's holidays implementation, the Google Drive links in the legal references are the official government sources redirected from https://portailjuridique.esi.dz/français/fêtes-et-congés-légales. These should be kept as-is when properly archived via Wayback Machine, as they represent the actual official documents served by the Algerian government portal.

Applied to files:

  • holidays/countries/algeria.py
📚 Learning: 2025-07-10T15:55:34.523Z
Learnt from: KJhellico
PR: vacanza/holidays#2706
File: holidays/countries/cayman_islands.py:50-55
Timestamp: 2025-07-10T15:55:34.523Z
Learning: The `islamic_show_estimated` parameter in country class constructors is only needed for countries that implement Islamic holidays (inherit from IslamicHolidays or _CustomIslamicHolidays groups). Countries with only Christian and secular holidays do not need this parameter.

Applied to files:

  • holidays/countries/algeria.py
📚 Learning: 2025-08-22T19:06:04.303Z
Learnt from: KJhellico
PR: vacanza/holidays#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:

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

Applied to files:

  • holidays/countries/algeria.py
  • tests/countries/test_algeria.py
📚 Learning: 2025-08-26T21:29:47.753Z
Learnt from: KJhellico
PR: vacanza/holidays#2860
File: tests/common.py:365-372
Timestamp: 2025-08-26T21:29:47.753Z
Learning: In the holidays library, countries with Islamic holidays inherit directly from the IslamicHolidays class (e.g., `class Afghanistan(HolidayBase, InternationalHolidays, IslamicHolidays)`). The separate `_CustomIslamicHolidays` classes (like `AfghanistanIslamicHolidays`) are helper classes for specific date data, not the main country classes. Therefore, `isinstance(holidays_instance, IslamicHolidays)` is sufficient to detect all countries with Islamic holidays.

Applied to files:

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

Applied to files:

  • holidays/countries/algeria.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/algeria.py
📚 Learning: 2025-09-14T16:05:55.181Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_iran.py:28-28
Timestamp: 2025-09-14T16:05:55.181Z
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/algeria.py
  • tests/countries/test_algeria.py
📚 Learning: 2025-09-03T17:10:35.672Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: holidays/locale/fr/LC_MESSAGES/DZ.po:37-41
Timestamp: 2025-09-03T17:10:35.672Z
Learning: In Algerian French localization (holidays/locale/fr/LC_MESSAGES/DZ.po), capitalization should follow Algerian source-accurate conventions rather than standard French orthographic rules. For example, "Jour de l'An Grégorien" with capital "G" is correct for Algerian usage, even though standard French would typically use lowercase "grégorien".

Applied to files:

  • holidays/countries/algeria.py
  • snapshots/countries/DZ_COMMON.json
  • holidays/locale/en_US/LC_MESSAGES/DZ.po
  • holidays/locale/fr/LC_MESSAGES/DZ.po
  • holidays/locale/ar/LC_MESSAGES/DZ.po
📚 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/algeria.py
📚 Learning: 2025-09-03T17:11:01.030Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: holidays/locale/fr/LC_MESSAGES/DZ.po:112-114
Timestamp: 2025-09-03T17:11:01.030Z
Learning: In Algerian French localization (holidays/locale/fr/LC_MESSAGES/DZ.po), transliteration of foreign terms follows Algerian source-accurate conventions rather than standard French forms. For example, "Youm Kippour" is correct for Algerian French usage, even though standard French would typically use "Yom Kippour".

Applied to files:

  • holidays/countries/algeria.py
  • holidays/locale/en_US/LC_MESSAGES/DZ.po
  • holidays/locale/fr/LC_MESSAGES/DZ.po
  • holidays/locale/ar/LC_MESSAGES/DZ.po
📚 Learning: 2025-06-19T02:34:14.456Z
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.

Applied to files:

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

Applied to files:

  • holidays/countries/algeria.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/DZ_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/DZ_COMMON.json
📚 Learning: 2025-06-28T10:39:19.185Z
Learnt from: KJhellico
PR: vacanza/holidays#2684
File: holidays/locale/it/LC_MESSAGES/SM.po:13-13
Timestamp: 2025-06-28T10:39:19.185Z
Learning: In the holidays project, .po file header comments use the format "# [Country] holidays." for default language files (without trailing hash) and "# [Country] holidays [locale] localization." for non-default language files (also without trailing hash).

Applied to files:

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

Applied to files:

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

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/DZ.po
  • holidays/locale/fr/LC_MESSAGES/DZ.po
  • holidays/locale/ar/LC_MESSAGES/DZ.po
📚 Learning: 2025-04-17T17:08:48.082Z
Learnt from: PPsyrius
PR: vacanza/holidays#2438
File: holidays/locale/ar_IQ/LC_MESSAGES/IQ.po:35-81
Timestamp: 2025-04-17T17:08:48.082Z
Learning: In holiday PO files, when the file represents the default language of an entity (e.g., ar_IQ for Iraq), no translations in `msgstr` are required as the `msgid` values are already in the target language.

Applied to files:

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

Applied to files:

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

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/DZ.po
  • holidays/locale/fr/LC_MESSAGES/DZ.po
  • holidays/locale/ar/LC_MESSAGES/DZ.po
📚 Learning: 2025-08-28T11:45:56.892Z
Learnt from: KJhellico
PR: vacanza/holidays#2860
File: holidays/countries/gabon.py:30-30
Timestamp: 2025-08-28T11:45:56.892Z
Learning: In the holidays library, maintainers have agreed to keep comments like "# %s (estimated)." above estimated_label declarations across country files, even though they duplicate the label content. This decision was made to maintain consistency and usefulness regardless of localization support status.

Applied to files:

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

Applied to files:

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

Applied to files:

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

Applied to files:

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

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/DZ.po
  • holidays/locale/fr/LC_MESSAGES/DZ.po
  • holidays/locale/ar/LC_MESSAGES/DZ.po
📚 Learning: 2025-07-08T10:21:37.055Z
Learnt from: KJhellico
PR: vacanza/holidays#2701
File: holidays/countries/palestine.py:122-122
Timestamp: 2025-07-08T10:21:37.055Z
Learning: In Palestine, Easter follows the same naming pattern as Christmas - both the first and second days of Easter have identical names for the respective religious groups (Catholic or Orthodox). The implementation correctly uses `_add_easter_sunday` for nationwide holidays and `_add_easter_monday` for group-specific second days, but both share the same Arabic name "عيد الفصح المجيد".

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/DZ.po
  • holidays/locale/ar/LC_MESSAGES/DZ.po
📚 Learning: 2025-08-13T10:36:16.943Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2791
File: holidays/locale/ar/LC_MESSAGES/SY.po:42-49
Timestamp: 2025-08-13T10:36:16.943Z
Learning: For Syrian Arabic holiday names in the holidays library, use the exact Arabic terminology from the Central Bank of Syria's official page rather than standardized Arabic calendar adjectives, to maintain consistency with official government sources.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/DZ.po
  • holidays/locale/ar/LC_MESSAGES/DZ.po
📚 Learning: 2025-08-19T21:22:13.125Z
Learnt from: KJhellico
PR: vacanza/holidays#2831
File: holidays/countries/south_sudan.py:84-88
Timestamp: 2025-08-19T21:22:13.125Z
Learning: In the holidays library, message comments directly above holiday addition methods must match the holiday name exactly without any additions, modifications, or explanatory text. For example, if the holiday name is "Eid al-Fitr Holiday", the comment should be "# Eid al-Fitr Holiday." with no extra context.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/DZ.po
  • holidays/locale/ar/LC_MESSAGES/DZ.po
📚 Learning: 2025-09-03T17:10:47.327Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: holidays/locale/fr/LC_MESSAGES/DZ.po:108-110
Timestamp: 2025-09-03T17:10:47.327Z
Learning: In Algeria French localization (DZ.po), "Roch Achana" is the correct Algerian French transliteration for "رأس السنة العبرية" (Rosh Hashanah), not the standard French "Roch Hachana". Regional French variants in the holidays library use locale-specific transliterations rather than standard French forms.

Applied to files:

  • holidays/locale/fr/LC_MESSAGES/DZ.po
📚 Learning: 2025-09-03T17:11:17.540Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: holidays/locale/fr/LC_MESSAGES/DZ.po:116-117
Timestamp: 2025-09-03T17:11:17.540Z
Learning: In Algerian French localization (holidays/locale/fr/LC_MESSAGES/DZ.po), "Pisah" is the correct transliteration for Pesach (عيد الفصح اليهودي), not the standard French "Pessa'h" or "Pessah". This follows the pattern of using Algerian-specific transliterations rather than standard French forms.

Applied to files:

  • holidays/locale/fr/LC_MESSAGES/DZ.po
📚 Learning: 2025-03-30T13:33:31.598Z
Learnt from: PPsyrius
PR: vacanza/holidays#2388
File: holidays/locale/fr/LC_MESSAGES/CI.po:28-101
Timestamp: 2025-03-30T13:33:31.598Z
Learning: In the holidays library, for localization files of the default language (like French for Ivory Coast in fr/LC_MESSAGES/CI.po), the best practice is to leave the message strings (msgstr) empty to avoid possible typos, since the message IDs (msgid) are already in the target language.

Applied to files:

  • holidays/locale/fr/LC_MESSAGES/DZ.po
  • holidays/locale/ar/LC_MESSAGES/DZ.po
📚 Learning: 2025-09-10T14:35:54.603Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_brazil.py:28-30
Timestamp: 2025-09-10T14:35:54.603Z
Learning: In the holidays project, the test_no_holidays method should test ALL supported_categories (via categories=CountryClass.supported_categories) rather than just the default PUBLIC category, to ensure comprehensive validation that no holidays exist before start_year across any supported category including OPTIONAL and subdivision categories.

Applied to files:

  • tests/countries/test_algeria.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_algeria.py
📚 Learning: 2025-09-14T16:03:13.496Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_barbados.py:21-23
Timestamp: 2025-09-14T16:03:13.496Z
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:

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

Applied to files:

  • tests/countries/test_algeria.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_algeria.py
📚 Learning: 2025-09-14T16:14:44.954Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_bulgaria.py:21-23
Timestamp: 2025-09-14T16:14:44.954Z
Learning: For Bulgaria in the holidays library, using years_non_observed=range(2017, 2030) in tests/countries/test_bulgaria.py is intentional because all observed holiday examples in the test data fall within this range (latest being 2029), making this range appropriate for limiting testing to years where observed holidays actually exist, improving both correctness and performance.

Applied to files:

  • tests/countries/test_algeria.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_algeria.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_algeria.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_algeria.py
🧬 Code graph analysis (2)
holidays/countries/algeria.py (2)
holidays/groups/christian.py (6)
  • ChristianHolidays (23-499)
  • _add_easter_monday (275-284)
  • _add_ascension_thursday (133-141)
  • _add_whit_monday (468-477)
  • _add_assumption_of_mary_day (162-180)
  • _add_christmas_day (224-232)
holidays/groups/hebrew.py (4)
  • HebrewCalendarHolidays (21-151)
  • _add_rosh_hashanah (97-110)
  • _add_yom_kippur (139-151)
  • _add_passover (69-81)
tests/countries/test_algeria.py (2)
holidays/countries/algeria.py (3)
  • Algeria (26-153)
  • DZ (156-157)
  • DZA (160-161)
tests/common.py (5)
  • TestCase (31-370)
  • assertAliases (124-133)
  • assertHolidayName (198-202)
  • assertNoHolidayName (305-307)
  • assertHolidayNameCount (258-260)
⏰ 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 (31)
snapshots/countries/DZ_COMMON.json (3)

13-19: Rename cutoff year sanity-check (1964 label looks right; confirm 2005 switch).

Pre‑2005 entries use “Independence and National Liberation Front Day” and later switch to “Independence Day”. Please confirm the legal rename/year boundary (2005-01-01) matches your cited source so the snapshot won’t drift from code/tests.


88-99: Multiple Eid cycles per Gregorian year are reflected; verify counts match code.

Years like 1968, 2000, 2033, 2039 show two Ramadan/Eid cycles (resulting in 4–6 entries). Ensure these align with Algeria._populate_public_holidays() rules and the test counts, so snapshot and logic remain consistent.

Also applies to: 1352-1355, 1461-1464


1-20: Confirm snapshot was auto‑generated (no manual edits).

Given the scale and added categories (CHRISTIAN/HEBREW), please re-run the generator (make snapshot) and commit the result to avoid hand‑edited drift.

Also applies to: 1120-1158, 1230-1243

holidays/locale/en_US/LC_MESSAGES/DZ.po (3)

17-21: PO metadata updates look good.
Version, revision date, translator, and generator changes are consistent.

Also applies to: 27-27


51-54: New “Independence and National Liberation Front Day” entry aligns with tests.

Labeling matches tests and snapshot; no action needed.


79-110: New CHRISTIAN/HEBREW translations are consistent.

Arabic msgids → English msgstrs read correctly and match test expectations.

holidays/locale/ar/LC_MESSAGES/DZ.po (3)

17-21: PO metadata updates OK.
Header fields are coherent for default language.

Also applies to: 27-27


48-53: Independence labels normalized.

Orthography fix to “عيد الاستقلال” and added pre‑2005 variant are correct.


79-109: New CHRISTIAN/HEBREW msgids with empty msgstr are correct for default locale.

Keeping msgstr empty in the default language file matches project conventions.

holidays/locale/fr/LC_MESSAGES/DZ.po (5)

17-21: PO metadata updates look good.
Matches other locales’ bumps.

Also applies to: 27-27


36-42: French “Jour de l’An Grégorien/Amazigh” matches DZ conventions.

Capitalization/transliteration follow prior decisions for Algerian FR.


48-54: Independence naming in FR aligns with snapshot/tests.

“Fête de l’Indépendance” and “Fête de l’Indépendance et du F.L.N.” are consistent.


59-62: Islamic labels OK in FR.

“Awal Moharram”, “El‑Mawlid Ennabawi Echarif”, “Aïd el‑Fitr/Adha” match project transliterations.

Also applies to: 71-78


79-110: New CHRISTIAN/HEBREW entries use agreed Algerian FR transliterations.

“Lundi de Pâques”, “Ascension”, “Lundi de Pentecôte”, “Assomption”, “Noël”, “Roch Achana”, “Youm Kippour”, “Pisah” match tests and learnings.

tests/countries/test_algeria.py (8)

23-28: Good test scaffolding for categories and estimated flags.

years range, category‑filtered instances, and islamic_show_estimated=False mirror library standards.


32-34: Solid pre‑start_year guard.

Covers all supported_categories for 1963.


48-55: Rename boundary check is explicit; please confirm source year.

Tests assume rename at 2005. If the law/date differs, adjust here and in snapshot.


101-134: Eid al‑Fitr per‑year counts: looks right; double‑check edge years (1968, 2000, 2033).

Counts for dual‑cycle years are tricky; a quick re-run against get_named(name) would be prudent.


135-175: Eid al‑Adha per‑year counts: matches snapshot; verify 1974 and 2039 specials.

4‑day (1974) and 6‑day (2039) cases align with data; confirm logic comments in Algeria._populate_public_holidays() explain these anomalies.


176-234: CHRISTIAN category gating validated.

Presence under CHRISTIAN and absence in default instance is asserted correctly.


235-279: HEBREW category gating validated.

Presence under HEBREW and absence in default instance is asserted correctly.


280-353: Localization snapshots for ar/en_US/fr are thorough and aligned.

Names and estimated labels match new PO entries.

holidays/countries/algeria.py (9)

33-37: Legal references archived — OK.

Using archived GDrive links from the government portal is correct per project practice. Le Monde link for Yennayer is a fine secondary reference.

Also applies to: 39-39


58-60: Init chaining for Christian/Hebrew — OK.

Constructor follows the standard islamic_show_estimated pattern and initializes new groups correctly.


77-82: Yennayer ≥ 2018 — OK.

Comment and gating align with sources.


95-97: Revolution Day — OK.

Unconditional addition post start_year is fine.


107-124: Safety check — helpers & category hooks verified

found add_eid_al_fitr_day_three and add_eid_al_adha_day_three in holidays/groups/islamic.py; Algeria defines populate_christian_holidays and populate_hebrew_holidays in holidays/countries/algeria.py; tests instantiate Algeria(categories=CHRISTIAN) and Algeria(categories=HEBREW) in tests/countries/test_algeria.py — no runtime attribute issues found.


74-97: Order holidays by calendar type (Islamic first, then Gregorian) per project convention.

Reordering improves consistency with established style.

@@
-        # New Year's Day.
-        self._add_new_years_day(tr("رأس السنة الميلادية"))
-
-        # First Celebrated in 2018.
-        # Reaffirmed via Loi n° 18-12 du 18 Chaoual 1439.
-        if self._year >= 2018:
-            # Amazigh New Year.
-            self._add_holiday_jan_12(tr("رأس السنة الأمازيغية"))
-
-        # Labor Day.
-        self._add_labor_day(tr("عيد العمال"))
-
-        # Name changed in Loi n° 05-06 du 17 Rabie El Aoeul 1426.
-        self._add_holiday_jul_5(
-            # Independence Day.
-            tr("عيد الاستقلال")
-            if self._year >= 2005
-            # Independence and National Liberation Front Day.
-            else tr("عيد الاستقلال وجبهة التحرير الوطني")
-        )
-
-        # Revolution Day.
-        self._add_holiday_nov_1(tr("عيد الثورة"))
-
         # Islamic New Year.
         self._add_islamic_new_year_day(tr("رأس السنة الهجرية"))
@@
         if self._year >= 1969:
             self._add_eid_al_adha_day_two(name)
             # Added via Loi n° 23-10 du 8 Dhou El Hidja 1444.
             if self._year >= 2023:
                 self._add_eid_al_adha_day_three(name)
+
+        # New Year's Day.
+        self._add_new_years_day(tr("رأس السنة الميلادية"))
+
+        # First Celebrated in 2018.
+        # Reaffirmed via Loi n° 18-12 du 18 Chaoual 1439.
+        if self._year >= 2018:
+            # Amazigh New Year.
+            self._add_holiday_jan_12(tr("رأس السنة الأمازيغية"))
+
+        # Labor Day.
+        self._add_labor_day(tr("عيد العمال"))
+
+        # Name changed in Loi n° 05-06 du 17 Rabie El Aoeul 1426.
+        self._add_holiday_jul_5(
+            # Independence Day.
+            tr("عيد الاستقلال") if self._year >= 2005
+            # Independence and National Liberation Front Day.
+            else tr("عيد الاستقلال وجبهة التحرير الوطني")
+        )
+
+        # Revolution Day.
+        self._add_holiday_nov_1(tr("عيد الثورة"))

Also applies to: 98-124

⛔ Skipped due to learnings
Learnt from: KJhellico
PR: vacanza/holidays#2593
File: holidays/countries/senegal.py:66-110
Timestamp: 2025-06-06T14:40:31.932Z
Learning: In the holidays library, within the _populate_public_holidays method, holidays should be arranged by calendar type (Islamic holidays first, then Gregorian holidays) without additional type grouping comments. The organization by calendar type is sufficient and follows the project's established conventions.
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.
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: holidays/locale/fr/LC_MESSAGES/DZ.po:37-41
Timestamp: 2025-09-03T17:10:35.672Z
Learning: In Algerian French localization (holidays/locale/fr/LC_MESSAGES/DZ.po), capitalization should follow Algerian source-accurate conventions rather than standard French orthographic rules. For example, "Jour de l'An Grégorien" with capital "G" is correct for Algerian usage, even though standard French would typically use lowercase "grégorien".
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/france.py:300-319
Timestamp: 2025-06-18T10:21:01.376Z
Learning: In the France holidays implementation, legislative years for holiday changes should be hard-coded rather than extracted into constants, as this maintains consistency with the existing codebase pattern and provides historical accuracy for specific legislative acts.
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#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: 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.
Learnt from: KJhellico
PR: vacanza/holidays#2386
File: tests/countries/test_nepal.py:551-554
Timestamp: 2025-05-01T19:19:42.346Z
Learning: In the holidays library, when multiple holidays fall on the same date, their names are always sorted alphabetically (in __setitem__ of HolidayBase), so the order of addition does not affect the resulting string.
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#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.
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.780Z
Learning: In the holidays library, countries with localization support consistently use tr() wrappers around holiday names when calling _add_* methods (e.g., self._add_new_years_day(tr("Holiday Name"))). This is the established pattern across United States, Thailand, and other l10n-enabled countries, contrary to any suggestion that translation is handled internally by _add_* methods.
Learnt from: PPsyrius
PR: vacanza/holidays#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.
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.780Z
Learning: In the holidays library, countries with localization support DO use tr() wrappers around holiday names when calling _add_* methods. This is the correct pattern for l10n-enabled country implementations, contrary to previous learning about translation being handled internally by _add_* methods.
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.
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: Wasif-Shahzad
PR: vacanza/holidays#2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants like FEB, TUE, MAR, and SUN internally through parent class implementations even when these constants don't appear directly in the file.
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/france.py:178-180
Timestamp: 2025-06-18T10:26:50.180Z
Learning: In the France holidays implementation, the _populate_subdiv_57_public_holidays() (Moselle) and _populate_subdiv_6ae_public_holidays() (Alsace) methods are functionally identical, both adding Good Friday (≥1893) and Saint Stephen's Day (≥1892) with the same legal references from August 16th, 1892. Therefore, for the deprecated "Alsace-Moselle" subdivision, calling either method produces the same result.

86-94: 2005 threshold confirmed — no change required.
Loi n°05‑06 was published in the Journal Officiel (JO n°30) on 27 April 2005; the legal name change took effect in 2005, so self._year >= 2005 is correct.


125-142: Christian holidays — legal list correct; Good Friday is not listed in Loi n°63‑278.

  • holidays/countries/algeria.py (lines 125–142): Easter Monday, Ascension, Whit Monday, Assumption (15 Aug) and Christmas — OK.
  • Action: verify Arabic msgids (e.g. "إثنين الفصح", "إثنين العنصرة") conform to DZ Arabic locale conventions in the DZ locale files (holidays/locale/ar/LC_MESSAGES/).

46-49: Update start_year to 1963

supported_categories ordering is fine. Loi n°63‑278 du 26 juillet 1963 (JORA n°53/1963) entered into force in 1963 — change start_year from 1964 to 1963 in holidays/countries/algeria.py (lines 46–49).

⛔ Skipped due to learnings
Learnt from: PPsyrius
PR: vacanza/holidays#2609
File: holidays/countries/nauru.py:48-50
Timestamp: 2025-06-14T11:05:21.250Z
Learning: In the holidays library, newer implementations use `start_year` to indicate the earliest year with complete holiday data coverage, not necessarily the first year a holiday existed. If a holiday system starts partway through a year (like Nauru's Public Holidays Act starting Jan 31, 1968), the start_year should be set to the following year (1969) to ensure users get full annual holiday coverage.
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: holidays/countries/algeria.py:46-49
Timestamp: 2025-09-03T18:17:24.626Z
Learning: In the holidays library, supported_categories tuples are ordered alphabetically rather than having PUBLIC listed first. For example, in Algeria's implementation, (CHRISTIAN, HEBREW, PUBLIC) follows alphabetical order and should not be reordered to put PUBLIC first.
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_south_africa.py:22-22
Timestamp: 2025-09-14T04:41:10.130Z
Learning: South Africa's observed holiday system only started in 1995, so in tests/countries/test_south_africa.py, using years_non_observed=range(1995, 2050) is intentional to limit testing to years where observed holidays actually exist, improving both correctness and performance.

@PPsyrius PPsyrius requested a review from KJhellico September 17, 2025 03:03
@PPsyrius PPsyrius requested a review from KJhellico September 17, 2025 09:23
Copy link

Copy link
Collaborator

@KJhellico KJhellico left a comment

Choose a reason for hiding this comment

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

LGTM!

@arkid15r arkid15r added this pull request to the merge queue Sep 17, 2025
Merged via the queue into vacanza:dev with commit e2efdcd Sep 17, 2025
36 checks passed
@PPsyrius PPsyrius deleted the algeria_refactor branch September 18, 2025 02:27
@coderabbitai coderabbitai bot mentioned this pull request Sep 25, 2025
24 tasks
@arkid15r arkid15r mentioned this pull request Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

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