Skip to content

Conversation

@Aaqilyousuf
Copy link
Contributor

@Aaqilyousuf Aaqilyousuf commented Sep 26, 2025

Proposed change

Added a new country holiday support for Antarctica including:

  • New Year's Day (January 1)
  • Midwinter Day (June 20 on leap years, June 21 on non-leap years)
  • Antarctica Day (December 1)
  • Christmas Day (December 25)

Resolves #2423.

Type of change

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

Checklist

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 26, 2025

Summary by CodeRabbit

  • New Features
    • Added support for Antarctica (AQ/ATA) holidays: New Year’s Day, Midwinter Day (leap-year dependent), Antarctica Day (from 2010), and Christmas Day. Increased available countries to 245.
  • Documentation
    • Updated README to include Antarctica in the country list.
  • Tests
    • Added comprehensive tests covering Antarctica holiday rules, aliases, and edge cases.
  • Chores
    • Expanded the contributors list with new names.

Walkthrough

Adds Antarctica as a new country provider: new holidays/countries/antarctica.py (classes Antarctica, AQ, ATA), exports them in holidays/countries/__init__.py, registers the country in holidays/registry.py, updates README.md, adds tests, and appends contributors to CONTRIBUTORS.

Changes

Cohort / File(s) Summary
Country module & exports
holidays/countries/antarctica.py, holidays/countries/__init__.py
New Antarctica provider (inherits HolidayBase, ChristianHolidays, InternationalHolidays) with __init__ and _populate_public_holidays adding New Year’s Day, Midwinter Day (Jun 20 in leap years, Jun 21 otherwise), Antarctica Day (Dec 1, year ≥2010), and Christmas Day; alias classes AQ and ATA; package exports updated.
Registry
holidays/registry.py
Added "antarctica": ("Antarctica", "AQ", "ATA") entry to COUNTRIES.
Docs
README.md
Updated supported countries count (244 → 245) and inserted Antarctica row (Code AQ) into countries table.
Tests
tests/countries/test_antarctica.py
New tests for aliases, absence before start_year, New Year’s Day, Midwinter Day leap/non‑leap behavior, Antarctica Day (since 2010), Christmas Day, and a 2025 snapshot.
Contributors
CONTRIBUTORS
Large block of contributor names appended (additions only).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • arkid15r
  • KJhellico

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning This pull request introduces a substantial bulk update to the CONTRIBUTORS file adding many names, which is unrelated to the objective of adding Antarctica holiday support and exceeds the scope of the linked issue. Please remove or defer the mass contributor additions to a separate change set so that this pull request remains focused on Antarctica holiday implementation.
✅ Passed checks (4 passed)
Check name Status Explanation
Title Check ✅ Passed The title “Add Antarctica holidays” succinctly and accurately reflects the primary change of adding holiday support for Antarctica by matching the contents of the pull request.
Linked Issues Check ✅ Passed All requirements from issue #2423 have been implemented, including defining the Antarctica holiday class with the specified holidays, updating the registry and public exports, and adding corresponding tests to verify functionality.
Description Check ✅ Passed The pull request description clearly outlines the introduction of holiday support for Antarctica, lists each holiday added, and correctly references resolving issue #2423, directly relating to the code changes.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Ruff (0.13.1)
tests/countries/test_antarctica.py

