Skip to content

Add comprehensive holiday categories documentation#2851

Merged
arkid15r merged 14 commits intovacanza:devfrom
tharu-jwd:document-holiday-categories
Nov 29, 2025
Merged

Add comprehensive holiday categories documentation#2851
arkid15r merged 14 commits intovacanza:devfrom
tharu-jwd:document-holiday-categories

Conversation

@tharu-jwd
Copy link
Copy Markdown
Contributor

Summary

This PR addresses issue #1717 by adding comprehensive documentation for holiday categories.

Changes Made

  • Created docs/holiday_categories.md: Complete documentation covering all available holiday categories including:

    • Official status categories (PUBLIC, GOVERNMENT, WORKDAY, UNOFFICIAL)
    • Institutional categories (BANK, SCHOOL, ARMED_FORCES)
    • Religious categories (CATHOLIC, ISLAMIC, HINDU, ORTHODOX, etc.)
    • Ethnic/cultural categories (ARMENIAN, TURKISH, SERBIAN, etc.)
    • Special categories (OPTIONAL, MANDATORY, HALF_DAY)
  • Enhanced docs/examples.md: Improved the holiday categories section with practical usage examples and reference link to detailed documentation

  • Added contributor: Added name to CONTRIBUTORS file

Documentation Features

  • Comprehensive category definitions with explanations
  • Practical code examples for single and multiple category usage
  • Implementation guidelines for contributors
  • Country-specific usage examples

Test Coverage

This is a documentation-only change. All examples have been tested to ensure they work correctly.

Closes #1717

- Create detailed holiday_categories.md documentation
- Enhance examples.md with improved category usage examples
- Add professional documentation for all 25+ category types
- Include usage examples and implementation guidelines
- Add contributor name to CONTRIBUTORS file

Addresses issue vacanza#1717
Copilot AI review requested due to automatic review settings August 22, 2025 19:11
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Aug 22, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Summary by CodeRabbit

  • Documentation
    • Expanded Holiday Categories support documentation with detailed examples covering basic usage, multiple categories, religious categories, and supported categories lookup.
    • Added comprehensive guide on holiday category taxonomy, filtering options, and implementation guidelines.

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

Walkthrough

Adds comprehensive holiday category documentation (docs/holiday_categories.md), expands category examples in docs/examples.md, and appends a new entry to CONTRIBUTORS. No code, API, or runtime changes.

Changes

Cohort / File(s) Summary
Documentation: Holiday categories
docs/holiday_categories.md
New document defining a taxonomy of holiday categories (official, institutional, special, religious, ethnic/cultural), enumerating categories with examples, usage patterns, per-country supported_categories, and contribution/implementation guidance.
Documentation: Examples updated
docs/examples.md
Expanded the Holiday categories section into multiple subsections with concrete examples (single vs iterable categories, recommended holidays.constants, combining categories, religious filters) and sample outputs; no runtime code changes.
Repository metadata
CONTRIBUTORS
Added contributor entry: Tharupahan Jayawardana.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Areas to spot-check:

  • docs/holiday_categories.md for correctness/consistency of taxonomy and examples.
  • docs/examples.md examples for accurate usage of holidays.constants and presented outputs.

Possibly related PRs

Suggested reviewers

  • arkid15r
  • PPsyrius

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add comprehensive holiday categories documentation' accurately and clearly summarizes the main change—adding comprehensive documentation for holiday categories.
Description check ✅ Passed The description is directly related to the changeset, outlining all three file modifications (docs/holiday_categories.md, docs/examples.md, CONTRIBUTORS) and explaining the features and testing performed.
Linked Issues check ✅ Passed The PR addresses all requirements from issue #1717: explains category purposes with examples, explicitly defines UNOFFICIAL category, provides multi-entity holiday examples, and clarifies inclusion/exclusion policy for community days.
Out of Scope Changes check ✅ Passed All changes are scoped to the requirements: documentation files, examples, and contributor credit. No unrelated code modifications or logic changes introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 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 7df06fc and ea7f27b.

📒 Files selected for processing (2)
  • docs/examples.md (2 hunks)
  • docs/holiday_categories.md (1 hunks)
