Skip to content

Update Turks and Caicos Islands holidays: 2026 changes#3182

Merged
arkid15r merged 1 commit intovacanza:devfrom
KJhellico:upd-tc
Dec 31, 2025
Merged

Update Turks and Caicos Islands holidays: 2026 changes#3182
arkid15r merged 1 commit intovacanza:devfrom
KJhellico:upd-tc

Conversation

@KJhellico
Copy link
Copy Markdown
Collaborator

Proposed change

Update Turks and Caicos Islands holidays: 2026 changes (add Constitution Day, move National Day of Thanksgiving).

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
Copy Markdown
Contributor

coderabbitai bot commented Dec 30, 2025

Summary by CodeRabbit

  • Updates
    • Corrected National Day of Thanksgiving dates for Turks and Caicos Islands; now observed in August (first day before last Monday) from 2026 onwards, with November (4th Friday) dates through 2025.
    • Added Constitution Day as an official holiday for Turks and Caicos Islands, observed on the last Monday of August from 2026 onwards.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Updates Turks and Caicos Islands holiday definitions to shift National Day of Thanksgiving from the 4th Friday of November (for 2014–2025) to the 1st day before the last Monday of August (from 2026 onwards), and introduces Constitution Day observance beginning 2026 as the last Monday of August. Snapshot data and translations reflect these changes.

Changes

Cohort / File(s) Summary
Holiday Implementation
holidays/countries/turks_and_caicos_islands.py
Introduces year-dependent logic for National Day of Thanksgiving (2014–2025: 4th Friday of November; 2026+: day prior to last Monday of August); adds Constitution Day for 2026+ as last Monday of August.
Locale Translations
holidays/locale/en_TC/LC_MESSAGES/TC.po, holidays/locale/en_US/LC_MESSAGES/TC.po
Updates metadata (version 0.75→0.88, date, translator); adds msgid/msgstr entries for Constitution Day and National Day of Thanksgiving; removes duplicate entries and reorders blocks.
Snapshot Data
snapshots/countries/TC_COMMON.json
Removes 64 historical National Day of Thanksgiving entries (1963–2026); adds 50 new entries spanning 2026–2050 for Constitution Day and adjusted National Day of Thanksgiving dates in August.
Test Suite
tests/countries/test_turks_and_caicos_islands.py
Refactors setUpClass to use dynamic range patterns; replaces hard-coded year assertions with self.full_range, self.start_year/self.end_year, and obs_dts; adds new test_constitution_day method with range-based assertions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

  • Vacanza holidays #2483: Primary PR that introduced the Turks and Caicos Islands holiday implementation; this change directly extends the same country module with refined rules and new holidays.
  • Vacanza holidays #2881: Establishes the test-harness refactor pattern (self.full_range, obs_dts, dynamic assertions) that this PR applies across the test suite.

Suggested labels

snapshot, test

Suggested reviewers

  • arkid15r
  • PPsyrius

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 clearly summarizes the main change: updating Turks and Caicos Islands holidays for 2026, which aligns with the primary modifications of adding Constitution Day and adjusting the National Day of Thanksgiving date.
Description check ✅ Passed The description is directly related to the changeset, explaining the proposed update to Turks and Caicos Islands holidays by adding Constitution Day and moving National Day of Thanksgiving, which matches the file changes.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent 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 a7a7aef and 3263599.

📒 Files selected for processing (5)
  • holidays/countries/turks_and_caicos_islands.py
  • holidays/locale/en_TC/LC_MESSAGES/TC.po
  • holidays/locale/en_US/LC_MESSAGES/TC.po
  • snapshots/countries/TC_COMMON.json
  • tests/countries/test_turks_and_caicos_islands.py