�[1;31mruff failed�[0m
�[1mCause:�[0m Failed to load configuration /ruff.toml
�[1mCause:�[0m Failed to parse /ruff.toml
�[1mCause:�[0m TOML parse error at line 26, column 3
|
26 | "RSE100", # Use of assert detected
| ^^^^^^^^
Unknown rule selector: RSE100


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
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: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
holidays/locale/en_US/LC_MESSAGES/AQ.po (1)

29-43: Empty msgstr for default‑locale entries; add translator comment for Midwinter Day.

Default locale .po files keep msgstr empty; also add a descriptive comment for Midwinter Day for consistency.

Apply:

 #. New Year's Day.
 msgid "New Year's Day"
-msgstr "New Year's Day"
+msgstr ""
@@
 #. Christmas Day.
 msgid "Christmas Day"
-msgstr "Christmas Day"
+msgstr ""
@@
 #. Antarctica Day (fixed).
 msgid "Antarctica Day"
-msgstr "Antarctica Day"
+msgstr ""
 
+#. Midwinter Day.
 msgid "Midwinter Day"
-msgstr "Midwinter Day"
+msgstr ""

Based on learnings

📜 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 982d746 and a80635f.

📒 Files selected for processing (6)
  • README.md (2 hunks)
  • holidays/countries/__init__.py (1 hunks)
  • holidays/countries/antarctica.py (1 hunks)
  • holidays/locale/en_US/LC_MESSAGES/AQ.po (1 hunks)
  • holidays/registry.py (1 hunks)
  • tests/countries/test_antarctica.py (1 hunks)
🧰 Additional context used
🧠 Learnings (36)
📓 Common learnings
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.
📚 Learning: 2025-08-08T14:37:03.045Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: In holidays/countries/__init__.py, re-export country classes using absolute imports (e.g., 'from holidays.countries.liberia import Liberia, LR, LBR') and keep alphabetical ordering (e.g., Lesotho, Liberia, Libya). Avoid relative imports in this file.

Applied to files:

  • holidays/countries/__init__.py
  • holidays/countries/antarctica.py
📚 Learning: 2025-08-08T14:37:03.045Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.

Applied to files:

  • holidays/countries/__init__.py
  • tests/countries/test_antarctica.py
📚 Learning: 2025-08-09T18:31:23.218Z
Learnt from: KJhellico
PR: vacanza/holidays#2778
File: tests/countries/test_kiribati.py:15-15
Timestamp: 2025-08-09T18:31:23.218Z
Learning: In the holidays project test files, the standard import pattern is `from holidays.countries.<country> import Country, CODE1, CODE2` (used in ~97% of test files), not `from holidays.countries import Country, CODE1, CODE2`. Only a few exceptions (Suriname, Sierra Leone, Mauritius, Mali, Ivory Coast, Guyana) use the aggregated import pattern.

Applied to files:

  • holidays/countries/__init__.py
📚 Learning: 2025-08-31T19:34:20.731Z
Learnt from: KJhellico
PR: vacanza/holidays#2820
File: holidays/countries/__init__.py:199-203
Timestamp: 2025-08-31T19:34:20.731Z
Learning: In Saint Helena, Ascension and Tristan da Cunha holidays implementation (holidays/countries/saint_helena_ascension_and_tristan_da_cunha.py), only three classes are defined: SaintHelenaAscensionAndTristanDaCunha (main class), SH (alias), and SHN (alias). There is no HolidaysSH class, despite it being referenced in the registry.py entry.

Applied to files:

  • holidays/countries/__init__.py
  • holidays/countries/antarctica.py
📚 Learning: 2025-07-12T20:54:28.749Z
Learnt from: KJhellico
PR: vacanza/holidays#2719
File: README.md:108-108
Timestamp: 2025-07-12T20:54:28.749Z
Learning: In PR #2719 adding Faroe Islands, KJhellico confirmed that the country count in README.md should be updated from 213 to 214, making 214 the accurate total after this addition.

Applied to files:

  • README.md
📚 Learning: 2025-06-06T16:02:09.910Z
Learnt from: KJhellico
PR: vacanza/holidays#2606
File: README.md:562-568
Timestamp: 2025-06-06T16:02:09.910Z
Learning: The README.md country table displays ISO 3166-1 alpha-2 codes only in the "Code" column. Alpha-3 codes or country aliases should not be included in this table format, maintaining consistency with all other country entries.

Applied to files:

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

Applied to files:

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

Applied to files:

  • tests/countries/test_antarctica.py
📚 Learning: 2025-09-14T17:17:14.387Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_saint_helena_ascension_and_tristan_da_cunha.py:209-209
Timestamp: 2025-09-14T17:17:14.387Z
Learning: In tests/countries/test_saint_helena_ascension_and_tristan_da_cunha.py, the explicit loop iteration pattern for subdivision-specific holiday checks (like Anniversary Day for TA subdivision) is intentionally preferred over using assertSubdivTa helper methods, as confirmed by PPsyrius.

Applied to files:

  • tests/countries/test_antarctica.py
📚 Learning: 2025-06-16T15:48:48.680Z
Learnt from: PPsyrius
PR: vacanza/holidays#2615
File: tests/countries/test_anguilla.py:1-12
Timestamp: 2025-06-16T15:48:48.680Z
Learning: Test files in the holidays repository follow a standardized structure without module or class docstrings. All country test files use the same pattern: license header, imports, and class definition (`class Test{Country}(CommonCountryTests, TestCase):`) without docstrings. This is an established codebase convention that should be maintained for consistency.

Applied to files:

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

Applied to files:

  • tests/countries/test_antarctica.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_antarctica.py
📚 Learning: 2025-04-05T04:33:53.254Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:33:53.254Z
Learning: For Turkmenistan holiday tests, recommend using CommonCountryTests as the base class rather than unittest.TestCase to follow project conventions, be consistent with other country test files, and gain access to common test utilities.

Applied to files:

  • tests/countries/test_antarctica.py
📚 Learning: 2025-08-24T13:01:51.370Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2852
File: tests/countries/test_tajikistan.py:26-28
Timestamp: 2025-08-24T13:01:51.370Z
Learning: In the holidays project country test files, the universally adopted standard method name for testing country aliases (ISO codes) is `test_country_aliases`. This naming convention is used consistently across all 235+ country test files in the repository, with no exceptions using `test_aliases`.

Applied to files:

  • tests/countries/test_antarctica.py
📚 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/AQ.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/AQ.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/AQ.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/AQ.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/AQ.po
📚 Learning: 2025-04-05T08:12:19.986Z
Learnt from: PPsyrius
PR: vacanza/holidays#2402
File: holidays/locale/en_TT/LC_MESSAGES/TT.po:46-48
Timestamp: 2025-04-05T08:12:19.986Z
Learning: In the holidays library, localization (PO) files follow this convention: comments (#.) always use American English (en_US) spelling, while the msgid content follows the locale-specific spelling standards of the target language.

Applied to files:

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

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/AQ.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/AQ.po
📚 Learning: 2025-05-10T04:35:01.221Z
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/locale/th/LC_MESSAGES/AX.po:15-27
Timestamp: 2025-05-10T04:35:01.221Z
Learning: The localization (.po) files for Åland Islands (AX) are intentionally left as stubs without translations because Åland Islands is implemented as a subdivision of Finland (code "01"). Holiday translations are handled through the Finland (FI) localization files instead.

Applied to files:

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

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/AQ.po
📚 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/locale/en_US/LC_MESSAGES/AQ.po
📚 Learning: 2025-04-18T21:13:55.589Z
Learnt from: KJhellico
PR: vacanza/holidays#2483
File: holidays/registry.py:177-177
Timestamp: 2025-04-18T21:13:55.589Z
Learning: In the holidays/registry.py file, COUNTRIES dictionary entries should use the class name (without spaces) as the first element of the tuple (e.g., "TurksAndCaicosIslands"), not the human-readable country name with spaces.

Applied to files:

  • holidays/registry.py
📚 Learning: 2025-08-03T12:59:53.286Z
Learnt from: KJhellico
PR: vacanza/holidays#2635
File: README.md:108-110
Timestamp: 2025-08-03T12:59:53.286Z
Learning: Always verify country counts in the COUNTRIES dictionary by checking the current count in the COUNTRIES dictionary in holidays/registry.py directly, rather than relying on information from previous PRs, as the count changes frequently with new country additions.

Applied to files:

  • holidays/registry.py
📚 Learning: 2025-07-10T11:00:13.195Z
Learnt from: KJhellico
PR: vacanza/holidays#2623
File: README.md:0-0
Timestamp: 2025-07-10T11:00:13.195Z
Learning: The COUNTRIES dictionary in holidays/registry.py contains 211 entries as confirmed by KJhellico in PR #2623, not 214 as previously calculated.

Applied to files:

  • holidays/registry.py
📚 Learning: 2025-07-15T15:00:32.728Z
Learnt from: KJhellico
PR: vacanza/holidays#2687
File: README.md:108-108
Timestamp: 2025-07-15T15:00:32.728Z
Learning: When verifying country counts in the holidays library, always check the current count in the COUNTRIES dictionary in holidays/registry.py rather than relying on previously recorded counts, as new countries may have been added in merged PRs.

Applied to files:

  • holidays/registry.py
📚 Learning: 2025-08-08T10:33:55.695Z
Learnt from: KJhellico
PR: vacanza/holidays#2763
File: README.md:108-110
Timestamp: 2025-08-08T10:33:55.695Z
Learning: When verifying the country total in holidays/registry.py, isolate between '^COUNTRIES:' and '^FINANCIAL:' and count only lines matching the strict key pattern '^\s*"[a-z0-9_ ]+":\s*\(' to avoid overcounting non-entry quoted lines. As of PR vacanza/holidays#2763, this yields 227 entries.

Applied to files:

  • holidays/registry.py
📚 Learning: 2025-08-24T11:55:06.810Z
Learnt from: KJhellico
PR: vacanza/holidays#2831
File: README.md:108-108
Timestamp: 2025-08-24T11:55:06.810Z
Learning: The actual count of countries in the holidays library should always be verified by counting entries in the COUNTRIES dictionary in holidays/registry.py using `grep -E '^\s*"[a-z_]+"\s*:' holidays/registry.py | wc -l`, rather than making assumptions about incremental changes.

Applied to files:

  • holidays/registry.py
📚 Learning: 2025-07-17T11:07:04.986Z
Learnt from: KJhellico
PR: vacanza/holidays#2720
File: README.md:108-110
Timestamp: 2025-07-17T11:07:04.986Z
Learning: Always verify country counts in the holidays library by checking the current count in the COUNTRIES dictionary in holidays/registry.py directly, rather than relying on information from previous PRs, as the count changes frequently with new country additions.

Applied to files:

  • holidays/registry.py
📚 Learning: 2025-07-14T19:32:44.256Z
Learnt from: PPsyrius
PR: vacanza/holidays#2716
File: holidays/registry.py:164-164
Timestamp: 2025-07-14T19:32:44.256Z
Learning: The COUNTRIES dictionary in holidays/registry.py contains exactly 215 entries as of PR #2716, with FINANCIAL dictionary entries (4 total) being tracked separately and not included in the country count for README.md.

Applied to files:

  • holidays/registry.py
🧬 Code graph analysis (3)
holidays/countries/__init__.py (1)
holidays/countries/antarctica.py (3)
  • Antarctica (20-55)
  • AQ (58-59)
  • ATA (62-63)
holidays/countries/antarctica.py (2)
holidays/groups/christian.py (1)
  • _add_christmas_day (224-232)
holidays/groups/international.py (1)
  • _add_new_years_day (142-150)
tests/countries/test_antarctica.py (2)
tests/common.py (6)
  • CommonCountryTests (358-392)
  • assertAliases (123-132)
  • assertHolidays (230-232)
  • assertHolidayName (197-201)
  • assertNoHoliday (246-248)
  • assertLocalizedHolidays (329-340)
holidays/countries/antarctica.py (2)
  • Antarctica (20-55)
  • AQ (58-59)
🔇 Additional comments (7)
holidays/registry.py (1)

31-31: Antarctica registry entry looks correct.

Uses class name "Antarctica" (no spaces), correct aliases ("AQ", "ATA"), and alphabetical placement between Anguilla and Antigua and Barbuda.

Based on learnings

README.md (2)

206-211: Antarctica table row format LGTM.

Alphabetical placement is correct; Code column uses only alpha‑2 (AQ); default language highlighted properly; categories reflect OPTIONAL in addition to default PUBLIC.


108-121: Country count verified: 241 entries. No update required — README matches the registry.

holidays/countries/__init__.py (1)

23-23: Public exports for Antarctica added correctly.

Absolute import, alphabetical order preserved.

Based on learnings

holidays/countries/antarctica.py (1)

40-56: Holiday population logic LGTM.

Correct use of tr() wrappers; Midwinter Day leap-year rule implemented cleanly.

Based on learnings

tests/countries/test_antarctica.py (2)

20-24: Solid test class scaffold.

Using CommonCountryTests + TestCase and setUpClass(Antarctica) matches project conventions.


57-64: LGTM on l10n default check.

Covers all four holidays with default language and fallback cases via helper.

@codecov
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (982d746) to head (ae3ee11).
⚠️ Report is 4 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2962   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          300       301    +1     
  Lines        17919     17942   +23     
  Branches      2314      2316    +2     
=========================================
+ Hits         17919     17942   +23     

☔ 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 Add antartica holidays Add Antarctica holidays Sep 26, 2025
@KJhellico
Copy link
Collaborator

@Aaqilyousuf, you can add your name into CONTRIBUTORS (if you wish).

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: 1

📜 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 0432d65 and 676b230.

📒 Files selected for processing (1)
  • holidays/countries/antarctica.py (1 hunks)
🧰 Additional context used
🧠 Learnings (31)
📓 Common learnings
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: In holidays/countries/__init__.py, re-export country classes using absolute imports (e.g., 'from holidays.countries.liberia import Liberia, LR, LBR') and keep alphabetical ordering (e.g., Lesotho, Liberia, Libya). Avoid relative imports in this file.
Learnt from: KJhellico
PR: vacanza/holidays#2687
File: README.md:108-108
Timestamp: 2025-07-15T15:00:32.728Z
Learning: When verifying country counts in the holidays library, always check the current count in the COUNTRIES dictionary in holidays/registry.py rather than relying on previously recorded counts, as new countries may have been added in merged PRs.
Learnt from: KJhellico
PR: vacanza/holidays#2635
File: README.md:108-110
Timestamp: 2025-08-03T12:59:53.286Z
Learning: Always verify country counts in the COUNTRIES dictionary by checking the current count in the COUNTRIES dictionary in holidays/registry.py directly, rather than relying on information from previous PRs, as the count changes frequently with new country additions.
Learnt from: KJhellico
PR: vacanza/holidays#2820
File: holidays/countries/__init__.py:199-203
Timestamp: 2025-08-31T19:34:20.731Z
Learning: In Saint Helena, Ascension and Tristan da Cunha holidays implementation (holidays/countries/saint_helena_ascension_and_tristan_da_cunha.py), only three classes are defined: SaintHelenaAscensionAndTristanDaCunha (main class), SH (alias), and SHN (alias). There is no HolidaysSH class, despite it being referenced in the registry.py entry.
📚 Learning: 2025-08-31T19:34:20.731Z
Learnt from: KJhellico
PR: vacanza/holidays#2820
File: holidays/countries/__init__.py:199-203
Timestamp: 2025-08-31T19:34:20.731Z
Learning: In Saint Helena, Ascension and Tristan da Cunha holidays implementation (holidays/countries/saint_helena_ascension_and_tristan_da_cunha.py), only three classes are defined: SaintHelenaAscensionAndTristanDaCunha (main class), SH (alias), and SHN (alias). There is no HolidaysSH class, despite it being referenced in the registry.py entry.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-08-08T14:37:03.045Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: In holidays/countries/__init__.py, re-export country classes using absolute imports (e.g., 'from holidays.countries.liberia import Liberia, LR, LBR') and keep alphabetical ordering (e.g., Lesotho, Liberia, Libya). Avoid relative imports in this file.

Applied to files:

  • holidays/countries/antarctica.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/antarctica.py
📚 Learning: 2025-04-08T14:46:10.656Z
Learnt from: KJhellico
PR: vacanza/holidays#2437
File: holidays/countries/bhutan.py:27-30
Timestamp: 2025-04-08T14:46:10.656Z
Learning: For country classes in the holidays library, there's no need to explicitly specify `supported_categories = (PUBLIC,)` when PUBLIC is the only category being used, as it's already the default category inherited from HolidayBase.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-05-04T10:29:46.780Z
Learnt from: KJhellico
PR: vacanza/holidays#2525
File: holidays/countries/togo.py:0-0
Timestamp: 2025-05-04T10:29:46.780Z
Learning: When a country class in the holidays library uses additional categories beyond PUBLIC, the `supported_categories` tuple should contain all categories, including PUBLIC. Only when PUBLIC is the only category being used should it be omitted from `supported_categories`.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-09-12T21:37:10.710Z
Learnt from: KJhellico
PR: vacanza/holidays#2854
File: tests/countries/test_sudan.py:29-31
Timestamp: 2025-09-12T21:37:10.710Z
Learning: For countries in the holidays library that only use the default PUBLIC category (like Sudan), there's no need to specify `categories=Sudan.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-09-14T16:19:23.651Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_antigua_and_barbuda.py:27-29
Timestamp: 2025-09-14T16:19:23.651Z
Learning: For Antigua and Barbuda in the holidays library, only the default PUBLIC category is used, so there's no need to specify `categories=AntiguaAndBarbuda.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior and AntiguaAndBarbuda doesn't define supported_categories.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-09-19T10:01:41.205Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_bolivia.py:29-29
Timestamp: 2025-09-19T10:01:41.205Z
Learning: For Bolivia in the holidays library, only the default PUBLIC category is used, so there's no need to specify `categories=Bolivia.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior and Bolivia doesn't define supported_categories.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-09-14T16:10:02.766Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_djibouti.py:27-29
Timestamp: 2025-09-14T16:10:02.766Z
Learning: For Djibouti in the holidays library, only the default PUBLIC category is used, so there's no need to specify `categories=Djibouti.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior and Djibouti doesn't define supported_categories.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-08-12T17:39:49.804Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/groups/international.py:0-0
Timestamp: 2025-08-12T17:39:49.804Z
Learning: Ethiopian New Year (Enkutatash) calculation uses `is_ethiopian_leap_year(self._year)` instead of `isleap(self._year + 1)` to properly handle century edge cases. Ethiopian leap years follow Julian rules (every 4 years without exception) while Gregorian leap years have century exceptions, causing different results around years like 2100.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-08-12T17:39:49.804Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/groups/international.py:0-0
Timestamp: 2025-08-12T17:39:49.804Z
Learning: Ethiopian New Year (Enkutatash) calculation correctly uses `is_ethiopian_leap_year(self._year)` instead of `isleap(self._year + 1)` to properly handle century edge cases. The Ethiopian function `(year + 1) % 4 == 0` checks if the next year is divisible by 4 using Julian/Ethiopian rules (no century exceptions), while `isleap()` applies Gregorian century rules. This difference is crucial around years like 2100 where the two calendar systems diverge.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-04-23T09:22:41.753Z
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:86-88
Timestamp: 2025-04-23T09:22:41.753Z
Learning: For holiday definitions in the holidays package, keep comments simple with just the holiday name (e.g., "# Independence Day.") rather than including dates or historical context, as the function names already encode the date information.

Applied to files:

  • holidays/countries/antarctica.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/antarctica.py
📚 Learning: 2025-06-29T10:36:06.138Z
Learnt from: KJhellico
PR: vacanza/holidays#2671
File: holidays/countries/libya.py:51-108
Timestamp: 2025-06-29T10:36:06.138Z
Learning: There is no project-wide convention in the holidays library to organize holidays by calendar type (Islamic holidays first, then Gregorian holidays). Countries organize holidays in various ways - often chronologically, by importance, or by logical grouping - and Islamic holidays are frequently placed at the end of the _populate_public_holidays method rather than at the beginning.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-08-25T10:51:08.068Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/antarctica.py
📚 Learning: 2025-05-01T19:19:42.346Z
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, multiple holidays on the same date are sorted alphabetically internally, so the order in which holidays are added does not affect the resulting holiday name string when multiple holidays occur on the same date.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-05-01T19:19:42.346Z
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.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-09-16T04:11:33.513Z
Learnt from: PPsyrius
PR: vacanza/holidays#2928
File: holidays/countries/algeria.py:16-22
Timestamp: 2025-09-16T04:11:33.513Z
Learning: In the holidays library, country class base inheritance follows alphabetical ordering after HolidayBase. For example, Algeria correctly uses: HolidayBase, ChristianHolidays, HebrewCalendarHolidays, InternationalHolidays, IslamicHolidays (alphabetical after the required HolidayBase first position).

Applied to files:

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

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-08-30T22:55:34.525Z
Learnt from: PPsyrius
PR: vacanza/holidays#2874
File: holidays/countries/nigeria.py:31-44
Timestamp: 2025-08-30T22:55:34.525Z
Learning: For Nigeria holiday implementation reference ordering: The current ordering with Wikipedia first, followed by official sources, follows the newer standard for the holidays library and should not be changed to put legal sources first.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-09-14T07:26:25.431Z
Learnt from: PPsyrius
PR: vacanza/holidays#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.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-06-14T20:43:15.370Z
Learnt from: KJhellico
PR: vacanza/holidays#2631
File: holidays/countries/sint_maarten.py:94-95
Timestamp: 2025-06-14T20:43:15.370Z
Learning: The `_add_*` helper methods in the holidays library (such as `_add_christmas_day_two()`, `_add_labor_day()`, etc.) don't have default holiday names, so the name parameter should always be explicitly specified when calling these methods.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-04-03T16:58:27.175Z
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.

Applied to files:

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

Applied to files:

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

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-06-14T11:05:21.250Z
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.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-04-03T12:36:41.201Z
Learnt from: PPsyrius
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:73-77
Timestamp: 2025-04-03T12:36:41.201Z
Learning: In the Holidays library, comments explaining year restrictions for holidays should be placed above the year check conditional statement, not inside it. Example format:
```python
# reason why goes here
if start_year <= self._year <= end_year:
    # Holiday name
    self._add_holiday_function(tr("Holiday Name"))
```

Applied to files:

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

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-09-14T16:05:55.205Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/antarctica.py
🧬 Code graph analysis (1)
holidays/countries/antarctica.py (3)
holidays/groups/christian.py (1)
  • _add_christmas_day (224-232)
holidays/groups/international.py (2)
  • InternationalHolidays (20-236)
  • _add_new_years_day (142-150)
holidays/holiday_base.py (1)
  • _is_leap_year (793-795)

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: 1

📜 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 676b230 and f42ac6f.

📒 Files selected for processing (1)
  • holidays/countries/antarctica.py (1 hunks)
🧰 Additional context used
🧠 Learnings (32)
📓 Common learnings
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: In holidays/countries/__init__.py, re-export country classes using absolute imports (e.g., 'from holidays.countries.liberia import Liberia, LR, LBR') and keep alphabetical ordering (e.g., Lesotho, Liberia, Libya). Avoid relative imports in this file.
Learnt from: KJhellico
PR: vacanza/holidays#2820
File: holidays/countries/__init__.py:199-203
Timestamp: 2025-08-31T19:34:20.731Z
Learning: In Saint Helena, Ascension and Tristan da Cunha holidays implementation (holidays/countries/saint_helena_ascension_and_tristan_da_cunha.py), only three classes are defined: SaintHelenaAscensionAndTristanDaCunha (main class), SH (alias), and SHN (alias). There is no HolidaysSH class, despite it being referenced in the registry.py entry.
📚 Learning: 2025-08-08T14:37:03.045Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: In holidays/countries/__init__.py, re-export country classes using absolute imports (e.g., 'from holidays.countries.liberia import Liberia, LR, LBR') and keep alphabetical ordering (e.g., Lesotho, Liberia, Libya). Avoid relative imports in this file.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-08-31T19:34:20.731Z
Learnt from: KJhellico
PR: vacanza/holidays#2820
File: holidays/countries/__init__.py:199-203
Timestamp: 2025-08-31T19:34:20.731Z
Learning: In Saint Helena, Ascension and Tristan da Cunha holidays implementation (holidays/countries/saint_helena_ascension_and_tristan_da_cunha.py), only three classes are defined: SaintHelenaAscensionAndTristanDaCunha (main class), SH (alias), and SHN (alias). There is no HolidaysSH class, despite it being referenced in the registry.py entry.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-08-08T14:37:03.045Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-04-08T14:46:10.656Z
Learnt from: KJhellico
PR: vacanza/holidays#2437
File: holidays/countries/bhutan.py:27-30
Timestamp: 2025-04-08T14:46:10.656Z
Learning: For country classes in the holidays library, there's no need to explicitly specify `supported_categories = (PUBLIC,)` when PUBLIC is the only category being used, as it's already the default category inherited from HolidayBase.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-05-04T10:29:46.780Z
Learnt from: KJhellico
PR: vacanza/holidays#2525
File: holidays/countries/togo.py:0-0
Timestamp: 2025-05-04T10:29:46.780Z
Learning: When a country class in the holidays library uses additional categories beyond PUBLIC, the `supported_categories` tuple should contain all categories, including PUBLIC. Only when PUBLIC is the only category being used should it be omitted from `supported_categories`.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-09-12T21:37:10.710Z
Learnt from: KJhellico
PR: vacanza/holidays#2854
File: tests/countries/test_sudan.py:29-31
Timestamp: 2025-09-12T21:37:10.710Z
Learning: For countries in the holidays library that only use the default PUBLIC category (like Sudan), there's no need to specify `categories=Sudan.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-09-14T16:19:23.651Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_antigua_and_barbuda.py:27-29
Timestamp: 2025-09-14T16:19:23.651Z
Learning: For Antigua and Barbuda in the holidays library, only the default PUBLIC category is used, so there's no need to specify `categories=AntiguaAndBarbuda.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior and AntiguaAndBarbuda doesn't define supported_categories.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-09-19T10:01:41.205Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_bolivia.py:29-29
Timestamp: 2025-09-19T10:01:41.205Z
Learning: For Bolivia in the holidays library, only the default PUBLIC category is used, so there's no need to specify `categories=Bolivia.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior and Bolivia doesn't define supported_categories.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-09-14T16:10:02.766Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_djibouti.py:27-29
Timestamp: 2025-09-14T16:10:02.766Z
Learning: For Djibouti in the holidays library, only the default PUBLIC category is used, so there's no need to specify `categories=Djibouti.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior and Djibouti doesn't define supported_categories.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-08-12T17:39:49.804Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/groups/international.py:0-0
Timestamp: 2025-08-12T17:39:49.804Z
Learning: Ethiopian New Year (Enkutatash) calculation uses `is_ethiopian_leap_year(self._year)` instead of `isleap(self._year + 1)` to properly handle century edge cases. Ethiopian leap years follow Julian rules (every 4 years without exception) while Gregorian leap years have century exceptions, causing different results around years like 2100.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-08-12T17:39:49.804Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/groups/international.py:0-0
Timestamp: 2025-08-12T17:39:49.804Z
Learning: Ethiopian New Year (Enkutatash) calculation correctly uses `is_ethiopian_leap_year(self._year)` instead of `isleap(self._year + 1)` to properly handle century edge cases. The Ethiopian function `(year + 1) % 4 == 0` checks if the next year is divisible by 4 using Julian/Ethiopian rules (no century exceptions), while `isleap()` applies Gregorian century rules. This difference is crucial around years like 2100 where the two calendar systems diverge.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-04-23T09:22:41.753Z
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:86-88
Timestamp: 2025-04-23T09:22:41.753Z
Learning: For holiday definitions in the holidays package, keep comments simple with just the holiday name (e.g., "# Independence Day.") rather than including dates or historical context, as the function names already encode the date information.

Applied to files:

  • holidays/countries/antarctica.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/antarctica.py
📚 Learning: 2025-06-29T10:36:06.138Z
Learnt from: KJhellico
PR: vacanza/holidays#2671
File: holidays/countries/libya.py:51-108
Timestamp: 2025-06-29T10:36:06.138Z
Learning: There is no project-wide convention in the holidays library to organize holidays by calendar type (Islamic holidays first, then Gregorian holidays). Countries organize holidays in various ways - often chronologically, by importance, or by logical grouping - and Islamic holidays are frequently placed at the end of the _populate_public_holidays method rather than at the beginning.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-08-25T10:51:08.068Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/antarctica.py
📚 Learning: 2025-05-01T19:19:42.346Z
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, multiple holidays on the same date are sorted alphabetically internally, so the order in which holidays are added does not affect the resulting holiday name string when multiple holidays occur on the same date.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-05-01T19:19:42.346Z
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.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-09-16T04:11:33.513Z
Learnt from: PPsyrius
PR: vacanza/holidays#2928
File: holidays/countries/algeria.py:16-22
Timestamp: 2025-09-16T04:11:33.513Z
Learning: In the holidays library, country class base inheritance follows alphabetical ordering after HolidayBase. For example, Algeria correctly uses: HolidayBase, ChristianHolidays, HebrewCalendarHolidays, InternationalHolidays, IslamicHolidays (alphabetical after the required HolidayBase first position).

Applied to files:

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

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-08-30T22:55:34.525Z
Learnt from: PPsyrius
PR: vacanza/holidays#2874
File: holidays/countries/nigeria.py:31-44
Timestamp: 2025-08-30T22:55:34.525Z
Learning: For Nigeria holiday implementation reference ordering: The current ordering with Wikipedia first, followed by official sources, follows the newer standard for the holidays library and should not be changed to put legal sources first.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-09-14T07:26:25.431Z
Learnt from: PPsyrius
PR: vacanza/holidays#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.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-06-14T20:43:15.370Z
Learnt from: KJhellico
PR: vacanza/holidays#2631
File: holidays/countries/sint_maarten.py:94-95
Timestamp: 2025-06-14T20:43:15.370Z
Learning: The `_add_*` helper methods in the holidays library (such as `_add_christmas_day_two()`, `_add_labor_day()`, etc.) don't have default holiday names, so the name parameter should always be explicitly specified when calling these methods.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-04-03T16:58:27.175Z
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.

Applied to files:

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

Applied to files:

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

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-06-14T11:05:21.250Z
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.

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-04-03T12:36:41.201Z
Learnt from: PPsyrius
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:73-77
Timestamp: 2025-04-03T12:36:41.201Z
Learning: In the Holidays library, comments explaining year restrictions for holidays should be placed above the year check conditional statement, not inside it. Example format:
```python
# reason why goes here
if start_year <= self._year <= end_year:
    # Holiday name
    self._add_holiday_function(tr("Holiday Name"))
```

Applied to files:

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

Applied to files:

  • holidays/countries/antarctica.py
📚 Learning: 2025-09-14T16:05:55.205Z
Learnt from: PPsyrius
PR: vacanza/holidays#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/antarctica.py
📚 Learning: 2025-09-20T12:21:50.877Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_belgium.py:28-30
Timestamp: 2025-09-20T12:21:50.877Z
Learning: Belgium holidays implementation currently lacks a start_year attribute. In tests/countries/test_belgium.py, do not suggest adding test_no_holidays methods that rely on start_year until the start_year attribute is introduced to Belgium's holiday implementation.

Applied to files:

  • holidays/countries/antarctica.py
🧬 Code graph analysis (1)
holidays/countries/antarctica.py (3)
holidays/groups/christian.py (1)
  • _add_christmas_day (224-232)
holidays/groups/international.py (1)
  • _add_new_years_day (142-150)
holidays/holiday_base.py (1)
  • _is_leap_year (793-795)

Copy link
Collaborator

@PPsyrius PPsyrius left a comment

Choose a reason for hiding this comment

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

Last fixes 🎉

PPsyrius
PPsyrius previously approved these changes Sep 27, 2025
Copy link
Collaborator

@PPsyrius PPsyrius left a comment

Choose a reason for hiding this comment

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

LGTM 🇦🇶

@sonarqubecloud
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.

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: 1

📜 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 2b5636a and ae3ee11.

📒 Files selected for processing (1)
  • tests/countries/test_antarctica.py (1 hunks)
🧰 Additional context used
🧠 Learnings (27)
📓 Common learnings
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: In holidays/countries/__init__.py, re-export country classes using absolute imports (e.g., 'from holidays.countries.liberia import Liberia, LR, LBR') and keep alphabetical ordering (e.g., Lesotho, Liberia, Libya). Avoid relative imports in this file.
Learnt from: KJhellico
PR: vacanza/holidays#2820
File: holidays/countries/__init__.py:199-203
Timestamp: 2025-08-31T19:34:20.731Z
Learning: In Saint Helena, Ascension and Tristan da Cunha holidays implementation (holidays/countries/saint_helena_ascension_and_tristan_da_cunha.py), only three classes are defined: SaintHelenaAscensionAndTristanDaCunha (main class), SH (alias), and SHN (alias). There is no HolidaysSH class, despite it being referenced in the registry.py entry.
📚 Learning: 2025-04-05T04:29:38.042Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:85-86
Timestamp: 2025-04-05T04:29:38.042Z
Learning: For testing holiday implementations in the vacanza/holidays repository, recommend using `from tests.common import CommonCountryTests` as the base class instead of directly using `unittest.TestCase` to maintain consistency with project conventions and leverage common test utilities.

Applied to files:

  • tests/countries/test_antarctica.py
📚 Learning: 2025-06-16T15:48:48.680Z
Learnt from: PPsyrius
PR: vacanza/holidays#2615
File: tests/countries/test_anguilla.py:1-12
Timestamp: 2025-06-16T15:48:48.680Z
Learning: Test files in the holidays repository follow a standardized structure without module or class docstrings. All country test files use the same pattern: license header, imports, and class definition (`class Test{Country}(CommonCountryTests, TestCase):`) without docstrings. This is an established codebase convention that should be maintained for consistency.

Applied to files:

  • tests/countries/test_antarctica.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_antarctica.py
📚 Learning: 2025-08-20T19:46:15.625Z
Learnt from: KJhellico
PR: vacanza/holidays#2833
File: tests/countries/test_uganda.py:15-0
Timestamp: 2025-08-20T19:46:15.625Z
Learning: In the holidays project, the standard import pattern for country test files is `from holidays.countries.<country> import Country, CODE1, CODE2` (direct module import), used by ~75% of country test files. Only a minority (~25%) use the aggregated public API import `from holidays.countries import Country, CODE1, CODE2`. The direct module import pattern should be used for new country test files to follow the established convention.

Applied to files:

  • tests/countries/test_antarctica.py
📚 Learning: 2025-09-14T17:17:14.387Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_saint_helena_ascension_and_tristan_da_cunha.py:209-209
Timestamp: 2025-09-14T17:17:14.387Z
Learning: In tests/countries/test_saint_helena_ascension_and_tristan_da_cunha.py, the explicit loop iteration pattern for subdivision-specific holiday checks (like Anniversary Day for TA subdivision) is intentionally preferred over using assertSubdivTa helper methods, as confirmed by PPsyrius.

Applied to files:

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

Applied to files:

  • tests/countries/test_antarctica.py
📚 Learning: 2025-08-08T14:37:03.045Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.

Applied to files:

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

Applied to files:

  • tests/countries/test_antarctica.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_antarctica.py
📚 Learning: 2025-08-09T18:31:23.218Z
Learnt from: KJhellico
PR: vacanza/holidays#2778
File: tests/countries/test_kiribati.py:15-15
Timestamp: 2025-08-09T18:31:23.218Z
Learning: In the holidays project test files, the standard import pattern is `from holidays.countries.<country> import Country, CODE1, CODE2` (used in ~97% of test files), not `from holidays.countries import Country, CODE1, CODE2`. Only a few exceptions (Suriname, Sierra Leone, Mauritius, Mali, Ivory Coast, Guyana) use the aggregated import pattern.

Applied to files:

  • tests/countries/test_antarctica.py
📚 Learning: 2025-08-08T14:37:03.045Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: In holidays/countries/__init__.py, re-export country classes using absolute imports (e.g., 'from holidays.countries.liberia import Liberia, LR, LBR') and keep alphabetical ordering (e.g., Lesotho, Liberia, Libya). Avoid relative imports in this file.

Applied to files:

  • tests/countries/test_antarctica.py
📚 Learning: 2025-08-24T13:01:51.370Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2852
File: tests/countries/test_tajikistan.py:26-28
Timestamp: 2025-08-24T13:01:51.370Z
Learning: In the holidays project country test files, the standard method name for testing country aliases (ISO codes) is `test_country_aliases`, not `test_aliases`. This naming convention is consistently used across all country test files.

Applied to files:

  • tests/countries/test_antarctica.py
📚 Learning: 2025-08-24T13:01:51.370Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2852
File: tests/countries/test_tajikistan.py:26-28
Timestamp: 2025-08-24T13:01:51.370Z
Learning: In the holidays project country test files, the universally adopted standard method name for testing country aliases (ISO codes) is `test_country_aliases`. This naming convention is used consistently across all 235+ country test files in the repository, with no exceptions using `test_aliases`.

Applied to files:

  • tests/countries/test_antarctica.py
📚 Learning: 2025-07-09T21:16:35.145Z
Learnt from: KJhellico
PR: vacanza/holidays#2623
File: tests/countries/test_christmas_island.py:136-146
Timestamp: 2025-07-09T21:16:35.145Z
Learning: In Christmas Island's holiday implementation, the test_christmas_day method cannot use assertNoNonObservedHoliday because in some years observed Christmas Day overlaps with Boxing Day when both holidays are moved due to weekend conflicts, causing the standard non-observed holiday check to fail inappropriately.

Applied to files:

  • tests/countries/test_antarctica.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_antarctica.py
📚 Learning: 2025-09-17T09:07:56.459Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_paraguay.py:134-139
Timestamp: 2025-09-17T09:07:56.459Z
Learning: In the vacanza/holidays project, when testing holidays that start from a specific year (not the country's start_year), the standard pattern is to use `range(specific_year, self.end_year)` for the holiday dates and `assertNoHolidayName(name, range(self.start_year, specific_year))` for the gap period. Using `self.full_range` with year conditions like `if year >= specific_year` is not the established pattern and would be inconsistent with the codebase.

Applied to files:

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

Applied to files:

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

Applied to files:

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

Applied to files:

  • tests/countries/test_antarctica.py
📚 Learning: 2025-09-14T16:03:13.558Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:

  • tests/countries/test_antarctica.py
📚 Learning: 2025-09-14T16:05:55.205Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:

  • tests/countries/test_antarctica.py
📚 Learning: 2025-06-14T10:58:43.636Z
Learnt from: PPsyrius
PR: vacanza/holidays#2629
File: tests/countries/test_namibia.py:22-23
Timestamp: 2025-06-14T10:58:43.636Z
Learning: In the vacanza/holidays project, country test files consistently use range(start_year, 2050) which intentionally excludes 2050 and stops at 2049. This is a library-wide implementation pattern, not an off-by-one error.

Applied to files:

  • tests/countries/test_antarctica.py
📚 Learning: 2025-08-12T17:39:49.804Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/groups/international.py:0-0
Timestamp: 2025-08-12T17:39:49.804Z
Learning: Ethiopian New Year (Enkutatash) calculation correctly uses `is_ethiopian_leap_year(self._year)` instead of `isleap(self._year + 1)` to properly handle century edge cases. The Ethiopian function `(year + 1) % 4 == 0` checks if the next year is divisible by 4 using Julian/Ethiopian rules (no century exceptions), while `isleap()` applies Gregorian century rules. This difference is crucial around years like 2100 where the two calendar systems diverge.

Applied to files:

  • tests/countries/test_antarctica.py
📚 Learning: 2025-08-12T18:40:16.160Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/countries/ethiopia.py:63-63
Timestamp: 2025-08-12T18:40:16.160Z
Learning: Ethiopian Epiphany (Timkat) date calculation correctly uses `is_ethiopian_leap_year(self._year - 1)` in the `_add_epiphany_day` helper in `holidays/groups/christian.py`. Since Epiphany occurs in January and belongs to the Ethiopian year that started in the previous Gregorian year, it checks Ethiopian leap year rules for `self._year - 1`. This is the proper approach, not using Gregorian leap year rules.

Applied to files:

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

Applied to files:

  • tests/countries/test_antarctica.py
📚 Learning: 2025-08-12T17:16:54.497Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: tests/calendars/test_julian.py:35-36
Timestamp: 2025-08-12T17:16:54.497Z
Learning: In the vacanza/holidays project calendar tests (Thai, Ethiopian, Julian, etc.), the established testing pattern for validation methods is to use simple for loops like `for year in known_data_dict:` followed by `self.assertEqual(expected, actual)` without using unittest's subTest feature. This pattern is consistently maintained across all calendar test files.

Applied to files:

  • tests/countries/test_antarctica.py
🧬 Code graph analysis (1)
tests/countries/test_antarctica.py (2)
tests/common.py (7)
  • TestCase (31-370)
  • CommonCountryTests (426-431)
  • assertAliases (124-133)
  • assertNoHolidays (324-326)
  • assertHolidayName (198-202)
  • assertNoHolidayName (305-307)
  • assertHolidays (231-233)
holidays/countries/antarctica.py (3)
  • Antarctica (17-50)
  • AQ (53-54)
  • ATA (57-58)

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

LGTM

@arkid15r arkid15r added this pull request to the merge queue Sep 27, 2025
Merged via the queue into vacanza:dev with commit 4723068 Sep 27, 2025
36 checks passed
@PPsyrius PPsyrius mentioned this pull request Sep 28, 2025
@arkid15r arkid15r mentioned this pull request Oct 6, 2025
@coderabbitai coderabbitai bot mentioned this pull request Oct 13, 2025
9 tasks
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.

Add Antarctica holidays

4 participants