🧰 Additional context used
🧠 Learnings (84)
📓 Common learnings
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_brazil.py:28-30
Timestamp: 2025-09-10T14:35:54.603Z
Learning: In the holidays project, the test_no_holidays method should test ALL supported_categories (via categories=CountryClass.supported_categories) rather than just the default PUBLIC category, to ensure comprehensive validation that no holidays exist before start_year across any supported category including OPTIONAL and subdivision categories.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2783
File: tests/countries/test_eritrea.py:130-147
Timestamp: 2025-08-18T13:06:16.919Z
Learning: The `assertLocalizedHolidays` method in the vacanza/holidays project requires a complete list of all holidays from all categories (PUBLIC, GOVERNMENT, etc.), not just the holidays from the default category. This is a framework requirement for comprehensive localization testing.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2631
File: tests/countries/test_sint_maarten.py:62-0
Timestamp: 2025-06-14T21:12:07.224Z
Learning: KJhellico prefers to focus on completing and reviewing the main holiday implementation code before doing detailed reviews of the corresponding test files.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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`.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2851
File: docs/holiday_categories.md:272-282
Timestamp: 2025-08-26T14:43:53.605Z
Learning: In the holidays library documentation, it's strongly advisable to recommend the use of constants from holidays.constants (e.g., PUBLIC, CATHOLIC) instead of direct string values when specifying holiday categories, as constants provide better type safety, IDE support, and prevent typos.
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: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_bahamas.py:27-29
Timestamp: 2025-09-14T16:02:15.480Z
Learning: For Bahamas in the holidays library, only the default PUBLIC category is used, so there's no need to specify `categories=Bahamas.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_bahamas.py:27-29
Timestamp: 2025-09-14T16:02:15.480Z
Learning: For Bahamas in the holidays library, only the default PUBLIC category is used, so there's no need to specify `categories=Bahamas.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_belize.py:28-28
Timestamp: 2025-09-14T05:43:22.932Z
Learning: For Belize in the holidays library, only the default PUBLIC category is used, so there's no need to specify `categories=Belize.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_bahrain.py:27-29
Timestamp: 2025-09-14T16:02:49.378Z
Learning: For Bahrain in the holidays library, only the default PUBLIC category is used, so there's no need to specify `categories=Bahrain.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior and Bahrain doesn't even define supported_categories.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2854
File: README.md:1557-1562
Timestamp: 2025-08-25T22:13:30.310Z
Learning: Sudan holidays implementation inherits from IslamicHolidays but does not expose an ISLAMIC category in its supported_categories attribute. The Supported Categories column in README.md should remain blank for Sudan.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_bahrain.py:27-29
Timestamp: 2025-09-14T16:02:49.378Z
Learning: For Bahrain in the holidays library, only the default PUBLIC category is used, so there's no need to specify `categories=Bahrain.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_brunei.py:27-29
Timestamp: 2025-09-29T08:09:54.436Z
Learning: For Brunei in the holidays library, only the default PUBLIC category is used, so there's no need to specify `categories=Brunei.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior and Brunei doesn't define supported_categories.
📚 Learning: 2025-09-14T16:02:15.480Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_bahamas.py:27-29
Timestamp: 2025-09-14T16:02:15.480Z
Learning: For Bahamas in the holidays library, only the default PUBLIC category is used, so there's no need to specify `categories=Bahamas.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior.

Applied to files:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-09-14T16:02:49.378Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_bahrain.py:27-29
Timestamp: 2025-09-14T16:02:49.378Z
Learning: For Bahrain in the holidays library, only the default PUBLIC category is used, so there's no need to specify `categories=Bahrain.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior and Bahrain doesn't even define supported_categories.

Applied to files:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-09-14T16:02:49.378Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_bahrain.py:27-29
Timestamp: 2025-09-14T16:02:49.378Z
Learning: For Bahrain in the holidays library, only the default PUBLIC category is used, so there's no need to specify `categories=Bahrain.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior.

Applied to files:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-08-26T14:43:53.605Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2851
File: docs/holiday_categories.md:272-282
Timestamp: 2025-08-26T14:43:53.605Z
Learning: In the holidays library documentation, it's strongly advisable to recommend the use of constants from holidays.constants (e.g., PUBLIC, CATHOLIC) instead of direct string values when specifying holiday categories, as constants provide better type safety, IDE support, and prevent typos.

Applied to files:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-09-14T16:19:23.651Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-09-14T05:43:22.932Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_belize.py:28-28
Timestamp: 2025-09-14T05:43:22.932Z
Learning: For Belize in the holidays library, only the default PUBLIC category is used, so there's no need to specify `categories=Belize.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior.

Applied to files:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-09-29T08:09:54.436Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_brunei.py:27-29
Timestamp: 2025-09-29T08:09:54.436Z
Learning: For Brunei in the holidays library, only the default PUBLIC category is used, so there's no need to specify `categories=Brunei.supported_categories` in test_no_holidays methods, as it would be equivalent to the default behavior and Brunei doesn't define supported_categories.

Applied to files:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-09-04T09:48:11.738Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_andorra.py:29-31
Timestamp: 2025-09-04T09:48:11.738Z
Learning: In the holidays library, when accessing supported_categories in test files, the library-wide standard is to use the full class name (e.g., Andorra.supported_categories) rather than aliases (e.g., AD.supported_categories), maintaining consistency across the codebase.

Applied to files:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-05-04T10:29:46.780Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-08-28T02:42:52.755Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2863
File: tests/countries/test_georgia.py:31-36
Timestamp: 2025-08-28T02:42:52.755Z
Learning: In the holidays framework, when no categories parameter is specified in a country class instantiation (e.g., `Georgia(years=2025)`), the PUBLIC category is used by default. There's no need to explicitly specify `categories=PUBLIC` or import the PUBLIC constant for such test cases.