🧰 Additional context used
🧠 Learnings (77)
📓 Common learnings
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_french_polynesia.py:19-22
Timestamp: 2025-11-08T05:09:56.159Z
Learning: In the vacanza/holidays project's test framework (PR #2881 onwards), the base class CommonCountryTests provides a default test_no_holidays implementation that automatically tests years=start_year - 1 for standard PUBLIC category cases. Individual country test files should only override test_no_holidays when the country supports additional non-PUBLIC categories (GOVERNMENT, WORKDAY, OPTIONAL, etc.) with different start years requiring separate validation.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: holidays/countries/south_africa.py:69-75
Timestamp: 2025-09-14T07:26:25.431Z
Learning: When reviewing historical holiday implementations in the vacanza/holidays repository, trust the maintainers' research and implementation decisions for specific historical edge cases, especially when they can provide sources like Wikipedia or other historical documentation that supports unusual or complex date calculation rules during specific time periods.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2777
File: holidays/countries/gambia.py:120-122
Timestamp: 2025-08-03T13:48:11.910Z
Learning: When reviewing holiday implementations in the holidays library, defer to the maintainers' choice of start years for specific holiday policies, as they likely have access to more reliable primary sources and official documentation than what can be found through web searches.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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: PPsyrius
Repo: vacanza/holidays PR: 2833
File: holidays/countries/uganda.py:50-56
Timestamp: 2025-08-25T09:57:22.291Z
Learning: In the holidays package, when adding comments for year-restricted holidays in Uganda and similar country modules, include specific legal or historical context such as the actual laws, parliamentary acts, or government decisions that established the holidays, rather than just generic "since YEAR" information. For example, reference the specific Parliament act, decree, or historical event that created the holiday.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2537
File: tests/countries/test_finland.py:23-26
Timestamp: 2025-05-09T18:36:09.607Z
Learning: The holidays project prioritizes complete historical coverage in tests, verifying holidays from their first year of observance (e.g., 1853 for Finland) through future projections, rather than using shorter sliding windows.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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.
Learnt from: kritibirda26
Repo: vacanza/holidays PR: 2395
File: holidays/countries/antigua_and_barbuda.py:68-75
Timestamp: 2025-03-31T14:19:13.901Z
Learning: For Antigua and Barbuda holidays, Carnival Tuesday should only be considered a holiday for years after 2005 (not including 2005 itself) because the 2005 amendment was passed on September 15th, which is after the August Carnival celebrations that year.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2615
File: tests/countries/test_anguilla.py:52-64
Timestamp: 2025-06-15T10:15:39.883Z
Learning: In the Anguilla holidays implementation, March 2 only has "James Ronald Webster Day" (from 2010 onwards). There is no "Sovereignty Day" holiday on this date. Queen's/King's Birthday holidays are in June, not March.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2614
File: holidays/countries/guyana.py:124-130
Timestamp: 2025-06-14T18:58:55.499Z
Learning: In Guyana's holidays implementation (holidays/countries/guyana.py), Emancipation Day should be implemented as a fixed-date holiday on August 1st with weekend observance rules, not as the first Monday of August. This is confirmed by official Guyana Ministry of Home Affairs sources.
Learnt from: kritibirda26
Repo: vacanza/holidays PR: 2395
File: holidays/countries/antigua_and_barbuda.py:119-123
Timestamp: 2025-03-31T14:17:47.462Z
Learning: Antigua and Barbuda has had only two general elections (2018 and 2023) since the 2014 amendment that made the day after a general election a holiday.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2653
File: holidays/locale/th/LC_MESSAGES/TW.po:17-21
Timestamp: 2025-06-21T18:06:50.027Z
Learning: KJhellico's username includes a tilde character (~) as part of their nickname (appears as "~Jhellico" in Last-Translator headers), which is intentional formatting and not an error.
📚 Learning: 2025-06-28T10:39:19.185Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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_TC/LC_MESSAGES/TC.po
  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-06-26T15:34:35.476Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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_TC/LC_MESSAGES/TC.po
  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-05-10T04:32:15.760Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2537
File: holidays/countries/finland.py:0-0
Timestamp: 2025-05-10T04:32:15.760Z
Learning: In the holidays package, detailed historical context and additional information should be added as comments at the method level or above conditional blocks, while comments directly above tr() function calls should only contain the holiday name itself (e.g., "# Independence Day.").

Applied to files:

  • holidays/locale/en_TC/LC_MESSAGES/TC.po
  • holidays/countries/turks_and_caicos_islands.py
  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-05-10T04:02:13.815Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2537
File: holidays/countries/finland.py:249-253
Timestamp: 2025-05-10T04:02:13.815Z
Learning: Holiday name comments directly above tr() function calls in the holidays package should only contain the holiday name itself (e.g., "# Independence Day.") without any additional context, dates, or historical information.

Applied to files:

  • holidays/locale/en_TC/LC_MESSAGES/TC.po
  • holidays/countries/turks_and_caicos_islands.py
  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-09-17T15:53:16.940Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2944
File: holidays/countries/myanmar.py:108-111
Timestamp: 2025-09-17T15:53:16.940Z
Learning: In the holidays package, explanatory comments about year restrictions or policy context should be placed above conditional blocks or at method level, never directly above holiday name comments that precede tr() function calls, as this would include the explanatory text in .po localization files when running `make l10n`.

Applied to files:

  • holidays/locale/en_TC/LC_MESSAGES/TC.po
  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-06-11T18:32:25.595Z
Learnt from: ankushhKapoor
Repo: vacanza/holidays PR: 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_TC/LC_MESSAGES/TC.po
  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-03-30T18:25:07.087Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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_TC/LC_MESSAGES/TC.po
  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-06-29T09:37:35.283Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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_TC/LC_MESSAGES/TC.po
  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-05-06T15:25:44.333Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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_TC/LC_MESSAGES/TC.po
  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-04-03T05:59:57.480Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.

