-
-
Notifications
You must be signed in to change notification settings - Fork 554
Add Bhutan holidays #2635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Bhutan holidays #2635
Conversation
…ate holiday names to Tibetan script
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com> Signed-off-by: Aneesh Angane <113509759+code-with-aneesh@users.noreply.github.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com> Signed-off-by: Aneesh Angane <113509759+code-with-aneesh@users.noreply.github.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com> Signed-off-by: Aneesh Angane <113509759+code-with-aneesh@users.noreply.github.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com> Signed-off-by: Aneesh Angane <113509759+code-with-aneesh@users.noreply.github.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com> Signed-off-by: Aneesh Angane <113509759+code-with-aneesh@users.noreply.github.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com> Signed-off-by: Aneesh Angane <113509759+code-with-aneesh@users.noreply.github.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com> Signed-off-by: Aneesh Angane <113509759+code-with-aneesh@users.noreply.github.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com> Signed-off-by: Aneesh Angane <113509759+code-with-aneesh@users.noreply.github.com>
Update: Remove exact dates for future years.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (2)
README.md (1)
108-110
: Update README.md supported country count to 229A fresh count of entries in the COUNTRIES registry (excluding FINANCIAL) shows 229, not 225. Please update the hard-coded figure.
- README.md (lines 108-110): change “225 country codes” → “229 country codes”
Diff:
- We currently support 225 country codes. The standard way to refer to a country is by using its [ISO + We currently support 229 country codes. The standard way to refer to a country is by using its [ISOsnapshots/countries/BT_13.json (1)
1-758
: Same content flag raised inBT_43.json
See earlier comment – if duplication is intentional, all good; if not, regenerate.
Just add missing tests for holidays that are missing, and seems it's done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
♻️ Duplicate comments (2)
snapshots/countries/BT_43.json (1)
1-758
: Snapshot files are auto-generated – regenerate, don’t hand-edit
If you touched this file manually, please runmake snapshot
so the data is produced by the generator rather than hand-edited JSON.snapshots/countries/BT_44.json (1)
1-758
: Snapshot files are auto-generated – regenerate, don’t hand-edit
If you touched this file manually, please runmake snapshot
so the data is produced by the generator rather than hand-edited JSON.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (22)
snapshots/countries/BT_11.json
(1 hunks)snapshots/countries/BT_12.json
(1 hunks)snapshots/countries/BT_13.json
(1 hunks)snapshots/countries/BT_14.json
(1 hunks)snapshots/countries/BT_15.json
(1 hunks)snapshots/countries/BT_21.json
(1 hunks)snapshots/countries/BT_22.json
(1 hunks)snapshots/countries/BT_23.json
(1 hunks)snapshots/countries/BT_24.json
(1 hunks)snapshots/countries/BT_31.json
(1 hunks)snapshots/countries/BT_32.json
(1 hunks)snapshots/countries/BT_33.json
(1 hunks)snapshots/countries/BT_34.json
(1 hunks)snapshots/countries/BT_41.json
(1 hunks)snapshots/countries/BT_42.json
(1 hunks)snapshots/countries/BT_43.json
(1 hunks)snapshots/countries/BT_44.json
(1 hunks)snapshots/countries/BT_45.json
(1 hunks)snapshots/countries/BT_COMMON.json
(1 hunks)snapshots/countries/BT_GA.json
(1 hunks)snapshots/countries/BT_TY.json
(1 hunks)tests/countries/test_bhutan.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (42)
📓 Common learnings
Learnt from: KJhellico
PR: vacanza/holidays#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: PPsyrius
PR: vacanza/holidays#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.").
Learnt from: KJhellico
PR: vacanza/holidays#2684
File: holidays/locale/it/LC_MESSAGES/SM.po:13-13
Timestamp: 2025-06-28T10:39:19.185Z
Learning: In the holidays project, .po file header comments use the format "# [Country] holidays." for default language files (without trailing hash) and "# [Country] holidays [locale] localization." for non-default language files (also without trailing hash).
Learnt from: KJhellico
PR: vacanza/holidays#2593
File: holidays/countries/senegal.py:66-110
Timestamp: 2025-06-06T14:40:31.932Z
Learning: In the holidays library, within the _populate_public_holidays method, holidays should be arranged by calendar type (Islamic holidays first, then Gregorian holidays) without additional type grouping comments. The organization by calendar type is sufficient and follows the project's established conventions.
Learnt from: KJhellico
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:171-183
Timestamp: 2025-03-29T15:15:05.919Z
Learning: In the Fiji holidays implementation, the maintainers are aware of the need to extend the MAWLID_DATES dictionary beyond 2025 when future official references become available, and will do so when appropriate. No suggestions about extending this dictionary should be made in future reviews.
Learnt from: PPsyrius
PR: vacanza/holidays#2643
File: holidays/countries/mauritius.py:144-169
Timestamp: 2025-06-19T02:34:18.382Z
Learning: Custom holiday classes that extend _CustomHinduHolidays, _CustomIslamicHolidays, _CustomBuddhistHolidays, etc. in the holidays library do not use docstrings. They follow a pattern of using only inline comments above date dictionaries, as seen in Malaysia, Singapore, UAE, and other country implementations.
Learnt from: KJhellico
PR: vacanza/holidays#2614
File: README.md:108-108
Timestamp: 2025-06-14T20:13:29.536Z
Learning: In the vacanza/holidays repository, the team prefers to manually update the country count in README.md when adding new countries, with tests in place to verify the count stays accurate. They are satisfied with this approach and do not want it automated.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: tests/countries/test_finland.py:23-26
Timestamp: 2025-05-09T18:36:09.607Z
Learning: The holidays project prioritizes complete historical coverage in tests, verifying holidays from their first year of observance (e.g., 1853 for Finland) through future projections, rather than using shorter sliding windows.
Learnt from: KJhellico
PR: vacanza/holidays#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
PR: vacanza/holidays#2720
File: README.md:108-110
Timestamp: 2025-07-17T11:07:04.986Z
Learning: Always verify country counts in the holidays library by checking the current count in the COUNTRIES dictionary in holidays/registry.py directly, rather than relying on information from previous PRs, as the count changes frequently with new country additions.
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: tests/countries/test_andorra.py:23-28
Timestamp: 2025-05-06T21:07:11.577Z
Learning: In the holidays project, test methods for country holidays follow a standard form where year ranges are explicitly recreated in each test method rather than being stored as class variables, to maintain consistency across all country tests.
Learnt from: PPsyrius
PR: vacanza/holidays#2632
File: holidays/countries/solomon_islands.py:95-98
Timestamp: 2025-06-16T12:28:31.641Z
Learning: Library-wide holiday patterns and their optimizations should be handled at the base class level (like InternationalHolidays) rather than documenting workarounds in individual country modules. This maintains separation of concerns and avoids documentation duplication.
Learnt from: PPsyrius
PR: vacanza/holidays#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.
Learnt from: PPsyrius
PR: vacanza/holidays#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.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:278-377
Timestamp: 2025-03-05T02:35:03.298Z
Learning: For Macau holiday implementations, it's preferable to maintain separate methods for different holiday categories (MANDATORY, GOVERNMENT, PUBLIC) as they are based on different sets of laws, making the code easier to maintain despite having multiple year-based conditionals.
📚 Learning: in the holidays project, snapshot files (like snapshots/countries/tl_common.json) are auto-generated...
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.
Applied to files:
snapshots/countries/BT_22.json
snapshots/countries/BT_COMMON.json
snapshots/countries/BT_15.json
snapshots/countries/BT_21.json
snapshots/countries/BT_45.json
snapshots/countries/BT_43.json
snapshots/countries/BT_31.json
snapshots/countries/BT_32.json
snapshots/countries/BT_34.json
snapshots/countries/BT_42.json
snapshots/countries/BT_12.json
snapshots/countries/BT_GA.json
snapshots/countries/BT_14.json
snapshots/countries/BT_13.json
snapshots/countries/BT_24.json
snapshots/countries/BT_41.json
snapshots/countries/BT_44.json
snapshots/countries/BT_23.json
snapshots/countries/BT_TY.json
snapshots/countries/BT_11.json
snapshots/countries/BT_33.json
📚 Learning: snapshot files in the holidays library (like those in snapshots/countries/) are generated automatica...
Learnt from: KJhellico
PR: vacanza/holidays#2654
File: snapshots/countries/CV_RS.json:471-478
Timestamp: 2025-06-24T17:26:17.728Z
Learning: Snapshot files in the holidays library (like those in snapshots/countries/) are generated automatically and should not be manually edited. Any issues with snapshot content should be addressed in the source code that generates them, not in the snapshot files themselves.
Applied to files:
snapshots/countries/BT_22.json
snapshots/countries/BT_COMMON.json
snapshots/countries/BT_15.json
snapshots/countries/BT_21.json
snapshots/countries/BT_45.json
snapshots/countries/BT_43.json
snapshots/countries/BT_31.json
snapshots/countries/BT_32.json
snapshots/countries/BT_34.json
snapshots/countries/BT_42.json
snapshots/countries/BT_12.json
snapshots/countries/BT_GA.json
snapshots/countries/BT_14.json
snapshots/countries/BT_13.json
snapshots/countries/BT_24.json
snapshots/countries/BT_41.json
snapshots/countries/BT_44.json
snapshots/countries/BT_23.json
snapshots/countries/BT_TY.json
snapshots/countries/BT_11.json
snapshots/countries/BT_33.json
📚 Learning: json files in the `snapshots/` directory (like `snapshots/countries/tw_common.json`) are automatical...
Learnt from: PPsyrius
PR: vacanza/holidays#2349
File: snapshots/countries/TW_COMMON.json:9-12
Timestamp: 2025-03-13T07:50:10.598Z
Learning: JSON files in the `snapshots/` directory (like `snapshots/countries/TW_COMMON.json`) are automatically generated by the `make snapshot` command and not meant to be manually edited.
Applied to files:
snapshots/countries/BT_22.json
snapshots/countries/BT_COMMON.json
snapshots/countries/BT_15.json
snapshots/countries/BT_21.json
snapshots/countries/BT_45.json
snapshots/countries/BT_43.json
snapshots/countries/BT_31.json
snapshots/countries/BT_32.json
snapshots/countries/BT_34.json
snapshots/countries/BT_42.json
snapshots/countries/BT_12.json
snapshots/countries/BT_GA.json
snapshots/countries/BT_14.json
snapshots/countries/BT_13.json
snapshots/countries/BT_24.json
snapshots/countries/BT_41.json
snapshots/countries/BT_44.json
snapshots/countries/BT_23.json
snapshots/countries/BT_TY.json
snapshots/countries/BT_11.json
snapshots/countries/BT_33.json
📚 Learning: custom holiday classes that extend _customhinduholidays, _customislamicholidays, _custombuddhistholi...
Learnt from: PPsyrius
PR: vacanza/holidays#2643
File: holidays/countries/mauritius.py:144-169
Timestamp: 2025-06-19T02:34:18.382Z
Learning: Custom holiday classes that extend _CustomHinduHolidays, _CustomIslamicHolidays, _CustomBuddhistHolidays, etc. in the holidays library do not use docstrings. They follow a pattern of using only inline comments above date dictionaries, as seen in Malaysia, Singapore, UAE, and other country implementations.
Applied to files:
snapshots/countries/BT_22.json
snapshots/countries/BT_COMMON.json
snapshots/countries/BT_15.json
snapshots/countries/BT_21.json
snapshots/countries/BT_45.json
snapshots/countries/BT_43.json
snapshots/countries/BT_31.json
snapshots/countries/BT_32.json
snapshots/countries/BT_34.json
snapshots/countries/BT_42.json
snapshots/countries/BT_12.json
snapshots/countries/BT_GA.json
snapshots/countries/BT_14.json
snapshots/countries/BT_13.json
snapshots/countries/BT_24.json
snapshots/countries/BT_41.json
snapshots/countries/BT_44.json
snapshots/countries/BT_23.json
snapshots/countries/BT_TY.json
snapshots/countries/BT_11.json
snapshots/countries/BT_33.json
📚 Learning: in the fiji holidays implementation, the maintainers are aware of the need to extend the mawlid_date...
Learnt from: KJhellico
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:171-183
Timestamp: 2025-03-29T15:15:05.919Z
Learning: In the Fiji holidays implementation, the maintainers are aware of the need to extend the MAWLID_DATES dictionary beyond 2025 when future official references become available, and will do so when appropriate. No suggestions about extending this dictionary should be made in future reviews.
Applied to files:
snapshots/countries/BT_22.json
snapshots/countries/BT_COMMON.json
snapshots/countries/BT_15.json
snapshots/countries/BT_21.json
snapshots/countries/BT_45.json
snapshots/countries/BT_43.json
snapshots/countries/BT_31.json
snapshots/countries/BT_32.json
snapshots/countries/BT_34.json
snapshots/countries/BT_42.json
snapshots/countries/BT_12.json
snapshots/countries/BT_GA.json
snapshots/countries/BT_14.json
snapshots/countries/BT_13.json
snapshots/countries/BT_24.json
snapshots/countries/BT_41.json
snapshots/countries/BT_44.json
snapshots/countries/BT_23.json
snapshots/countries/BT_TY.json
snapshots/countries/BT_11.json
snapshots/countries/BT_33.json
📚 Learning: in the fiji holidays implementation, the `special_public_holidays_observed` dictionary in `fijistati...
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:185-188
Timestamp: 2025-03-19T16:53:00.375Z
Learning: In the Fiji holidays implementation, the `special_public_holidays_observed` dictionary in `FijiStaticHolidays` is only used for exceptions to the normal observance rules, not for documenting all holidays. Only 2019's Constitution Day needed a special entry as it didn't follow the standard patterns.
Applied to files:
snapshots/countries/BT_22.json
snapshots/countries/BT_COMMON.json
snapshots/countries/BT_15.json
snapshots/countries/BT_21.json
snapshots/countries/BT_45.json
snapshots/countries/BT_43.json
snapshots/countries/BT_31.json
snapshots/countries/BT_32.json
snapshots/countries/BT_34.json
snapshots/countries/BT_42.json
snapshots/countries/BT_12.json
snapshots/countries/BT_GA.json
snapshots/countries/BT_14.json
snapshots/countries/BT_13.json
snapshots/countries/BT_24.json
snapshots/countries/BT_41.json
snapshots/countries/BT_44.json
snapshots/countries/BT_23.json
snapshots/countries/BT_TY.json
snapshots/countries/BT_11.json
snapshots/countries/BT_33.json
📚 Learning: in the holidays project, .po file header comments use the format "# [country] holidays." for default...
Learnt from: KJhellico
PR: vacanza/holidays#2684
File: holidays/locale/it/LC_MESSAGES/SM.po:13-13
Timestamp: 2025-06-28T10:39:19.185Z
Learning: In the holidays project, .po file header comments use the format "# [Country] holidays." for default language files (without trailing hash) and "# [Country] holidays [locale] localization." for non-default language files (also without trailing hash).
Applied to files:
snapshots/countries/BT_22.json
snapshots/countries/BT_COMMON.json
snapshots/countries/BT_21.json
snapshots/countries/BT_45.json
snapshots/countries/BT_43.json
snapshots/countries/BT_31.json
snapshots/countries/BT_34.json
snapshots/countries/BT_GA.json
snapshots/countries/BT_14.json
snapshots/countries/BT_24.json
snapshots/countries/BT_41.json
snapshots/countries/BT_44.json
snapshots/countries/BT_23.json
snapshots/countries/BT_11.json
📚 Learning: the holidays library uses a standard file header across country implementation files that includes c...
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:1-12
Timestamp: 2025-04-24T04:59:38.436Z
Learning: The holidays library uses a standard file header across country implementation files that includes copyright information, authors, website, and license details. New country implementation files should follow this same header format.
Applied to files:
snapshots/countries/BT_22.json
snapshots/countries/BT_COMMON.json
snapshots/countries/BT_15.json
snapshots/countries/BT_21.json
snapshots/countries/BT_45.json
snapshots/countries/BT_43.json
snapshots/countries/BT_31.json
snapshots/countries/BT_32.json
snapshots/countries/BT_34.json
snapshots/countries/BT_42.json
snapshots/countries/BT_12.json
snapshots/countries/BT_GA.json
snapshots/countries/BT_14.json
snapshots/countries/BT_13.json
snapshots/countries/BT_24.json
snapshots/countries/BT_41.json
snapshots/countries/BT_44.json
snapshots/countries/BT_23.json
snapshots/countries/BT_TY.json
snapshots/countries/BT_11.json
snapshots/countries/BT_33.json
📚 Learning: the holidays library uses a standard file header format across all country implementation files cons...
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/french_polynesia.py:1-12
Timestamp: 2025-06-19T05:54:49.792Z
Learning: The holidays library uses a standard file header format across all country implementation files consisting of a comprehensive comment block with project description, authors, website, and license information. Country files do not use module-level docstrings but instead rely on this header format followed by class-level docstrings.
Applied to files:
snapshots/countries/BT_22.json
snapshots/countries/BT_GA.json
📚 Learning: in the holidays library implementation, explicit holiday dates (like diwali in fiji) are only define...
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.
Applied to files:
snapshots/countries/BT_22.json
snapshots/countries/BT_COMMON.json
snapshots/countries/BT_15.json
snapshots/countries/BT_21.json
snapshots/countries/BT_45.json
snapshots/countries/BT_43.json
snapshots/countries/BT_31.json
snapshots/countries/BT_32.json
snapshots/countries/BT_34.json
snapshots/countries/BT_42.json
snapshots/countries/BT_12.json
snapshots/countries/BT_GA.json
snapshots/countries/BT_14.json
snapshots/countries/BT_13.json
snapshots/countries/BT_24.json
snapshots/countries/BT_41.json
snapshots/countries/BT_44.json
snapshots/countries/BT_23.json
snapshots/countries/BT_TY.json
snapshots/countries/BT_11.json
snapshots/countries/BT_33.json
📚 Learning: in the holidays library, date dictionaries that map years to specific dates (like queens_birthday_da...
Learnt from: PPsyrius
PR: vacanza/holidays#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:
snapshots/countries/BT_22.json
snapshots/countries/BT_COMMON.json
snapshots/countries/BT_15.json
snapshots/countries/BT_21.json
snapshots/countries/BT_45.json
snapshots/countries/BT_43.json
snapshots/countries/BT_31.json
snapshots/countries/BT_32.json
snapshots/countries/BT_34.json
snapshots/countries/BT_42.json
snapshots/countries/BT_12.json
snapshots/countries/BT_GA.json
snapshots/countries/BT_14.json
snapshots/countries/BT_13.json
snapshots/countries/BT_24.json
snapshots/countries/BT_41.json
snapshots/countries/BT_44.json
snapshots/countries/BT_23.json
snapshots/countries/BT_TY.json
snapshots/countries/BT_11.json
snapshots/countries/BT_33.json
📚 Learning: in the holidays library, date dictionaries that map years to specific dates (like queens_birthday_da...
Learnt from: PPsyrius
PR: vacanza/holidays#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/BT_22.json
snapshots/countries/BT_COMMON.json
snapshots/countries/BT_21.json
snapshots/countries/BT_45.json
snapshots/countries/BT_43.json
snapshots/countries/BT_31.json
snapshots/countries/BT_32.json
snapshots/countries/BT_34.json
snapshots/countries/BT_42.json
snapshots/countries/BT_12.json
snapshots/countries/BT_GA.json
snapshots/countries/BT_14.json
snapshots/countries/BT_13.json
snapshots/countries/BT_24.json
snapshots/countries/BT_41.json
snapshots/countries/BT_44.json
snapshots/countries/BT_23.json
snapshots/countries/BT_TY.json
snapshots/countries/BT_11.json
snapshots/countries/BT_33.json
📚 Learning: for the liberia holidays implementation, there were presidential elections in 1975 (william tolbert)...
Learnt from: KJhellico
PR: vacanza/holidays#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/BT_22.json
snapshots/countries/BT_COMMON.json
snapshots/countries/BT_21.json
snapshots/countries/BT_45.json
snapshots/countries/BT_43.json
snapshots/countries/BT_31.json
snapshots/countries/BT_32.json
snapshots/countries/BT_34.json
snapshots/countries/BT_42.json
snapshots/countries/BT_12.json
snapshots/countries/BT_GA.json
snapshots/countries/BT_14.json
snapshots/countries/BT_13.json
snapshots/countries/BT_24.json
snapshots/countries/BT_41.json
snapshots/countries/BT_44.json
snapshots/countries/BT_23.json
snapshots/countries/BT_TY.json
snapshots/countries/BT_11.json
snapshots/countries/BT_33.json
📚 Learning: the holidays project prioritizes complete historical coverage in tests, verifying holidays from thei...
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: tests/countries/test_finland.py:23-26
Timestamp: 2025-05-09T18:36:09.607Z
Learning: The holidays project prioritizes complete historical coverage in tests, verifying holidays from their first year of observance (e.g., 1853 for Finland) through future projections, rather than using shorter sliding windows.
Applied to files:
snapshots/countries/BT_COMMON.json
snapshots/countries/BT_15.json
snapshots/countries/BT_21.json
tests/countries/test_bhutan.py
snapshots/countries/BT_45.json
snapshots/countries/BT_43.json
snapshots/countries/BT_31.json
snapshots/countries/BT_32.json
snapshots/countries/BT_34.json
snapshots/countries/BT_42.json
snapshots/countries/BT_12.json
snapshots/countries/BT_14.json
snapshots/countries/BT_13.json
snapshots/countries/BT_24.json
snapshots/countries/BT_41.json
snapshots/countries/BT_44.json
snapshots/countries/BT_23.json
snapshots/countries/BT_TY.json
snapshots/countries/BT_11.json
snapshots/countries/BT_33.json
📚 Learning: the holidays library intentionally duplicates label strings like `estimated_label` across country mo...
Learnt from: PPsyrius
PR: vacanza/holidays#2676
File: holidays/countries/tunisia.py:25-25
Timestamp: 2025-06-25T10:12:30.448Z
Learning: The holidays library intentionally duplicates label strings like `estimated_label` across country modules rather than centralizing them. This duplication is the established library-wide approach and should not be suggested for refactoring.
Applied to files:
snapshots/countries/BT_COMMON.json
📚 Learning: in the holidays project test files, the standard method name for testing the absence of holidays is ...
Learnt from: PPsyrius
PR: vacanza/holidays#2750
File: tests/countries/test_germany.py:46-46
Timestamp: 2025-07-24T15:21:31.632Z
Learning: In the holidays project test files, the standard method name for testing the absence of holidays is `test_no_holidays`, not more descriptive names like `test_no_holidays_before_1990`. This is a consistent naming convention across country test files like France and Germany.
Applied to files:
snapshots/countries/BT_COMMON.json
tests/countries/test_bhutan.py
📚 Learning: in the vacanza/holidays project, the method assertlocalizedholidays in country test files should be ...
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: tests/countries/test_guinea.py:237-239
Timestamp: 2025-04-02T18:38:35.164Z
Learning: In the vacanza/holidays project, the method assertLocalizedHolidays in country test files should be called with positional parameters rather than named parameters to maintain consistency with the rest of the codebase.
Applied to files:
snapshots/countries/BT_COMMON.json
📚 Learning: in the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun...
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants 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:
snapshots/countries/BT_COMMON.json
📚 Learning: for holiday tests in the vacanza/holidays project, structure tests by individual holidays rather tha...
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:47:27.213Z
Learning: For holiday tests in the vacanza/holidays project, structure tests by individual holidays rather than by years. Each test method should focus on a specific holiday and test it across multiple years (from start_year through 2050) using helper methods like `assertHolidayName`. For fixed holidays, use generators like `(f"{year}-01-01" for year in range(1991, 2051))`. For movable holidays, specify individual dates for specific years followed by a range check.
Applied to files:
snapshots/countries/BT_COMMON.json
tests/countries/test_bhutan.py
📚 Learning: in the holidays library, comments explaining year restrictions for holidays should be placed above t...
Learnt from: PPsyrius
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:73-77
Timestamp: 2025-04-03T12:36:41.201Z
Learning: In the Holidays library, comments explaining year restrictions for holidays should be placed above the year check conditional statement, not inside it. Example format:
```python
# reason why goes here
if start_year <= self._year <= end_year:
# Holiday name
self._add_holiday_function(tr("Holiday Name"))
```
Applied to files:
snapshots/countries/BT_COMMON.json
tests/countries/test_bhutan.py
📚 Learning: library-wide holiday patterns and their optimizations should be handled at the base class level (lik...
Learnt from: PPsyrius
PR: vacanza/holidays#2632
File: holidays/countries/solomon_islands.py:95-98
Timestamp: 2025-06-16T12:28:31.641Z
Learning: Library-wide holiday patterns and their optimizations should be handled at the base class level (like InternationalHolidays) rather than documenting workarounds in individual country modules. This maintains separation of concerns and avoids documentation duplication.
Applied to files:
snapshots/countries/BT_COMMON.json
📚 Learning: in the vacanza/holidays repository, the standard pattern for test class setupclass methods is `super...
Learnt from: PPsyrius
PR: vacanza/holidays#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_bhutan.py
📚 Learning: in the vacanza/holidays project, country test files consistently use range(start_year, 2050) which i...
Learnt from: PPsyrius
PR: vacanza/holidays#2629
File: tests/countries/test_namibia.py:22-23
Timestamp: 2025-06-14T10:58:43.636Z
Learning: In the vacanza/holidays project, country test files consistently use range(start_year, 2050) which intentionally excludes 2050 and stops at 2049. This is a library-wide implementation pattern, not an off-by-one error.
Applied to files:
tests/countries/test_bhutan.py
📚 Learning: in the holidays project, test methods for country holidays follow a standard form where year ranges ...
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: tests/countries/test_andorra.py:23-28
Timestamp: 2025-05-06T21:07:11.577Z
Learning: In the holidays project, test methods for country holidays follow a standard form where year ranges are explicitly recreated in each test method rather than being stored as class variables, to maintain consistency across all country tests.
Applied to files:
tests/countries/test_bhutan.py
snapshots/countries/BT_12.json
snapshots/countries/BT_13.json
snapshots/countries/BT_TY.json
📚 Learning: in the vacanza/holidays project tests, when testing holidays that span multiple consecutive days acr...
Learnt from: PPsyrius
PR: vacanza/holidays#2601
File: tests/countries/test_mongolia.py:128-156
Timestamp: 2025-06-15T11:52:39.572Z
Learning: In the vacanza/holidays project tests, when testing holidays that span multiple consecutive days across many years (like Mongolia's National Festival spanning July 11-13), prefer explicit for loops over complex nested generator expressions with unpacking. The explicit loops are more readable, easier to maintain, and better communicate the testing intent even though the Big O complexity is equivalent.
Applied to files:
tests/countries/test_bhutan.py
📚 Learning: for the ethiopia holidays class, it's appropriate to add a return type hint only to the `_is_leap_ye...
Learnt from: PPsyrius
PR: vacanza/holidays#2490
File: holidays/countries/ethiopia.py:45-45
Timestamp: 2025-04-23T09:59:19.886Z
Learning: For the Ethiopia holidays class, it's appropriate to add a return type hint only to the `_is_leap_year` method to match the base class implementation in `holidays/holiday_base.py`, while keeping other methods without type hints to maintain consistency with other country implementations.
Applied to files:
tests/countries/test_bhutan.py
📚 Learning: in the holidays library, the base `holidaybase._populate()` method already includes a guard clause t...
Learnt from: PPsyrius
PR: vacanza/holidays#2609
File: holidays/countries/nauru.py:57-60
Timestamp: 2025-06-14T11:04:31.180Z
Learning: In the holidays library, the base `HolidayBase._populate()` method already includes a guard clause that prevents holiday population methods like `_populate_public_holidays()` from being called when the year is before `start_year` or after `end_year`. Therefore, individual country implementations do not need to add their own guard clauses for years before independence or other start dates.
Applied to files:
tests/countries/test_bhutan.py
📚 Learning: in the holidays project, test files follow a dual testing approach: individual methods test specific...
Learnt from: PPsyrius
PR: vacanza/holidays#2386
File: tests/countries/test_nepal.py:499-536
Timestamp: 2025-04-05T06:49:06.217Z
Learning: In the holidays project, test files follow a dual testing approach: individual methods test specific holidays across multiple years, while comprehensive year-specific tests (e.g., `test_2025`) verify all holidays for a specific year in a single assertion. Both approaches serve different testing purposes and complement each other.
Applied to files:
tests/countries/test_bhutan.py
📚 Learning: in christmas island's holiday implementation, the test_christmas_day method cannot use assertnononob...
Learnt from: KJhellico
PR: vacanza/holidays#2623
File: tests/countries/test_christmas_island.py:136-146
Timestamp: 2025-07-09T21:16:35.145Z
Learning: In Christmas Island's holiday implementation, the test_christmas_day method cannot use assertNoNonObservedHoliday because in some years observed Christmas Day overlaps with Boxing Day when both holidays are moved due to weekend conflicts, causing the standard non-observed holiday check to fail inappropriately.
Applied to files:
tests/countries/test_bhutan.py
📚 Learning: in the saint vincent and the grenadines holiday tests, for holidays without observed rules that only...
Learnt from: KJhellico
PR: vacanza/holidays#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:
tests/countries/test_bhutan.py
📚 Learning: in the saint vincent and the grenadines holidays implementation, new year's day is added without obs...
Learnt from: KJhellico
PR: vacanza/holidays#2608
File: tests/countries/test_saint_vincent_and_the_grenadines.py:162-178
Timestamp: 2025-07-02T18:17:53.342Z
Learning: In the Saint Vincent and the Grenadines holidays implementation, New Year's Day is added without observed rules using `_add_new_years_day()` and should not include observed rule testing in its test method. Only holidays explicitly wrapped with `_add_observed()` have observed behavior.
Applied to files:
tests/countries/test_bhutan.py
📚 Learning: in the guinea holidays implementation, observed eid al-fitr cases are properly covered by the test_e...
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:106-110
Timestamp: 2025-04-04T10:52:41.546Z
Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are properly covered by the test_eid_al_fitr_day() method, which tests both the regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).
Applied to files:
tests/countries/test_bhutan.py
📚 Learning: in the holidays project, tests for movable holidays (like easter monday) should always use static da...
Learnt from: KJhellico
PR: vacanza/holidays#2532
File: tests/countries/test_cocos_islands.py:78-89
Timestamp: 2025-05-12T15:31:58.079Z
Learning: In the holidays project, tests for movable holidays (like Easter Monday) should always use static date sets only, not calculation functions.
Applied to files:
tests/countries/test_bhutan.py
📚 Learning: for turkmenistan holiday tests, use this class structure: `class testturkmenistan(commoncountrytests...
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:31-49
Timestamp: 2025-04-05T04:50:40.752Z
Learning: For Turkmenistan holiday tests, use this class structure: `class TestTurkmenistan(CommonCountryTests, TestCase)` with imports `from unittest import TestCase`, `from holidays.countries import Turkmenistan, TM, TKM`, and `from tests.common import CommonCountryTests`. Ensure to call `super().setUp()` in the setUp method.
Applied to files:
tests/countries/test_bhutan.py
📚 Learning: in the guinea holidays implementation, observed eid al-fitr cases are covered by the test_eid_al_fit...
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:106-110
Timestamp: 2025-04-04T10:52:41.546Z
Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are covered by the test_eid_al_fitr_day() method, which tests both regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).
Applied to files:
tests/countries/test_bhutan.py
📚 Learning: snapshot files in the `snapshots/` directory are automatically generated by `scripts/generate_snapsh...
Learnt from: KJhellico
PR: vacanza/holidays#2375
File: snapshots/countries/AR_G.json:2-2008
Timestamp: 2025-03-26T22:40:52.932Z
Learning: Snapshot files in the `snapshots/` directory are automatically generated by `scripts/generate_snapshots.py` and are intended for internal use only. There is no point in analyzing or suggesting changes to their contents as they are not meant to be manually edited.
Applied to files:
snapshots/countries/BT_43.json
📚 Learning: snapshot files in the `snapshots/` directory are auto-generated by the `make snapshot` command and u...
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: snapshots/countries/FR_MF.json:658-662
Timestamp: 2025-06-18T10:36:52.263Z
Learning: Snapshot files in the `snapshots/` directory are auto-generated by the `make snapshot` command and use `en_US` locale when the countries/markets entities support localization (l10n). The localization happens at the application level, not in the snapshot files themselves.
Applied to files:
snapshots/countries/BT_43.json
📚 Learning: in the vacanza/holidays repository, the team prefers to manually update the country count in readme....
Learnt from: KJhellico
PR: vacanza/holidays#2614
File: README.md:108-108
Timestamp: 2025-06-14T20:13:29.536Z
Learning: In the vacanza/holidays repository, the team prefers to manually update the country count in README.md when adding new countries, with tests in place to verify the count stays accurate. They are satisfied with this approach and do not want it automated.
Applied to files:
snapshots/countries/BT_43.json
📚 Learning: always verify the current count in the countries dictionary by checking the actual file rather than ...
Learnt from: KJhellico
PR: vacanza/holidays#2687
File: README.md:108-108
Timestamp: 2025-07-15T15:00:32.728Z
Learning: Always verify the current count in the COUNTRIES dictionary by checking the actual file rather than relying on previously recorded counts, as the count changes with each merged PR that adds new countries.
Applied to files:
snapshots/countries/BT_43.json
📚 Learning: for holiday definitions in the holidays package, keep comments simple with just the holiday name (e....
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:86-88
Timestamp: 2025-04-23T09:22:41.753Z
Learning: For holiday definitions in the holidays package, keep comments simple with just the holiday name (e.g., "# Independence Day.") rather than including dates or historical context, as the function names already encode the date information.
Applied to files:
snapshots/countries/BT_32.json
snapshots/countries/BT_42.json
📚 Learning: in the holidays library codebase, country implementation files in holidays/countries/ follow a stand...
Learnt from: PPsyrius
PR: vacanza/holidays#2638
File: holidays/countries/svalbard_and_jan_mayen.py:1-12
Timestamp: 2025-06-16T11:42:28.293Z
Learning: In the holidays library codebase, country implementation files in holidays/countries/ follow a standard convention of NOT having module-level docstrings. They start with the license header comment block, followed by imports, then class definitions. This is consistent across all country implementations like austria.py, belgium.py, canada.py, etc.
Applied to files:
snapshots/countries/BT_GA.json
⏰ 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). (3)
- GitHub Check: Test build on macos-latest
- GitHub Check: Test build on windows-latest
- GitHub Check: Test build on ubuntu-latest
🔇 Additional comments (23)
snapshots/countries/BT_34.json (1)
1-757
: Snapshot looks fine – just confirm it’s generator output.Nothing stands out as an obvious manual tweak. As usual, double-check that the file was produced by
make snapshot
; otherwise, re-run the generator to avoid merge conflicts later.snapshots/countries/BT_14.json (1)
1-757
: LGTM – autogenerated snapshot.Content format (semicolon-separated names, ISO dates) aligns with other snapshots. No action needed if this came from the standard snapshot step.
snapshots/countries/BT_31.json (1)
1-757
: Snapshot file – verify, don’t hand-edit
snapshots/countries/BT_31.json
is an auto-generated artefact (produced bymake snapshot
).
If the diff only reflects new Bhutan holiday logic, great. If you had to touch this file manually, roll back and let the generator do the work; otherwise future snapshots will drift.No further review needed here.
snapshots/countries/BT_42.json (1)
1-757
: Snapshot file – verify, don’t hand-editSame note as for
BT_31.json
: snapshot content must flow from the code, not vice-versa. Confirm the Bhutan provider populates these dates correctly and rerunmake snapshot
if anything looks off.All good if auto-generated.
snapshots/countries/BT_45.json (1)
1-757
: Snapshot looks good and follows auto-generation conventions
Dates, naming, and use of semicolons all match existing snapshot style. No action needed here.snapshots/countries/BT_32.json (1)
1-757
: All clear – snapshot content aligns with project standards
Structure and formatting are consistent with other auto-generated country snapshots. Nothing to tweak.snapshots/countries/BT_33.json (1)
1-758
: Snapshot file – looks auto-generated and consistent.No red flags. Assuming this JSON came straight from
make snapshot
, we're good.snapshots/countries/BT_41.json (1)
1-758
: Snapshot file – LGTM.Same note as above: appears untouched by hand, aligns with expected pattern.
snapshots/countries/BT_23.json (1)
1-758
: Auto-generated snapshot acknowledgedFile appears to be a valid, machine-generated holiday snapshot (JSON structure correct; semicolon usage for multi-holiday dates follows project convention). No manual changes required.
snapshots/countries/BT_21.json (1)
1-758
: Auto-generated snapshot acknowledgedContent and formatting align with the library’s snapshot standards; nothing further to flag.
snapshots/countries/BT_GA.json (1)
1-758
: No review needed for auto-generated snapshots
Snapshot JSONs are created bymake snapshot
; issues should be fixed in the holiday-generation code, not here.snapshots/countries/BT_12.json (1)
1-758
: No review needed for auto-generated snapshots
As above, snapshots are auto-generated and normally left untouched.snapshots/countries/BT_TY.json (1)
1-757
: Auto-generated snapshot – LGTMSnapshot content follows the expected
make snapshot
format. No manual edits or issues detected.snapshots/countries/BT_15.json (1)
1-912
: Auto-generated snapshot – LGTMFile appears fully machine-generated and consistent with project conventions. Nothing further to review.
snapshots/countries/BT_13.json (1)
1-757
: Snapshot file looks sound – no further action.Values appear properly generated (semicolon-separated when multiple holidays fall on the same date) and the file follows the project’s auto-snapshot format. No manual tweaks required. 👍
snapshots/countries/BT_11.json (1)
1-757
: Snapshot generation confirmed – keep it auto-generated.Everything aligns with the expected snapshot conventions. Just make sure this file (and the rest of the BT_* set) originated from
make snapshot
, not hand edits, to avoid drift.snapshots/countries/BT_24.json (1)
1-757
: Snapshot file – no manual review required
This JSON was generated viamake snapshot
; content is data-only and looks well-formed.snapshots/countries/BT_22.json (1)
1-757
: Snapshot file – no manual review required
Auto-generated holiday snapshot appears structurally consistent.snapshots/countries/BT_COMMON.json (1)
1-758
: Snapshot file looks comprehensive and well-structured.This auto-generated snapshot provides extensive coverage of Bhutan holidays from 2007-2050, including both fixed holidays (Winter Solstice, National Day, etc.) and movable holidays calculated from Tibetan and Hindu calendars (Losar, Lord Buddha's Parinirvana, etc.). The data appears consistent with the holiday implementation.
tests/countries/test_bhutan.py (4)
19-261
: Well-structured test implementation.The test file follows project conventions well with proper imports, class structure, and comprehensive coverage of both fixed and movable holidays. The subdivision testing for Thimphu-specific holidays is properly implemented, and the 2024 localization test provides good validation.
34-41
: Consider closing the missing parentheses.Line 38-40 are missing closing parentheses for the generator expressions.
def test_birthday_anniversary_of_his_majesty_the_king(self): name = "Birth Anniversary of His Majesty the King" self.assertHolidayName( name, - (f"{year}-02-21" for year in range(2007, 2050)), - (f"{year}-02-22" for year in range(2007, 2050)), - (f"{year}-02-23" for year in range(2007, 2050)), + (f"{year}-02-21" for year in range(2007, 2050)), + (f"{year}-02-22" for year in range(2007, 2050)), + (f"{year}-02-23" for year in range(2007, 2050)), )⛔ Skipped due to learnings
Learnt from: PPsyrius PR: vacanza/holidays#2416 File: tests/countries/test_turkmenistan.py:52-64 Timestamp: 2025-04-05T04:47:27.213Z Learning: For holiday tests in the vacanza/holidays project, structure tests by individual holidays rather than by years. Each test method should focus on a specific holiday and test it across multiple years (from start_year through 2050) using helper methods like `assertHolidayName`. For fixed holidays, use generators like `(f"{year}-01-01" for year in range(1991, 2051))`. For movable holidays, specify individual dates for specific years followed by a range check.
Learnt from: PPsyrius PR: vacanza/holidays#2601 File: tests/countries/test_mongolia.py:128-156 Timestamp: 2025-06-15T11:52:39.572Z Learning: In the vacanza/holidays project tests, when testing holidays that span multiple consecutive days across many years (like Mongolia's National Festival spanning July 11-13), prefer explicit for loops over complex nested generator expressions with unpacking. The explicit loops are more readable, easier to maintain, and better communicate the testing intent even though the Big O complexity is equivalent.
Learnt from: PPsyrius PR: vacanza/holidays#2386 File: tests/countries/test_nepal.py:499-536 Timestamp: 2025-04-05T06:49:06.217Z Learning: In the holidays project, test files follow a dual testing approach: individual methods test specific holidays across multiple years, while comprehensive year-specific tests (e.g., `test_2025`) verify all holidays for a specific year in a single assertion. Both approaches serve different testing purposes and complement each other.
Learnt from: PPsyrius PR: vacanza/holidays#2629 File: tests/countries/test_namibia.py:22-23 Timestamp: 2025-06-14T10:58:43.636Z Learning: In the vacanza/holidays project, country test files consistently use range(start_year, 2050) which intentionally excludes 2050 and stops at 2049. This is a library-wide implementation pattern, not an off-by-one error.
Learnt from: KJhellico PR: vacanza/holidays#2530 File: tests/countries/test_andorra.py:23-28 Timestamp: 2025-05-06T21:07:11.577Z Learning: In the holidays project, test methods for country holidays follow a standard form where year ranges are explicitly recreated in each test method rather than being stored as class variables, to maintain consistency across all country tests.
Learnt from: PPsyrius PR: vacanza/holidays#2750 File: tests/countries/test_germany.py:46-46 Timestamp: 2025-07-24T15:21:31.632Z Learning: In the holidays project test files, the standard method name for testing the absence of holidays is `test_no_holidays`, not more descriptive names like `test_no_holidays_before_1990`. This is a consistent naming convention across country test files like France and Germany.
Learnt from: PPsyrius PR: vacanza/holidays#2750 File: tests/countries/test_germany.py:46-46 Timestamp: 2025-07-24T15:21:31.632Z Learning: In the holidays project test files, the standard method name for testing the absence of holidays is `test_no_holidays`, not more descriptive names like `test_no_holidays_before_1990`. This is a consistent naming convention across country test files like France and Germany.
Learnt from: PPsyrius PR: vacanza/holidays#2398 File: holidays/countries/guinea.py:73-77 Timestamp: 2025-04-03T12:36:41.201Z Learning: In the Holidays library, comments explaining year restrictions for holidays should be placed above the year check conditional statement, not inside it. Example format: ```python # reason why goes here if start_year <= self._year <= end_year: # Holiday name self._add_holiday_function(tr("Holiday Name")) ```
Learnt from: KJhellico PR: vacanza/holidays#2623 File: tests/countries/test_christmas_island.py:136-146 Timestamp: 2025-07-09T21:16:35.145Z Learning: In Christmas Island's holiday implementation, the test_christmas_day method cannot use assertNoNonObservedHoliday because in some years observed Christmas Day overlaps with Boxing Day when both holidays are moved due to weekend conflicts, causing the standard non-observed holiday check to fail inappropriately.
Learnt from: KJhellico PR: vacanza/holidays#2608 File: tests/countries/test_saint_vincent_and_the_grenadines.py:162-178 Timestamp: 2025-07-02T18:17:53.342Z Learning: In the Saint Vincent and the Grenadines holidays implementation, New Year's Day is added without observed rules using `_add_new_years_day()` and should not include observed rule testing in its test method. Only holidays explicitly wrapped with `_add_observed()` have observed behavior.
Learnt from: KJhellico PR: vacanza/holidays#2398 File: holidays/countries/guinea.py:106-110 Timestamp: 2025-04-04T10:52:41.546Z Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are properly covered by the test_eid_al_fitr_day() method, which tests both the regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).
Learnt from: KJhellico PR: vacanza/holidays#2398 File: holidays/countries/guinea.py:106-110 Timestamp: 2025-04-04T10:52:41.546Z Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are covered by the test_eid_al_fitr_day() method, which tests both regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).
Learnt from: PPsyrius PR: vacanza/holidays#2537 File: tests/countries/test_finland.py:23-26 Timestamp: 2025-05-09T18:36:09.607Z Learning: The holidays project prioritizes complete historical coverage in tests, verifying holidays from their first year of observance (e.g., 1853 for Finland) through future projections, rather than using shorter sliding windows.
174-174
: Verify Dashain holiday coverage for Bhutan
I couldn’t locate anyDashain
logic in holidays/countries/bhutan.py. Please confirm whether Dashain is intentionally omitted for 2012–2013 (making the test range correct) or if the implementation should be updated to include those years.• holidays/countries/bhutan.py: look for an
_add_dashain
(or equivalent) method
• tests/countries/test_bhutan.py:assertHolidayName(name, (*range(2007, 2012), *range(2014, 2025)))
135-135
: Manual check: Birth Anniversary of Guru Rinpoche in 2027
I wasn’t able to locate a_add_birth_of_guru_rinpoche
definition in holidays/countries/bhutan.py, yet the test skips 2027. Please confirm whether “Birth Anniversary of Guru Rinpoche” should be observed in 2027 and, if so, adjust the test’s ranges:
- tests/countries/test_bhutan.py, line 135
self.assertHolidayName(name, range(2007, 2027), range(2028, 2050))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
I have a question regarding calendars/tibetian.py
-- it doesn't seem it has its own script generator similar to other calendars here. How are we going to keep this calendar updated?
We can later make traditional generator based on data from here. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @Prateekshit73!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
README.md
(2 hunks)holidays/countries/__init__.py
(1 hunks)holidays/registry.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (47)
📓 Common learnings
Learnt from: KJhellico
PR: vacanza/holidays#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: PPsyrius
PR: vacanza/holidays#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.").
Learnt from: KJhellico
PR: vacanza/holidays#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
PR: vacanza/holidays#2593
File: holidays/countries/senegal.py:66-110
Timestamp: 2025-06-06T14:40:31.932Z
Learning: In the holidays library, within the _populate_public_holidays method, holidays should be arranged by calendar type (Islamic holidays first, then Gregorian holidays) without additional type grouping comments. The organization by calendar type is sufficient and follows the project's established conventions.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: tests/countries/test_finland.py:23-26
Timestamp: 2025-05-09T18:36:09.607Z
Learning: The holidays project prioritizes complete historical coverage in tests, verifying holidays from their first year of observance (e.g., 1853 for Finland) through future projections, rather than using shorter sliding windows.
Learnt from: KJhellico
PR: vacanza/holidays#2614
File: README.md:108-108
Timestamp: 2025-06-14T20:13:29.536Z
Learning: In the vacanza/holidays repository, the team prefers to manually update the country count in README.md when adding new countries, with tests in place to verify the count stays accurate. They are satisfied with this approach and do not want it automated.
Learnt from: KJhellico
PR: vacanza/holidays#2684
File: holidays/locale/it/LC_MESSAGES/SM.po:13-13
Timestamp: 2025-06-28T10:39:19.185Z
Learning: In the holidays project, .po file header comments use the format "# [Country] holidays." for default language files (without trailing hash) and "# [Country] holidays [locale] localization." for non-default language files (also without trailing hash).
Learnt from: PPsyrius
PR: vacanza/holidays#2643
File: holidays/countries/mauritius.py:144-169
Timestamp: 2025-06-19T02:34:18.382Z
Learning: Custom holiday classes that extend _CustomHinduHolidays, _CustomIslamicHolidays, _CustomBuddhistHolidays, etc. in the holidays library do not use docstrings. They follow a pattern of using only inline comments above date dictionaries, as seen in Malaysia, Singapore, UAE, and other country implementations.
Learnt from: KJhellico
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:171-183
Timestamp: 2025-03-29T15:15:05.919Z
Learning: In the Fiji holidays implementation, the maintainers are aware of the need to extend the MAWLID_DATES dictionary beyond 2025 when future official references become available, and will do so when appropriate. No suggestions about extending this dictionary should be made in future reviews.
Learnt from: PPsyrius
PR: vacanza/holidays#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.
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: tests/countries/test_andorra.py:23-28
Timestamp: 2025-05-06T21:07:11.577Z
Learning: In the holidays project, test methods for country holidays follow a standard form where year ranges are explicitly recreated in each test method rather than being stored as class variables, to maintain consistency across all country tests.
Learnt from: PPsyrius
PR: vacanza/holidays#2632
File: holidays/countries/solomon_islands.py:95-98
Timestamp: 2025-06-16T12:28:31.641Z
Learning: Library-wide holiday patterns and their optimizations should be handled at the base class level (like InternationalHolidays) rather than documenting workarounds in individual country modules. This maintains separation of concerns and avoids documentation duplication.
Learnt from: PPsyrius
PR: vacanza/holidays#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.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:278-377
Timestamp: 2025-03-05T02:35:03.298Z
Learning: For Macau holiday implementations, it's preferable to maintain separate methods for different holiday categories (MANDATORY, GOVERNMENT, PUBLIC) as they are based on different sets of laws, making the code easier to maintain despite having multiple year-based conditionals.
📚 Learning: the countries dictionary in holidays/registry.py contains 211 entries as confirmed by kjhellico in p...
Learnt from: KJhellico
PR: vacanza/holidays#2623
File: README.md:0-0
Timestamp: 2025-07-10T11:00:13.195Z
Learning: The COUNTRIES dictionary in holidays/registry.py contains 211 entries as confirmed by KJhellico in PR #2623, not 214 as previously calculated.
Applied to files:
holidays/registry.py
holidays/countries/__init__.py
README.md
📚 Learning: always verify country counts in the countries dictionary by checking the current count in the countr...
Learnt from: KJhellico
PR: vacanza/holidays#2635
File: README.md:108-110
Timestamp: 2025-08-03T12:59:53.286Z
Learning: Always verify country counts in the COUNTRIES dictionary by checking the current count in the COUNTRIES dictionary in holidays/registry.py directly, rather than relying on information from previous PRs, as the count changes frequently with new country additions.
Applied to files:
holidays/registry.py
holidays/countries/__init__.py
README.md
📚 Learning: in the holidays/registry.py file, countries dictionary entries should use the class name (without sp...
Learnt from: KJhellico
PR: vacanza/holidays#2483
File: holidays/registry.py:177-177
Timestamp: 2025-04-18T21:13:55.589Z
Learning: In the holidays/registry.py file, COUNTRIES dictionary entries should use the class name (without spaces) as the first element of the tuple (e.g., "TurksAndCaicosIslands"), not the human-readable country name with spaces.
Applied to files:
holidays/registry.py
📚 Learning: when verifying country counts in the holidays library, always check the current count in the countri...
Learnt from: KJhellico
PR: vacanza/holidays#2687
File: README.md:108-108
Timestamp: 2025-07-15T15:00:32.728Z
Learning: When verifying country counts in the holidays library, always check the current count in the COUNTRIES dictionary in holidays/registry.py rather than relying on previously recorded counts, as new countries may have been added in merged PRs.
Applied to files:
holidays/registry.py
holidays/countries/__init__.py
README.md
📚 Learning: always verify country counts in the holidays library by checking the current count in the countries ...
Learnt from: KJhellico
PR: vacanza/holidays#2720
File: README.md:108-110
Timestamp: 2025-07-17T11:07:04.986Z
Learning: Always verify country counts in the holidays library by checking the current count in the COUNTRIES dictionary in holidays/registry.py directly, rather than relying on information from previous PRs, as the count changes frequently with new country additions.
Applied to files:
holidays/registry.py
holidays/countries/__init__.py
README.md
📚 Learning: the countries dictionary in holidays/registry.py contains exactly 215 entries as of pr #2716, with f...
Learnt from: PPsyrius
PR: vacanza/holidays#2716
File: holidays/registry.py:164-164
Timestamp: 2025-07-14T19:32:44.256Z
Learning: The COUNTRIES dictionary in holidays/registry.py contains exactly 215 entries as of PR #2716, with FINANCIAL dictionary entries (4 total) being tracked separately and not included in the country count for README.md.
Applied to files:
holidays/registry.py
README.md
📚 Learning: in the holidays library codebase, country implementation files in holidays/countries/ follow a stand...
Learnt from: PPsyrius
PR: vacanza/holidays#2638
File: holidays/countries/svalbard_and_jan_mayen.py:1-12
Timestamp: 2025-06-16T11:42:28.293Z
Learning: In the holidays library codebase, country implementation files in holidays/countries/ follow a standard convention of NOT having module-level docstrings. They start with the license header comment block, followed by imports, then class definitions. This is consistent across all country implementations like austria.py, belgium.py, canada.py, etc.
Applied to files:
holidays/registry.py
holidays/countries/__init__.py
README.md
📚 Learning: when counting entries in the countries dictionary in holidays/registry.py, use sed to isolate only t...
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: holidays/registry.py:136-136
Timestamp: 2025-08-02T21:34:24.440Z
Learning: When counting entries in the COUNTRIES dictionary in holidays/registry.py, use sed to isolate only the COUNTRIES section (between "^COUNTRIES:" and "^FINANCIAL:" lines) to avoid counting FINANCIAL dictionary entries, which would give an inflated total.
Applied to files:
holidays/registry.py
README.md
📚 Learning: the holidays codebase now uses the constructor signature pattern `__init__(self, *args, islamic_show...
Learnt from: PPsyrius
PR: vacanza/holidays#2614
File: holidays/countries/guyana.py:78-90
Timestamp: 2025-06-13T12:18:03.539Z
Learning: The holidays codebase now uses the constructor signature pattern `__init__(self, *args, islamic_show_estimated: bool = True, **kwargs)` across country classes.
Applied to files:
holidays/registry.py
holidays/countries/__init__.py
📚 Learning: in the fiji holidays implementation, the `special_public_holidays_observed` dictionary in `fijistati...
Learnt from: PPsyrius
PR: vacanza/holidays#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/registry.py
📚 Learning: in the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun...
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants 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/__init__.py
📚 Learning: the holidays library does not use `__all__` declarations in country modules. country files follow a ...
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/saint_pierre_and_miquelon.py:39-48
Timestamp: 2025-06-18T15:34:18.326Z
Learning: The holidays library does not use `__all__` declarations in country modules. Country files follow a standard pattern without explicit exports, and suggesting `__all__` goes against the established library-wide convention.
Applied to files:
holidays/countries/__init__.py
📚 Learning: for the ethiopia holidays class, it's appropriate to add a return type hint only to the `_is_leap_ye...
Learnt from: PPsyrius
PR: vacanza/holidays#2490
File: holidays/countries/ethiopia.py:45-45
Timestamp: 2025-04-23T09:59:19.886Z
Learning: For the Ethiopia holidays class, it's appropriate to add a return type hint only to the `_is_leap_year` method to match the base class implementation in `holidays/holiday_base.py`, while keeping other methods without type hints to maintain consistency with other country implementations.
Applied to files:
holidays/countries/__init__.py
📚 Learning: test files in the holidays repository follow a standardized structure without module or class docstr...
Learnt from: PPsyrius
PR: vacanza/holidays#2615
File: tests/countries/test_anguilla.py:1-12
Timestamp: 2025-06-16T15:48:48.680Z
Learning: Test files in the holidays repository follow a standardized structure without module or class docstrings. All country test files use the same pattern: license header, imports, and class definition (`class Test{Country}(CommonCountryTests, TestCase):`) without docstrings. This is an established codebase convention that should be maintained for consistency.
Applied to files:
holidays/countries/__init__.py
📚 Learning: custom holiday classes that extend _customhinduholidays, _customislamicholidays, _custombuddhistholi...
Learnt from: PPsyrius
PR: vacanza/holidays#2643
File: holidays/countries/mauritius.py:144-169
Timestamp: 2025-06-19T02:34:18.382Z
Learning: Custom holiday classes that extend _CustomHinduHolidays, _CustomIslamicHolidays, _CustomBuddhistHolidays, etc. in the holidays library do not use docstrings. They follow a pattern of using only inline comments above date dictionaries, as seen in Malaysia, Singapore, UAE, and other country implementations.
Applied to files:
holidays/countries/__init__.py
📚 Learning: for turkmenistan holiday tests, use this class structure: `class testturkmenistan(commoncountrytests...
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:31-49
Timestamp: 2025-04-05T04:50:40.752Z
Learning: For Turkmenistan holiday tests, use this class structure: `class TestTurkmenistan(CommonCountryTests, TestCase)` with imports `from unittest import TestCase`, `from holidays.countries import Turkmenistan, TM, TKM`, and `from tests.common import CommonCountryTests`. Ensure to call `super().setUp()` in the setUp method.
Applied to files:
holidays/countries/__init__.py
📚 Learning: in the holidays library, `_customislamicholidays` subclasses follow a consistent pattern of not havi...
Learnt from: PPsyrius
PR: vacanza/holidays#2643
File: holidays/countries/mauritius.py:171-184
Timestamp: 2025-06-19T02:34:14.456Z
Learning: In the holidays library, `_CustomIslamicHolidays` subclasses follow a consistent pattern of NOT having docstrings. They go directly to defining date dictionaries, as evidenced by Malaysia, Singapore, UAE, and dozens of other country implementations.
Applied to files:
holidays/countries/__init__.py
📚 Learning: for testing holiday implementations in the vacanza/holidays repository, recommend using `from tests....
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:85-86
Timestamp: 2025-04-05T04:29:38.042Z
Learning: For testing holiday implementations in the vacanza/holidays repository, recommend using `from tests.common import CommonCountryTests` as the base class instead of directly using `unittest.TestCase` to maintain consistency with project conventions and leverage common test utilities.
Applied to files:
holidays/countries/__init__.py
📚 Learning: territorial holiday classes that inherit from parent countries (like holidaysax from finland, holida...
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/french_southern_territories.py:41-44
Timestamp: 2025-06-18T10:07:58.780Z
Learning: Territorial holiday classes that inherit from parent countries (like HolidaysAX from Finland, HolidaysSJ from Norway, HolidaysTF from France) follow a standard pattern of silently overriding self.subdiv in their _populate_public_holidays() method without validation, as this ensures they always use the correct subdivision code for their territory regardless of user input.
Applied to files:
holidays/countries/__init__.py
README.md
📚 Learning: in the holidays library, it's standard practice to explicitly call christianholidays.__init__(self) ...
Learnt from: KJhellico
PR: vacanza/holidays#2608
File: holidays/countries/saint_vincent_and_the_grenadines.py:39-44
Timestamp: 2025-06-07T11:19:38.945Z
Learning: In the holidays library, it's standard practice to explicitly call ChristianHolidays.__init__(self) and InternationalHolidays.__init__(self) in country class __init__ methods, even when these mixins don't define their own __init__ methods. This follows the established codebase convention across all country implementations (confirmed in Zimbabwe, Zambia, and other countries).
Applied to files:
holidays/countries/__init__.py
📚 Learning: in pr #2719 adding faroe islands, kjhellico confirmed that the country count in readme.md should be ...
Learnt from: KJhellico
PR: vacanza/holidays#2719
File: README.md:108-108
Timestamp: 2025-07-12T20:54:28.749Z
Learning: In PR #2719 adding Faroe Islands, KJhellico confirmed that the country count in README.md should be updated from 213 to 214, making 214 the accurate total after this addition.
Applied to files:
README.md
📚 Learning: in the holidays project readme.md, supported languages in the country table are always arranged in a...
Learnt from: KJhellico
PR: vacanza/holidays#2757
File: README.md:1592-1597
Timestamp: 2025-07-26T13:30:58.728Z
Learning: In the holidays project README.md, supported languages in the country table are always arranged in alphabetical order, with the default language marked in bold but maintaining its alphabetical position rather than being moved to a special position.
Applied to files:
README.md
📚 Learning: the readme.md country table displays iso 3166-1 alpha-2 codes only in the "code" column. alpha-3 cod...
Learnt from: KJhellico
PR: vacanza/holidays#2606
File: README.md:562-568
Timestamp: 2025-06-06T16:02:09.910Z
Learning: The README.md country table displays ISO 3166-1 alpha-2 codes only in the "Code" column. Alpha-3 codes or country aliases should not be included in this table format, maintaining consistency with all other country entries.
Applied to files:
README.md
📚 Learning: in the vacanza/holidays repository, the team prefers to manually update the country count in readme....
Learnt from: KJhellico
PR: vacanza/holidays#2614
File: README.md:108-108
Timestamp: 2025-06-14T20:13:29.536Z
Learning: In the vacanza/holidays repository, the team prefers to manually update the country count in README.md when adding new countries, with tests in place to verify the count stays accurate. They are satisfied with this approach and do not want it automated.
Applied to files:
README.md
📚 Learning: the countries table in readme.md uses html format consistently throughout, not markdown....
Learnt from: KJhellico
PR: vacanza/holidays#2375
File: README.md:224-226
Timestamp: 2025-03-26T22:41:55.075Z
Learning: The countries table in README.md uses HTML format consistently throughout, not Markdown.
Applied to files:
README.md
📚 Learning: for the vacanza/holidays project, the pre-commit configuration explicitly excludes markdown files (....
Learnt from: PPsyrius
PR: vacanza/holidays#2721
File: docs/examples.md:341-376
Timestamp: 2025-07-14T02:48:06.353Z
Learning: For the vacanza/holidays project, the pre-commit configuration explicitly excludes markdown files (.md$) from trailing whitespace checks, meaning trailing whitespace in documentation files is intentionally allowed and should not be flagged during reviews.
Applied to files:
README.md
📚 Learning: for english-speaking countries in the holidays library (like trinidad and tobago), the `default_lang...
Learnt from: PPsyrius
PR: vacanza/holidays#2402
File: holidays/countries/trinidad_and_tobago.py:25-25
Timestamp: 2025-04-02T04:54:07.204Z
Learning: For English-speaking countries in the holidays library (like Trinidad and Tobago), the `default_language` and `supported_languages` parameters are optional. If languages are added for such countries, ensure that `en_US` is included in the list alongside the regional code variant (e.g., `en_TT` for Trinidad and Tobago).
Applied to files:
README.md
📚 Learning: british territories in the holidays library (like falkland islands and pitcairn islands) should use ...
Learnt from: Harshil-Gupta
PR: vacanza/holidays#2704
File: holidays/countries/pitcairn_islands.py:26-31
Timestamp: 2025-07-10T21:08:23.709Z
Learning: British territories in the holidays library (like Falkland Islands and Pitcairn Islands) should use default_language = "en_GB" to reuse existing British English translations rather than creating territory-specific locale files like en_FK or en_PN.
Applied to files:
README.md
📚 Learning: in the holidays project, .po file header comments use the format "# [country] holidays." for default...
Learnt from: KJhellico
PR: vacanza/holidays#2684
File: holidays/locale/it/LC_MESSAGES/SM.po:13-13
Timestamp: 2025-06-28T10:39:19.185Z
Learning: In the holidays project, .po file header comments use the format "# [Country] holidays." for default language files (without trailing hash) and "# [Country] holidays [locale] localization." for non-default language files (also without trailing hash).
Applied to files:
README.md
📚 Learning: in the holidays library, when a locale file matches the country's default language (e.g., pt_pt for ...
Learnt from: KJhellico
PR: vacanza/holidays#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:
README.md
📚 Learning: in the holidays library localization pattern, when a locale file matches a country's default languag...
Learnt from: KJhellico
PR: vacanza/holidays#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:
README.md
📚 Learning: for non-default locale `.po` files, the header comment format is: `# holidays loc...
Learnt from: ankushhKapoor
PR: vacanza/holidays#2601
File: holidays/locale/en_MN/LC_MESSAGES/MN.po:13-14
Timestamp: 2025-06-11T18:32:25.595Z
Learning: For non-default locale `.po` files, the header comment format is:
`# <Country> holidays <locale> localization.` (no trailing hash).
Applied to files:
README.md
📚 Learning: in the holidays package, detailed historical context and additional information should be added as c...
Learnt from: PPsyrius
PR: vacanza/holidays#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:
README.md
📚 Learning: in the holidays library, localization files have a specific structure: message comments are in stand...
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.
Applied to files:
README.md
📚 Learning: the holidays library uses a standard file header format across all country implementation files cons...
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/french_polynesia.py:1-12
Timestamp: 2025-06-19T05:54:49.792Z
Learning: The holidays library uses a standard file header format across all country implementation files consisting of a comprehensive comment block with project description, authors, website, and license information. Country files do not use module-level docstrings but instead rely on this header format followed by class-level docstrings.
Applied to files:
README.md
📚 Learning: in the vacanza holidays library, localization (l10n) comments are always written in american english...
Learnt from: KJhellico
PR: vacanza/holidays#2524
File: holidays/countries/grenada.py:81-83
Timestamp: 2025-05-03T20:16:58.203Z
Learning: In the Vacanza holidays library, localization (l10n) comments are always written in American English (en_US locale), even when the translatable strings use different regional spellings. For example, comments use "Labor Day" while the corresponding translatable string might use "Labour Day".
Applied to files:
README.md
📚 Learning: when reviewing holiday implementations in the holidays library, defer to the maintainers' choice of ...
Learnt from: KJhellico
PR: vacanza/holidays#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.
Applied to files:
README.md
📚 Learning: in the holidays library, for localization files of the default language (like french for ivory coast...
Learnt from: PPsyrius
PR: vacanza/holidays#2388
File: holidays/locale/fr/LC_MESSAGES/CI.po:28-101
Timestamp: 2025-03-30T13:33:31.598Z
Learning: In the holidays library, for localization files of the default language (like French for Ivory Coast in fr/LC_MESSAGES/CI.po), the best practice is to leave the message strings (msgstr) empty to avoid possible typos, since the message IDs (msgid) are already in the target language.
Applied to files:
README.md
📚 Learning: always verify the current count in the countries dictionary by checking the actual file rather than ...
Learnt from: KJhellico
PR: vacanza/holidays#2687
File: README.md:108-108
Timestamp: 2025-07-15T15:00:32.728Z
Learning: Always verify the current count in the COUNTRIES dictionary by checking the actual file rather than relying on previously recorded counts, as the count changes with each merged PR that adds new countries.
Applied to files:
README.md
📚 Learning: the correct way to count supported countries in the holidays library is by counting unique country m...
Learnt from: KJhellico
PR: vacanza/holidays#2601
File: README.md:108-108
Timestamp: 2025-06-09T19:39:38.818Z
Learning: The correct way to count supported countries in the holidays library is by counting unique country module files in holidays/countries/ (excluding __init__.py) or by counting entries in the COUNTRIES registry, not by counting individual class definitions which include alias classes.
Applied to files:
README.md
📚 Learning: when making code suggestions, only include the specific lines that need to be changed in the committ...
Learnt from: PPsyrius
PR: vacanza/holidays#2439
File: holidays/calendars/thai.py:0-0
Timestamp: 2025-04-06T17:44:24.598Z
Learning: When making code suggestions, only include the specific lines that need to be changed in the committable suggestion part, without surrounding unrelated code.
Applied to files:
README.md
📚 Learning: in the fiji holidays implementation, the maintainers are aware of the need to extend the mawlid_date...
Learnt from: KJhellico
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:171-183
Timestamp: 2025-03-29T15:15:05.919Z
Learning: In the Fiji holidays implementation, the maintainers are aware of the need to extend the MAWLID_DATES dictionary beyond 2025 when future official references become available, and will do so when appropriate. No suggestions about extending this dictionary should be made in future reviews.
Applied to files:
README.md
📚 Learning: the holidays library intentionally limits language code support to iso 639-1 and iso 639-2 standards...
Learnt from: PPsyrius
PR: vacanza/holidays#2362
File: holidays/ical.py:53-80
Timestamp: 2025-03-26T08:55:08.917Z
Learning: The holidays library intentionally limits language code support to ISO 639-1 and ISO 639-2 standards (2-3 letter language codes with optional region) to maintain consistency with other modules like `common_holidays` and `financial_holidays`, rather than implementing full RFC 5646 compliance.
Applied to files:
README.md
📚 Learning: the library convention for country code aliases (like two-letter iso 3166-1 alpha-2 and three-letter...
Learnt from: PPsyrius
PR: vacanza/holidays#2402
File: holidays/countries/trinidad_and_tobago.py:28-33
Timestamp: 2025-04-02T04:51:17.842Z
Learning: The library convention for country code aliases (like two-letter ISO 3166-1 alpha-2 and three-letter ISO 3166-1 alpha-3 codes) is to implement them as simple pass-through classes without docstrings.
Applied to files:
README.md
📚 Learning: when creating country holiday aliases that inherit from parent countries (like svalbard and jan maye...
Learnt from: PPsyrius
PR: vacanza/holidays#2638
File: holidays/countries/svalbard_and_jan_mayen.py:26-32
Timestamp: 2025-06-16T11:46:35.303Z
Learning: When creating country holiday aliases that inherit from parent countries (like Svalbard and Jan Mayen from Norway, or Åland from Finland), it's common and acceptable to hardcode a specific subdivision code since the subdivision codes for the parent country yield identical results.
Applied to files:
README.md
📚 Learning: when creating country holiday aliases that inherit from parent countries (like svalbard and jan maye...
Learnt from: PPsyrius
PR: vacanza/holidays#2638
File: holidays/countries/svalbard_and_jan_mayen.py:26-32
Timestamp: 2025-06-16T11:46:35.303Z
Learning: When creating country holiday aliases that inherit from parent countries (like Svalbard and Jan Mayen from Norway, or Åland from Finland), it's standard practice to hardcode a specific subdivision code in the _populate methods since the subdivision codes for the parent country yield identical results. The Åland Islands implementation serves as the reference pattern for this approach.
Applied to files:
README.md
🧬 Code Graph Analysis (1)
holidays/countries/__init__.py (1)
holidays/countries/bhutan.py (3)
Bhutan
(19-164)BT
(167-168)BTN
(171-172)
⏰ 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). (3)
- GitHub Check: Test build on windows-latest
- GitHub Check: Test build on ubuntu-latest
- GitHub Check: Test build on macos-latest
🔇 Additional comments (2)
holidays/countries/__init__.py (1)
39-39
: LGTM! Clean integration following library conventions.The Bhutan import follows the established pattern and maintains alphabetical ordering perfectly.
holidays/registry.py (1)
47-47
: Approved: Bhutan registry entry correct and country count verifiedThe new
"bhutan": ("Bhutan", "BT", "BTN")
entry follows the required format and stays in alphabetical order.• COUNTRIES dictionary now contains 226 entries, reflecting the addition of Bhutan.
Proposed change
Add Bhutan holidays
Resolves #1156.
Type of change
holidays
functionality in general)Checklist
make check
, all checks and tests are green