Applied to files:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-09-20T12:24:28.864Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_curacao.py:29-29
Timestamp: 2025-09-20T12:24:28.864Z
Learning: For Curacao in the holidays library, PUBLIC and HALF_DAY categories have different start years - PUBLIC holidays begin at the country's start_year while HALF_DAY holidays begin in 2010. When testing no_holidays methods, each category should be tested separately with appropriate pre-start years rather than using a unified supported_categories approach.

Applied to files:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-04-08T14:46:10.656Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-03-04T11:32:45.095Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (`government`, `mandatory`, and `public`), which are utilized by syntactic sugar methods.

Applied to files:

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

Applied to files:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-03-04T11:32:45.095Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (like `special_government_holidays`, `special_mandatory_holidays`, and `special_public_holidays`), which are utilized by syntactic sugar methods to pick up the appropriate holidays based on the selected category.

Applied to files:

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

Applied to files:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-08-24T11:55:06.810Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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:

  • docs/examples.md
  • docs/holiday_categories.md
📚 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:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-07-17T11:07:04.986Z
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.

Applied to files:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-08-03T12:59:53.286Z
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.

Applied to files:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-07-15T15:00:32.728Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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:

  • docs/examples.md
📚 Learning: 2025-10-28T17:26:45.090Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 3026
File: holidays/countries/spain.py:189-189
Timestamp: 2025-10-28T17:26:45.090Z
Learning: In the vacanza/holidays codebase, `_populate` methods (such as `_populate_public_holidays`, `_populate_subdiv_holidays`, and subdivision-specific methods like `_populate_subdiv_XX_public_holidays`) intentionally do not include return type annotations like `-> None`. This is a consistent pattern across country implementations (e.g., Germany, United States, Spain) and should not be changed even when static analysis tools like Ruff suggest adding them.
<!-- </add_learning>

Applied to files:

  • docs/examples.md
  • docs/holiday_categories.md
📚 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:

  • docs/examples.md
  • docs/holiday_categories.md
📚 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:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-09-28T05:42:12.777Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: tests/countries/test_indonesia.py:221-223
Timestamp: 2025-09-28T05:42:12.777Z
Learning: In tests/countries/test_indonesia.py, the manual set inclusion checks using get_named and years_found for Lunar New Year (test_lunar_new_year) and Vesak Day (test_vesak_day) are intentional and should remain until both holidays get their own `{insert}_no_estimated` flags implemented, rather than using standard harness assertions like assertHolidayName/assertNoHolidayName.

Applied to files:

  • docs/examples.md
📚 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:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-07-02T18:21:59.302Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2608
File: tests/countries/test_saint_vincent_and_the_grenadines.py:162-178
Timestamp: 2025-07-02T18:21:59.302Z
Learning: In the Saint Vincent and the Grenadines holiday tests, for holidays without observed rules that only require a single assertHolidayName call, pass the holiday name directly as a string literal rather than storing it in a variable first for cleaner, more concise code.

Applied to files:

  • docs/examples.md
  • docs/holiday_categories.md
📚 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:

  • docs/examples.md
📚 Learning: 2025-09-14T06:39:08.485Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2881
File: holidays/countries/south_africa.py:163-170
Timestamp: 2025-09-14T06:39:08.485Z
Learning: In South Africa's holidays implementation (holidays/countries/south_africa.py), the 2021 election uses the literal "Municipal elections" instead of the local_elections constant ("Local Government Elections") - this inconsistency is intentional and should not be flagged as an issue.

Applied to files:

  • docs/examples.md
📚 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:

  • docs/examples.md
  • docs/holiday_categories.md
📚 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:

  • docs/examples.md
  • docs/holiday_categories.md
📚 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:

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

Applied to files:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-08-19T20:04:26.215Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2831
File: holidays/countries/south_sudan.py:28-31
Timestamp: 2025-08-19T20:04:26.215Z
Learning: In the holidays library, message comments (comments describing message format templates like "%s (estimated)." and "%s (observed, estimated).") always end with a period, even when the corresponding string values do not include the period.

Applied to files:

  • docs/examples.md
📚 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:

  • docs/examples.md
  • docs/holiday_categories.md
📚 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:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-04-03T12:36:41.201Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 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:

  • docs/examples.md
  • docs/holiday_categories.md
📚 Learning: 2025-06-06T14:40:31.932Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 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:

  • docs/examples.md
  • docs/holiday_categories.md
📚 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:

  • docs/examples.md
📚 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:

  • docs/examples.md
📚 Learning: 2025-06-18T10:21:01.376Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2642
File: holidays/countries/france.py:300-319
Timestamp: 2025-06-18T10:21:01.376Z
Learning: In the France holidays implementation, legislative years for holiday changes should be hard-coded rather than extracted into constants, as this maintains consistency with the existing codebase pattern and provides historical accuracy for specific legislative acts.

Applied to files:

  • docs/examples.md
📚 Learning: 2025-03-19T16