Applied to files:

  • holidays/locale/en_TC/LC_MESSAGES/TC.po
  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-09-26T13:58:49.363Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2960
File: holidays/locale/ca/LC_MESSAGES/ES.po:148-151
Timestamp: 2025-09-26T13:58:49.363Z
Learning: In the holidays project, when translating holiday names in .po files, the msgstr should be a faithful translation of the original msgid (in the country's default language), not influenced by English commentary or common en_US names. For example, "Día de la Pascua Granada" (Spanish) correctly translates to "Dia de la Pasqua Granada" (Catalan), even though the English comment refers to it as "Whit Monday".

Applied to files:

  • holidays/locale/en_TC/LC_MESSAGES/TC.po
  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-03-05T17:51:00.633Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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_TC/LC_MESSAGES/TC.po
  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-06-25T10:09:29.029Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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_TC/LC_MESSAGES/TC.po
  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-03-30T13:33:31.598Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2388
File: holidays/locale/fr/LC_MESSAGES/CI.po:28-101
Timestamp: 2025-03-30T13:33:31.598Z
Learning: In the holidays library, for localization files of the default language (like French for Ivory Coast in fr/LC_MESSAGES/CI.po), the best practice is to leave the message strings (msgstr) empty to avoid possible typos, since the message IDs (msgid) are already in the target language.

Applied to files:

  • holidays/locale/en_TC/LC_MESSAGES/TC.po
  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-03-08T11:28:48.652Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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_TC/LC_MESSAGES/TC.po
  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-03-31T19:37:57.691Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2394
File: holidays/locale/pt_PT/LC_MESSAGES/CV.po:31-88
Timestamp: 2025-03-31T19:37:57.691Z
Learning: In the holidays library localization pattern, when a locale file matches a country's default language (e.g., pt_PT for Cape Verde), the msgstr fields should be left empty. Only non-default language locale files should have translations in the msgstr fields.

Applied to files:

  • holidays/locale/en_TC/LC_MESSAGES/TC.po
  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-03-31T19:37:57.691Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2394
File: holidays/locale/pt_PT/LC_MESSAGES/CV.po:31-88
Timestamp: 2025-03-31T19:37:57.691Z
Learning: In the holidays library, when a locale file matches the country's default language (e.g., pt_PT for Cape Verde), the msgstr fields should be left empty. Only non-default language files should have filled msgstr fields with translations.

Applied to files:

  • holidays/locale/en_TC/LC_MESSAGES/TC.po
  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-04-17T17:08:48.082Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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_TC/LC_MESSAGES/TC.po
  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-03-19T16:53:00.375Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2354
File: holidays/countries/fiji.py:185-188
Timestamp: 2025-03-19T16:53:00.375Z
Learning: In the Fiji holidays implementation, the `special_public_holidays_observed` dictionary in `FijiStaticHolidays` is only used for exceptions to the normal observance rules, not for documenting all holidays. Only 2019's Constitution Day needed a special entry as it didn't follow the standard patterns.

Applied to files:

  • holidays/countries/turks_and_caicos_islands.py
  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-07-09T20:27:37.760Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2623
File: holidays/countries/christmas_island.py:110-112
Timestamp: 2025-07-09T20:27:37.760Z
Learning: In Christmas Island, ANZAC Day (April 25) follows the same observed holiday rules as other holidays, using the SAT_SUN_TO_NEXT_MON rule to move to Monday when it falls on a weekend. The implementation correctly uses `_add_observed` wrapper around `_add_anzac_day`.

Applied to files:

  • holidays/countries/turks_and_caicos_islands.py
  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-08-25T09:57:22.291Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2833
File: holidays/countries/uganda.py:50-56
Timestamp: 2025-08-25T09:57:22.291Z
Learning: In the holidays package, when adding comments for year-restricted holidays in Uganda and similar country modules, include specific legal or historical context such as the actual laws, parliamentary acts, or government decisions that established the holidays, rather than just generic "since YEAR" information. For example, reference the specific Parliament act, decree, or historical event that created the holiday.

Applied to files:

  • holidays/countries/turks_and_caicos_islands.py
  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-09-18T07:01:12.236Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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/turks_and_caicos_islands.py
  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-07-02T18:17:53.342Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2608
File: tests/countries/test_saint_vincent_and_the_grenadines.py:162-178
Timestamp: 2025-07-02T18:17:53.342Z
Learning: In the Saint Vincent and the Grenadines holidays implementation, New Year's Day is added without observed rules using `_add_new_years_day()` and should not include observed rule testing in its test method. Only holidays explicitly wrapped with `_add_observed()` have observed behavior.

Applied to files:

  • holidays/countries/turks_and_caicos_islands.py
  • tests/countries/test_turks_and_caicos_islands.py
📚 Learning: 2025-07-10T03:36:16.461Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2706
File: holidays/countries/cayman_islands.py:80-97
Timestamp: 2025-07-10T03:36:16.461Z
Learning: In the holidays library, date dictionaries that map years to specific dates (like queens_birthday_dates, spring_bank_dates, thanksgiving_day_dates, etc.) are typically defined within the _populate_public_holidays method rather than as module-level constants. This is the established library-wide pattern seen across multiple country implementations including United Kingdom, United States, Sri Lanka, and others.

Applied to files:

  • holidays/countries/turks_and_caicos_islands.py
  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-11-08T05:09:56.159Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_french_polynesia.py:19-22
Timestamp: 2025-11-08T05:09:56.159Z
Learning: In the vacanza/holidays project's test framework (PR #2881 onwards), the base class CommonCountryTests provides a default test_no_holidays implementation that automatically tests years=start_year - 1 for standard PUBLIC category cases. Individual country test files should only override test_no_holidays when the country supports additional non-PUBLIC categories (GOVERNMENT, WORKDAY, OPTIONAL, etc.) with different start years requiring separate validation.

Applied to files:

  • holidays/countries/turks_and_caicos_islands.py
  • tests/countries/test_turks_and_caicos_islands.py
  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-04-03T16:58:27.175Z
Learnt from: Wasif-Shahzad
Repo: vacanza/holidays PR: 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 internally through parent class implementations even when these constants don't appear directly in the file. Removing imports that seem unused based on a simple text search could break functionality.

Applied to files:

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

Applied to files:

  • holidays/countries/turks_and_caicos_islands.py
  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-04-05T04:50:40.752Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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:

  • holidays/countries/turks_and_caicos_islands.py
  • tests/countries/test_turks_and_caicos_islands.py
📚 Learning: 2025-03-30T18:22:11.939Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2388
File: holidays/countries/ivory_coast.py:127-128
Timestamp: 2025-03-30T18:22:11.939Z
Learning: The IvoryCoast class in holidays/countries/ivory_coast.py already includes documentation in its class docstring explaining the "day after" naming convention for Islamic holidays, noting that in the Islamic calendar, days begin at sunset and the "day after" refers to daylight hours following the night of celebration.

Applied to files:

  • holidays/countries/turks_and_caicos_islands.py
📚 Learning: 2025-04-18T21:13:55.589Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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/countries/turks_and_caicos_islands.py
📚 Learning: 2025-08-21T04:56:03.780Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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/turks_and_caicos_islands.py
📚 Learning: 2025-09-03T16:49:35.246Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_argentina.py:375-375
Timestamp: 2025-09-03T16:49:35.246Z
Learning: In the holidays library, national holiday tests use self.full_range (or similar comprehensive year ranges) even when explicit test dates only show modern observance. This is intentional for correctness and comprehensive coverage, unlike subdivision-specific holidays which have explicit year boundaries based on known start dates.

Applied to files:

  • holidays/countries/turks_and_caicos_islands.py
  • tests/countries/test_turks_and_caicos_islands.py
📚 Learning: 2025-09-14T04:41:10.139Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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:

  • holidays/countries/turks_and_caicos_islands.py
  • tests/countries/test_turks_and_caicos_islands.py
  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-12-07T18:09:57.513Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 3111
File: holidays/financial/ny_stock_exchange.py:63-65
Timestamp: 2025-12-07T18:09:57.513Z
Learning: In the NYSE holidays implementation (holidays/financial/ny_stock_exchange.py), the _add_observed method unconditionally overrides kwargs["rule"] based on the date's year because _move_holiday calls _add_observed with rule=None, and this None value needs to be replaced with the appropriate year-based rule (SUN_TO_NEXT_MON for years <= 1952, otherwise the class's observed_rule).

Applied to files:

  • holidays/countries/turks_and_caicos_islands.py
📚 Learning: 2025-06-14T20:43:15.370Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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/turks_and_caicos_islands.py
📚 Learning: 2025-04-03T16:58:27.175Z
Learnt from: Wasif-Shahzad
Repo: vacanza/holidays PR: 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/turks_and_caicos_islands.py
📚 Learning: 2025-08-21T04:56:03.780Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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.

Applied to files:

  • holidays/countries/turks_and_caicos_islands.py
📚 Learning: 2025-06-16T14:08:09.492Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2635
File: holidays/countries/bhutan.py:13-16
Timestamp: 2025-06-16T14:08:09.492Z
Learning: In the holidays library, translation is performed in the `_add_holiday` methods, not at the string level. Holiday strings passed to `_add_holiday_*` methods are processed through the translation machinery within those methods, so using `tr()` or `self.tr()` wrappers is unnecessary.

Applied to files:

  • holidays/countries/turks_and_caicos_islands.py
📚 Learning: 2025-05-13T13:23:11.375Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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/turks_and_caicos_islands.py
📚 Learning: 2025-08-26T20:10:05.288Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2834
File: holidays/financial/national_stock_exchange_of_india.py:38-44
Timestamp: 2025-08-26T20:10:05.288Z
Learning: For National Stock Exchange of India (NSE) holidays implementation, only `estimated_label = tr("%s (estimated)")` is needed for localization support. The `observed_label` and `observed_estimated_label` are not required for this financial market holidays implementation.

Applied to files:

  • holidays/countries/turks_and_caicos_islands.py
📚 Learning: 2025-12-15T22:50:33.654Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 3135
File: holidays/countries/united_states.py:1175-1178
Timestamp: 2025-12-15T22:50:33.654Z
Learning: In the holidays library (vacanza/holidays), for Puerto Rico and potentially other US territories, maintain the documented separation: place Spanish holiday name comments on one line, followed by a blank line, and then the English localization comment. Do not remove the blank line separator, as it documents the Spanish name (e.g., 'Día de la Abolición de la Esclavitud') while the English name below (e.g., 'Emancipation Day') is the actual localization.

Applied to files:

  • holidays/countries/turks_and_caicos_islands.py
📚 Learning: 2025-06-10T12:17:58.880Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2608
File: holidays/locale/en_VC/LC_MESSAGES/VC.po:1-14
Timestamp: 2025-06-10T12:17:58.880Z
Learning: In the holidays project, .po files should use the full multi-line header format including the project description, authors, website, and license information, rather than a single-line comment format.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-12-17T14:46:04.977Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 3138
File: holidays/locale/en_US/LC_MESSAGES/SE.po:99-99
Timestamp: 2025-12-17T14:46:04.977Z
Learning: Enforce that message comments in PO files under holidays/locale/en_US/LC_MESSAGES/*.po end with a period. For example, change '# Midsummer Eve' to '# Midsummer Eve.' to maintain consistency with other holiday comments. During reviews, scan for trailing punctuation in comments and ensure uniformity across all locale entries.

Applied to files:

  • holidays/locale/en_US/LC_MESSAGES/TC.po
📚 Learning: 2025-09-18T03:19:23.722Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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_turks_and_caicos_islands.py
📚 Learning: 2025-04-05T04:47:27.213Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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_turks_and_caicos_islands.py
📚 Learning: 2025-05-06T21:07:11.577Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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_turks_and_caicos_islands.py
📚 Learning: 2025-09-14T16:03:13.558Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_barbados.py:21-23
Timestamp: 2025-09-14T16:03:13.558Z
Learning: In tests/countries/test_barbados.py, using years_non_observed=range(2000, 2024) is intentional because all observed holiday examples fall within 2001-2023, making this range appropriate for limiting testing to years where observed holidays actually exist in the test data.

Applied to files:

  • tests/countries/test_turks_and_caicos_islands.py
  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-04-05T04:33:53.254Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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_turks_and_caicos_islands.py
📚 Learning: 2025-09-14T17:17:14.387Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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_turks_and_caicos_islands.py
📚 Learning: 2025-09-10T16:17:30.428Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_bosnia_and_herzegovina.py:21-24
Timestamp: 2025-09-10T16:17:30.428Z
Learning: Bosnia and Herzegovina holidays implementation currently lacks a start_year attribute. In tests/countries/test_bosnia_and_herzegovina.py, using cls.full_range = range(2000, 2050) is intentional to bound assertions and setup. Do not suggest replacing it with harness default full_range until start_year is introduced.

Applied to files:

  • tests/countries/test_turks_and_caicos_islands.py
📚 Learning: 2025-09-25T08:56:22.473Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_azerbaijan.py:23-24
Timestamp: 2025-09-25T08:56:22.473Z
Learning: In the vacanza/holidays project's test framework, TestCase.setUpClass is designed to handle pre-existing cls.full_range attributes. If a test class manually sets cls.full_range before calling super().setUpClass(), the framework will use cls.full_range.start and cls.full_range.stop to set start_year and end_year, then use cls.full_range as the years parameter. This allows test classes to define custom year ranges when needed while still integrating with the framework.

Applied to files:

  • tests/countries/test_turks_and_caicos_islands.py
📚 Learning: 2025-06-18T17:01:58.067Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2642
File: tests/countries/test_wallis_and_futuna.py:19-23
Timestamp: 2025-06-18T17:01:58.067Z
Learning: In the vacanza/holidays repository, the standard pattern for test class setUpClass methods is `super().setUpClass(HolidayClass)` or `super().setUpClass(HolidayClass, years=...)` where HolidayClass is passed as the first argument. This is the correct signature that matches the CommonCountryTests.setUpClass method which accepts test_class as the first parameter after cls. Pylint warnings about parameter count mismatch are false positives when comparing against TestCase.setUpClass instead of the immediate parent CommonCountryTests.setUpClass.

Applied to files:

  • tests/countries/test_turks_and_caicos_islands.py
📚 Learning: 2025-09-03T18:29:09.398Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2820
File: tests/countries/test_saint_helena_ascension_and_tristan_da_cunha.py:76-76
Timestamp: 2025-09-03T18:29:09.398Z
Learning: The assertNoNonObservedHoliday method in tests/common.py accepts a holidays object as its first parameter, followed by the dates to check. Usage like assertNoNonObservedHoliday(self.government_holidays_non_observed, obs_dt) is correct and intended behavior.

Applied to files:

  • tests/countries/test_turks_and_caicos_islands.py
📚 Learning: 2025-09-14T16:23:46.707Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_botswana.py:59-59
Timestamp: 2025-09-14T16:23:46.707Z
Learning: In Botswana's holiday tests, assertNonObservedHoliday(dt) is used to verify that certain holidays (like Easter holidays) stay on their original dates regardless of the observed holiday system, which is different from assertNoNonObservedHoliday that checks for absence of non-observed holidays.

Applied to files:

  • tests/countries/test_turks_and_caicos_islands.py
📚 Learning: 2025-09-14T16:23:46.707Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_botswana.py:59-59
Timestamp: 2025-09-14T16:23:46.707Z
Learning: The method assertNonObservedHoliday(dt) is a valid assertion method in the holidays test framework that verifies holidays occur on their original (non-observed) dates, which is different from assertNoNonObservedHoliday that checks for absence of non-observed holidays. It's used to test that certain holidays stay on fixed dates regardless of observed holiday rules.

Applied to files:

  • tests/countries/test_turks_and_caicos_islands.py
📚 Learning: 2025-07-09T21:16:35.145Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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_turks_and_caicos_islands.py
📚 Learning: 2025-11-27T13:48:37.538Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 3088
File: tests/countries/test_dr_congo.py:162-168
Timestamp: 2025-11-27T13:48:37.538Z
Learning: In DR Congo's holiday implementation (tests/countries/test_dr_congo.py), the test_congolese_genocide_memorial_day method cannot use assertNoNonObservedHoliday because when Aug 2 is observed on Aug 1 (in year 2026), that date already has another holiday: "Fête des parents" (Aug 1). The observed holiday overlaps with an existing non-observed holiday, making the standard non-observed holiday check inappropriate.

Applied to files:

  • tests/countries/test_turks_and_caicos_islands.py
📚 Learning: 2025-11-27T13:47:31.850Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 3088
File: tests/countries/test_dr_congo.py:55-65
Timestamp: 2025-11-27T13:47:31.850Z
Learning: In DR Congo's holiday implementation (tests/countries/test_dr_congo.py), the test_national_hero_patrice_emery_lumumba_day method cannot use assertNoNonObservedHoliday because when Jan 17 is observed on Jan 16 (in years 2016, 2021), that date already has another holiday: "Journée du héros national Laurent Désiré Kabila" (Jan 16). The observed holiday overlaps with an existing non-observed holiday, making the standard non-observed holiday check inappropriate.
<!--

Applied to files:

  • tests/countries/test_turks_and_caicos_islands.py
📚 Learning: 2025-04-04T10:52:41.546Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2398
File: holidays/countries/guinea.py:106-110
Timestamp: 2025-04-04T10:52:41.546Z
Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are properly covered by the test_eid_al_fitr_day() method, which tests both the regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).

Applied to files:

  • tests/countries/test_turks_and_caicos_islands.py
📚 Learning: 2025-09-17T09:07:56.459Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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_turks_and_caicos_islands.py
📚 Learning: 2025-09-17T09:07:56.459Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_paraguay.py:134-139
Timestamp: 2025-09-17T09:07:56.459Z
Learning: In the vacanza/holidays project, for 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)` rather than `self.full_range` with year conditions. This maintains consistency across the codebase and clearly separates the holiday period from the pre-holiday period using `assertNoHolidayName(name, range(self.start_year, specific_year))`.

Applied to files:

  • tests/countries/test_turks_and_caicos_islands.py
📚 Learning: 2025-09-10T13:46:06.329Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_canada.py:745-747
Timestamp: 2025-09-10T13:46:06.329Z
Learning: In the vacanza/holidays test framework, assertion methods like assertNoSubdivNuOptionalHolidayName correctly accept multiple range objects as separate arguments, such as assertNoSubdivNuOptionalHolidayName(name, range(CA.start_year, 2000), range(2020, 2050)). This is the intended usage pattern and should not be "fixed" by splitting into separate calls.

Applied to files:

  • tests/countries/test_turks_and_caicos_islands.py
📚 Learning: 2025-09-03T14:05:10.592Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_aruba.py:77-79
Timestamp: 2025-09-03T14:05:10.592Z
Learning: The assertNoHolidayName helper method in the vacanza/holidays test framework accepts both individual years (scalars) and iterables of years, making calls like assertNoHolidayName(name, AW.start_year, range(2023, 2050)) valid where AW.start_year is a single integer year.

Applied to files:

  • tests/countries/test_turks_and_caicos_islands.py
📚 Learning: 2025-11-28T02:24:17.418Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 3088
File: tests/countries/test_gabon.py:88-110
Timestamp: 2025-11-28T02:24:17.418Z
Learning: For Gabon's holiday implementation (tests/countries/test_gabon.py), all Islamic holiday dates are currently estimates. Therefore, the correct test pattern is to use assertIslamicNoEstimatedHolidayName for both specific known dates and the full range (e.g., test_eid_al_fitr and test_eid_al_adha), rather than using assertHolidayName for specific dates followed by assertIslamicNoEstimatedHolidayName for the range.

Applied to files:

  • tests/countries/test_turks_and_caicos_islands.py
📚 Learning: 2025-04-05T06:49:06.217Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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_turks_and_caicos_islands.py
📚 Learning: 2025-09-14T16:05:55.205Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_iran.py:28-28
Timestamp: 2025-09-14T16:05:55.205Z
Learning: In tests/countries/test_iran.py, using years=(self.start_year - 1, 2102) in the no-holiday test is intentional because Iran uses the Persian Calendar which has specific supported year range constraints, and 2102 represents the upper limit of the Persian Calendar's supported range, not just an arbitrary far-future date.

Applied to files:

  • tests/countries/test_turks_and_caicos_islands.py
📚 Learning: 2025-05-09T18:36:09.607Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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:

  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-09-14T07:26:25.431Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: holidays/countries/south_africa.py:69-75
Timestamp: 2025-09-14T07:26:25.431Z
Learning: When reviewing historical holiday implementations in the vacanza/holidays repository, trust the maintainers' research and implementation decisions for specific historical edge cases, especially when they can provide sources like Wikipedia or other historical documentation that supports unusual or complex date calculation rules during specific time periods.

Applied to files:

  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-04-23T14:55:35.504Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2489
File: holidays/countries/sao_tome_and_principe.py:22-26
Timestamp: 2025-04-23T14:55:35.504Z
Learning: References in holidays classes should only be included if they're used for test case cross-checks or provide historical context about when holidays were added/removed, not just for the sake of having more references.

Applied to files:

  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-09-17T15:16:16.192Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2944
File: holidays/countries/myanmar.py:183-191
Timestamp: 2025-09-17T15:16:16.192Z
Learning: The special_public_holidays formatting pattern in the holidays codebase follows a consistent convention: single entries per year use flat tuple format like `2024: (MONTH, DAY, name)`, while multiple entries per year use tuple-of-tuples format like `2024: ((MONTH, DAY, name), (MONTH, DAY, name))`. This pattern is used consistently across all countries.

Applied to files:

  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-08-08T10:33:55.695Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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:

  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-04-23T09:22:41.753Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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:

  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-08-03T11:30:30.357Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2774
File: holidays/countries/liberia.py:40-41
Timestamp: 2025-08-03T11:30:30.357Z
Learning: For the Liberia holidays implementation, there were presidential elections in 1975 (William Tolbert), so 1976 should be included as an inauguration year. The complete set of Liberian inauguration years should be {1960, 1964, 1968, 1972, 1976, 1986, 1998, 2006, 2012, 2018, 2024}.

Applied to files:

  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-07-10T03:36:16.461Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2706
File: holidays/countries/cayman_islands.py:80-97
Timestamp: 2025-07-10T03:36:16.461Z
Learning: In the holidays library, date dictionaries that map years to specific dates (like queens_birthday_dates, special holiday dates, etc.) are typically defined within the _populate_public_holidays method rather than as module-level constants. This is the established library-wide pattern and should be maintained for consistency.

Applied to files:

  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-06-15T10:15:39.883Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2615
File: tests/countries/test_anguilla.py:52-64
Timestamp: 2025-06-15T10:15:39.883Z
Learning: In the Anguilla holidays implementation, March 2 only has "James Ronald Webster Day" (from 2010 onwards). There is no "Sovereignty Day" holiday on this date. Queen's/King's Birthday holidays are in June, not March.

Applied to files:

  • snapshots/countries/TC_COMMON.json
📚 Learning: 2025-09-17T15:15:24.269Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2944
File: holidays/countries/myanmar.py:112-121
Timestamp: 2025-09-17T15:15:24.269Z
Learning: The Myanmar government's "continuous public days for 2024-2025" policy specifically covers Tabaung and Tazaungmon full moon days by bridging gaps with weekends, but does not apply to Myanmar New Year (Thingyan) extra days, which follow a separate policy that correctly uses `self._year >= 2024`.

Applied to files:

  • snapshots/countries/TC_COMMON.json
🧬 Code graph analysis (1)
tests/countries/test_turks_and_caicos_islands.py (1)
holidays/countries/turks_and_caicos_islands.py (1)
  • TurksAndCaicosIslands (24-136)
⏰ 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). (5)
  • GitHub Check: Test Python 3.10 on windows-latest
  • GitHub Check: Test Python 3.12 on windows-latest
  • GitHub Check: Test Python 3.13 on windows-latest
  • GitHub Check: Test Python 3.14 on windows-latest
  • GitHub Check: Test Python 3.11 on windows-latest
🔇 Additional comments (9)
holidays/locale/en_TC/LC_MESSAGES/TC.po (1)

17-20: LGTM! Localization entries properly added.

The metadata updates and new translation entries for National Day of Thanksgiving and Constitution Day are correctly positioned and formatted. Empty msgstr fields are appropriate for the default locale file.

Also applies to: 65-72

holidays/locale/en_US/LC_MESSAGES/TC.po (1)

17-20: LGTM! US localization entries properly added.

The metadata updates and translation entries for National Day of Thanksgiving and Constitution Day are correctly positioned and formatted. The msgstr fields appropriately contain the English translations for the en_US locale.

Also applies to: 66-73

tests/countries/test_turks_and_caicos_islands.py (4)

22-22: LGTM! Test setup follows project conventions.

The setUpClass update correctly uses super().setUpClass(TurksAndCaicosIslands) following the project's testing framework pattern.


26-26: LGTM! Dynamic year ranges properly implemented.

The test methods correctly use self.full_range, self.start_year, and self.end_year from the test framework, following the project's established patterns for comprehensive holiday testing.

Also applies to: 51-51, 64-64, 77-77, 102-105, 127-130, 134-134, 157-157, 180-183, 199-200, 217-217, 232-232


185-200: LGTM! National Day of Thanksgiving test updated correctly.

The test properly includes both the November-based dates (2020-2025) and the new August-based dates (2026-2028), accurately reflecting the transition in the holiday calculation. The year range assertions correctly validate the holiday exists from 2014 onwards.


202-213: LGTM! Constitution Day test properly structured.

The new test method follows the project's testing patterns, validating specific dates for 2026-2030 and asserting the holiday exists for the correct year range (2026 onwards).

snapshots/countries/TC_COMMON.json (1)

767-768: LGTM! Snapshot data correctly reflects the new holiday logic.

The snapshot entries for National Day of Thanksgiving and Constitution Day in August (starting 2026) are correctly generated. This file is auto-generated by make snapshot and accurately represents the changes in the main implementation.

Also applies to: 782-783, 798-799, 811-812, 824-825, 837-838, 851-852, 867-868, 882-883, 895-896, 908-909, 922-923, 937-938, 953-954, 968-969, 981-982, 994-995, 1008-1009, 1022-1023, 1037-1038, 1050-1051, 1063-1064, 1077-1078, 1092-1093, 1108-1109

holidays/countries/turks_and_caicos_islands.py (2)

42-42: The reference is solid—URL is accessible and the archived page correctly documents the 2026 Turks and Caicos holiday changes including Constitution Day's addition.


103-113: The helper methods are valid. All three methods are dynamically generated through the __getattr__ syntactic sugar system in holiday_base.py and match their respective token patterns:

  • _add_holiday_last_mon_of_aug (7 tokens): <last/nth> <weekday> of <month>
  • _add_holiday_4th_fri_of_nov (7 tokens): <last/nth> <weekday> of <month>
  • _add_holiday_1_day_prior_last_mon_of_aug (10 tokens): <n> day(s) <past/prior> <last/<nth> <weekday> of <month>

The implementation correctly structures the year-dependent logic for National Day of Thanksgiving and Constitution Day.


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.

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 30, 2025

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3182   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          307       307           
  Lines        18298     18304    +6     
  Branches      2335      2338    +3     
=========================================
+ Hits         18298     18304    +6     

☔ 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.

Copy link
Copy Markdown
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.

👍

@arkid15r arkid15r enabled auto-merge December 30, 2025 19:25
Copy link
Copy Markdown
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 🇹🇨

@arkid15r arkid15r added this pull request to the merge queue Dec 31, 2025
Merged via the queue into vacanza:dev with commit 3a523b5 Dec 31, 2025
33 checks passed
@KJhellico KJhellico deleted the upd-tc branch December 31, 2025 12:36
@arkid15r arkid15r mentioned this pull request Jan 5, 2026
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