-
-
Notifications
You must be signed in to change notification settings - Fork 554
Add Myanmar holidays #2944
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 Myanmar holidays #2944
Conversation
Summary by CodeRabbit
WalkthroughAdds Myanmar (MM/MMR) holiday support: Burmese lunisolar calendar, Burmese holiday group, Myanmar country calendar (multi-calendar composition), translations, registry and README updates, snapshot data, tests, and adjusted substituted-holiday handling. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (6)
🧰 Additional context used🧠 Learnings (66)📓 Common learnings
📚 Learning: 2025-09-18T00:32:25.008Z
Applied to files:
📚 Learning: 2025-06-19T02:34:18.382Z
Applied to files:
📚 Learning: 2025-06-15T15:24:53.055Z
Applied to files:
📚 Learning: 2025-06-18T10:07:58.780Z
Applied to files:
📚 Learning: 2025-04-05T04:47:27.213Z
Applied to files:
📚 Learning: 2025-04-05T06:49:06.217Z
Applied to files:
📚 Learning: 2025-09-20T12:21:50.868Z
Applied to files:
📚 Learning: 2025-09-14T16:05:55.205Z
Applied to files:
📚 Learning: 2025-07-02T18:17:53.342Z
Applied to files:
📚 Learning: 2025-05-06T21:07:11.577Z
Applied to files:
📚 Learning: 2025-09-14T16:14:44.966Z
Applied to files:
📚 Learning: 2025-09-14T16:14:44.966Z
Applied to files:
📚 Learning: 2025-09-18T03:19:23.712Z
Applied to files:
📚 Learning: 2025-04-05T04:50:40.752Z
Applied to files:
📚 Learning: 2025-09-10T21:12:39.614Z
Applied to files:
📚 Learning: 2025-09-10T14:35:54.603Z
Applied to files:
📚 Learning: 2025-08-12T17:16:54.497Z
Applied to files:
📚 Learning: 2025-09-17T15:15:24.269Z
Applied to files:
📚 Learning: 2025-04-03T16:58:27.175Z
Applied to files:
📚 Learning: 2025-08-11T13:48:45.953Z
Applied to files:
📚 Learning: 2025-08-21T05:56:33.276Z
Applied to files:
📚 Learning: 2025-04-03T16:58:27.175Z
Applied to files:
📚 Learning: 2025-06-10T12:43:10.577Z
Applied to files:
📚 Learning: 2025-06-14T11:05:21.250Z
Applied to files:
📚 Learning: 2025-06-04T10:09:28.732Z
Applied to files:
📚 Learning: 2025-09-17T09:07:56.459Z
Applied to files:
📚 Learning: 2025-04-03T12:36:41.201Z
Applied to files:
📚 Learning: 2025-06-16T12:28:31.641Z
Applied to files:
📚 Learning: 2025-06-15T11:52:39.572Z
Applied to files:
📚 Learning: 2025-09-04T08:54:35.319Z
Applied to files:
📚 Learning: 2025-06-14T21:12:07.224Z
Applied to files:
📚 Learning: 2025-06-06T14:40:31.932Z
Applied to files:
📚 Learning: 2025-08-03T13:48:11.910Z
Applied to files:
📚 Learning: 2025-09-14T07:26:25.431Z
Applied to files:
📚 Learning: 2025-06-16T15:48:48.680Z
Applied to files:
📚 Learning: 2025-03-19T16:54:58.657Z
Applied to files:
📚 Learning: 2025-06-06T16:02:09.910Z
Applied to files:
📚 Learning: 2025-06-14T20:12:37.212Z
Applied to files:
📚 Learning: 2025-09-17T14:47:15.116Z
Applied to files:
📚 Learning: 2025-08-11T10:14:28.517Z
Applied to files:
📚 Learning: 2025-03-29T15:15:05.919Z
Applied to files:
📚 Learning: 2025-08-19T21:22:13.125Z
Applied to files:
📚 Learning: 2025-08-25T09:57:22.291Z
Applied to files:
📚 Learning: 2025-05-10T04:32:15.760Z
Applied to files:
📚 Learning: 2025-09-18T00:35:51.998Z
Applied to files:
📚 Learning: 2025-06-13T12:18:03.539Z
Applied to files:
📚 Learning: 2025-08-21T04:56:03.780Z
Applied to files:
📚 Learning: 2025-08-28T02:34:11.657Z
Applied to files:
📚 Learning: 2025-08-24T06:53:35.897Z
Applied to files:
📚 Learning: 2025-09-17T15:16:16.192Z
Applied to files:
📚 Learning: 2025-03-19T16:53:00.375Z
Applied to files:
📚 Learning: 2025-06-18T10:21:01.376Z
Applied to files:
📚 Learning: 2025-09-17T15:53:16.940Z
Applied to files:
📚 Learning: 2025-09-18T07:01:12.222Z
Applied to files:
📚 Learning: 2025-08-21T04:56:03.780Z
Applied to files:
📚 Learning: 2025-05-10T04:02:13.815Z
Applied to files:
📚 Learning: 2025-04-23T09:22:41.753Z
Applied to files:
📚 Learning: 2025-06-28T10:39:19.185Z
Applied to files:
📚 Learning: 2025-06-11T18:32:25.595Z
Applied to files:
📚 Learning: 2025-04-23T14:55:35.504Z
Applied to files:
📚 Learning: 2025-06-10T05:07:29.372Z
Applied to files:
📚 Learning: 2025-08-25T09:57:22.291Z
Applied to files:
📚 Learning: 2025-08-08T14:35:35.829Z
Applied to files:
📚 Learning: 2025-06-16T11:42:28.293Z
Applied to files:
📚 Learning: 2025-06-19T02:34:14.456Z
Applied to files:
🧬 Code graph analysis (5)holidays/groups/custom.py (1)
tests/groups/test_burmese.py (1)
holidays/calendars/burmese.py (1)
holidays/groups/burmese.py (3)
holidays/countries/myanmar.py (6)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (15)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #2944 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 296 299 +3
Lines 17652 17834 +182
Branches 2271 2295 +24
==========================================
+ Hits 17652 17834 +182 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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: 10
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
holidays/groups/custom.py (1)
44-50
: Len‑based detection of substitutions is brittle; parse tail elements instead.Relying on fixed positions risks false positives and mis‑indexed fields. Use tail slicing and guard explicitly.
Apply:
- if len(special_public_holiday) < 4: - continue - self.has_substituted_holidays = True - if len(special_public_holiday) == 5: # The fifth element is the year. - _, _, from_month, from_day, from_year = special_public_holiday - self.weekend_workdays.add(date(from_year, from_month, from_day)) + # Expect tuple: (to_month, to_day, from_month, from_day[, from_year]) + if len(special_public_holiday) >= 4: + self.has_substituted_holidays = True + from_month, from_day = special_public_holiday[-3:-1] + if len(special_public_holiday) == 5: + from_year = special_public_holiday[-1] + self.weekend_workdays.add(date(from_year, from_month, from_day))README.md (1)
108-121
: README country total mismatch — reconcile registry and exports
- README.md:108 claims 243 country codes; actual counts found: holidays/registry.py → 240 unique alpha‑2 codes; holidays/countries/init.py → 236 unique alpha‑2 codes.
- README.md contains Myanmar row at line 1172.
- Action: Update README.md:108 to match the authoritative registry count (holidays/registry.py → 240) and/or add the missing country entries to holidays/registry.py and ensure holidays/countries/init.py exports include all registry entries so the three sources agree.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (16)
README.md
(2 hunks)holidays/calendars/__init__.py
(1 hunks)holidays/calendars/burmese.py
(1 hunks)holidays/countries/__init__.py
(1 hunks)holidays/countries/myanmar.py
(1 hunks)holidays/groups/__init__.py
(1 hunks)holidays/groups/burmese.py
(1 hunks)holidays/groups/custom.py
(1 hunks)holidays/locale/en_US/LC_MESSAGES/MM.po
(1 hunks)holidays/locale/my/LC_MESSAGES/MM.po
(1 hunks)holidays/registry.py
(1 hunks)snapshots/countries/MM_COMMON.json
(1 hunks)tests/calendars/test_burmese.py
(1 hunks)tests/countries/test_myanmar.py
(1 hunks)tests/groups/test_burmese.py
(1 hunks)tests/test_holiday_base.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (66)
📚 Learning: 2025-08-08T14:37:03.045Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: In holidays/countries/__init__.py, re-export country classes using absolute imports (e.g., 'from holidays.countries.liberia import Liberia, LR, LBR') and keep alphabetical ordering (e.g., Lesotho, Liberia, Libya). Avoid relative imports in this file.
Applied to files:
holidays/groups/__init__.py
holidays/countries/__init__.py
📚 Learning: 2025-08-11T13:48:45.953Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/calendars/ethiopian.py:13-13
Timestamp: 2025-08-11T13:48:45.953Z
Learning: The holidays library does not use `__all__` declarations in calendar modules (holidays/calendars/). Calendar files follow a standard pattern of defining constants and functions directly without explicit exports, similar to the convention used in country modules.
Applied to files:
holidays/groups/__init__.py
holidays/calendars/__init__.py
holidays/calendars/burmese.py
📚 Learning: 2025-08-21T05:56:33.276Z
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:15-16
Timestamp: 2025-08-21T05:56:33.276Z
Learning: In the holidays library, when importing Gregorian month constants from holidays.calendars.gregorian, only import the months that are actually used in the date data. For example, if Islamic holiday dates only reference JUN, JUL, SEP, OCT, then only import those specific constants rather than importing additional unused months.
Applied to files:
holidays/groups/__init__.py
holidays/calendars/__init__.py
holidays/calendars/burmese.py
📚 Learning: 2025-06-19T02:34:18.382Z
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/groups/__init__.py
holidays/calendars/__init__.py
📚 Learning: 2025-05-06T21:07:11.577Z
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: tests/countries/test_andorra.py:23-28
Timestamp: 2025-05-06T21:07:11.577Z
Learning: In the holidays project, test methods for country holidays follow a standard form where year ranges are explicitly recreated in each test method rather than being stored as class variables, to maintain consistency across all country tests.
Applied to files:
tests/countries/test_myanmar.py
tests/calendars/test_burmese.py
tests/groups/test_burmese.py
tests/test_holiday_base.py
📚 Learning: 2025-04-05T06:49:06.217Z
Learnt from: PPsyrius
PR: vacanza/holidays#2386
File: tests/countries/test_nepal.py:499-536
Timestamp: 2025-04-05T06:49:06.217Z
Learning: In the holidays project, test files follow a dual testing approach: individual methods test specific holidays across multiple years, while comprehensive year-specific tests (e.g., `test_2025`) verify all holidays for a specific year in a single assertion. Both approaches serve different testing purposes and complement each other.
Applied to files:
tests/countries/test_myanmar.py
tests/calendars/test_burmese.py
tests/groups/test_burmese.py
📚 Learning: 2025-04-05T04:47:27.213Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:47:27.213Z
Learning: For holiday tests in the vacanza/holidays project, structure tests by individual holidays rather than by years. Each test method should focus on a specific holiday and test it across multiple years (from start_year through 2050) using helper methods like `assertHolidayName`. For fixed holidays, use generators like `(f"{year}-01-01" for year in range(1991, 2051))`. For movable holidays, specify individual dates for specific years followed by a range check.
Applied to files:
tests/countries/test_myanmar.py
tests/calendars/test_burmese.py
tests/groups/test_burmese.py
tests/test_holiday_base.py
📚 Learning: 2025-06-16T15:48:48.680Z
Learnt from: PPsyrius
PR: vacanza/holidays#2615
File: tests/countries/test_anguilla.py:1-12
Timestamp: 2025-06-16T15:48:48.680Z
Learning: Test files in the holidays repository follow a standardized structure without module or class docstrings. All country test files use the same pattern: license header, imports, and class definition (`class Test{Country}(CommonCountryTests, TestCase):`) without docstrings. This is an established codebase convention that should be maintained for consistency.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-04-05T04:33:53.254Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:33:53.254Z
Learning: For Turkmenistan holiday tests, recommend using CommonCountryTests as the base class rather than unittest.TestCase to follow project conventions, be consistent with other country test files, and gain access to common test utilities.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-08-08T14:37:03.045Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.
Applied to files:
tests/countries/test_myanmar.py
holidays/registry.py
holidays/countries/__init__.py
📚 Learning: 2025-04-05T04:50:40.752Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:31-49
Timestamp: 2025-04-05T04:50:40.752Z
Learning: For Turkmenistan holiday tests, use this class structure: `class TestTurkmenistan(CommonCountryTests, TestCase)` with imports `from unittest import TestCase`, `from holidays.countries import Turkmenistan, TM, TKM`, and `from tests.common import CommonCountryTests`. Ensure to call `super().setUp()` in the setUp method.
Applied to files:
tests/countries/test_myanmar.py
tests/groups/test_burmese.py
📚 Learning: 2025-04-05T04:29:38.042Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:85-86
Timestamp: 2025-04-05T04:29:38.042Z
Learning: For testing holiday implementations in the vacanza/holidays repository, recommend using `from tests.common import CommonCountryTests` as the base class instead of directly using `unittest.TestCase` to maintain consistency with project conventions and leverage common test utilities.
Applied to files:
tests/countries/test_myanmar.py
tests/groups/test_burmese.py
📚 Learning: 2025-08-20T19:46:15.625Z
Learnt from: KJhellico
PR: vacanza/holidays#2833
File: tests/countries/test_uganda.py:15-0
Timestamp: 2025-08-20T19:46:15.625Z
Learning: In the holidays project, the standard import pattern for country test files is `from holidays.countries.<country> import Country, CODE1, CODE2` (direct module import), used by ~75% of country test files. Only a minority (~25%) use the aggregated public API import `from holidays.countries import Country, CODE1, CODE2`. The direct module import pattern should be used for new country test files to follow the established convention.
Applied to files:
tests/countries/test_myanmar.py
holidays/countries/__init__.py
📚 Learning: 2025-09-14T16:05:55.181Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_iran.py:28-28
Timestamp: 2025-09-14T16:05:55.181Z
Learning: In tests/countries/test_iran.py, using years=(self.start_year - 1, 2102) in the no-holiday test is intentional because Iran uses the Persian Calendar which has specific supported year range constraints, and 2102 represents the upper limit of the Persian Calendar's supported range, not just an arbitrary far-future date.
Applied to files:
tests/countries/test_myanmar.py
tests/calendars/test_burmese.py
tests/groups/test_burmese.py
📚 Learning: 2025-09-14T16:03:13.496Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_barbados.py:21-23
Timestamp: 2025-09-14T16:03:13.496Z
Learning: In tests/countries/test_barbados.py, using years_non_observed=range(2000, 2024) is intentional because all observed holiday examples fall within 2001-2023, making this range appropriate for limiting testing to years where observed holidays actually exist in the test data.
Applied to files:
tests/countries/test_myanmar.py
tests/calendars/test_burmese.py
📚 Learning: 2025-08-25T04:28:02.061Z
Learnt from: PPsyrius
PR: vacanza/holidays#2848
File: tests/countries/test_somalia.py:44-127
Timestamp: 2025-08-25T04:28:02.061Z
Learning: In the holidays library, Islamic holiday tests use `self.no_estimated_holidays = Country(years=years, islamic_show_estimated=False)` as the library-wide standard approach to simplify test cases. This pattern is intentional and preferred over testing estimated labels.
Applied to files:
tests/countries/test_myanmar.py
tests/test_holiday_base.py
📚 Learning: 2025-09-14T16:14:44.954Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_bulgaria.py:21-23
Timestamp: 2025-09-14T16:14:44.954Z
Learning: For Bulgaria in the holidays library, using years_non_observed=range(2017, 2030) in tests/countries/test_bulgaria.py is intentional because all observed holiday examples in the test data fall within this range (latest being 2029), making this range appropriate for limiting testing to years where observed holidays actually exist, improving both correctness and performance.
Applied to files:
tests/countries/test_myanmar.py
tests/calendars/test_burmese.py
tests/groups/test_burmese.py
📚 Learning: 2025-09-14T16:14:44.954Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_bulgaria.py:21-23
Timestamp: 2025-09-14T16:14:44.954Z
Learning: For Bulgaria in the holidays library, using years_non_observed=range(2017, 2030) in tests/countries/test_bulgaria.py is intentional because all observed holiday examples in the test data fall within this range (latest being 2029), making this range appropriate for limiting testing to years where observed holidays actually exist.
Applied to files:
tests/countries/test_myanmar.py
tests/calendars/test_burmese.py
tests/groups/test_burmese.py
📚 Learning: 2025-08-12T17:16:54.497Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: tests/calendars/test_julian.py:35-36
Timestamp: 2025-08-12T17:16:54.497Z
Learning: In the vacanza/holidays project calendar tests (Thai, Ethiopian, Julian, etc.), the established testing pattern for validation methods is to use simple for loops like `for year in known_data_dict:` followed by `self.assertEqual(expected, actual)` without using unittest's subTest feature. This pattern is consistently maintained across all calendar test files.
Applied to files:
tests/countries/test_myanmar.py
tests/calendars/test_burmese.py
tests/groups/test_burmese.py
📚 Learning: 2025-07-09T21:16:35.145Z
Learnt from: KJhellico
PR: vacanza/holidays#2623
File: tests/countries/test_christmas_island.py:136-146
Timestamp: 2025-07-09T21:16:35.145Z
Learning: In Christmas Island's holiday implementation, the test_christmas_day method cannot use assertNoNonObservedHoliday because in some years observed Christmas Day overlaps with Boxing Day when both holidays are moved due to weekend conflicts, causing the standard non-observed holiday check to fail inappropriately.
Applied to files:
tests/countries/test_myanmar.py
tests/test_holiday_base.py
📚 Learning: 2025-04-03T05:59:57.480Z
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.
Applied to files:
snapshots/countries/MM_COMMON.json
📚 Learning: 2025-06-24T17:26:17.728Z
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/MM_COMMON.json
📚 Learning: 2025-06-14T20:12:37.212Z
Learnt from: KJhellico
PR: vacanza/holidays#2614
File: holidays/countries/guyana.py:146-179
Timestamp: 2025-06-14T20:12:37.212Z
Learning: The `_CustomHinduHolidays` mechanism works through `_CustomCalendarType` metaclass which renames public attributes (like `DIWALI_INDIA_DATES`) with a postfix, allowing `_HinduLunisolar::_get_holiday` to find and use custom holiday dates. When `_add_diwali_india()` is called, it uses the custom dates if available rather than calculated dates.
Applied to files:
holidays/calendars/__init__.py
holidays/groups/burmese.py
📚 Learning: 2025-04-03T16:58:27.175Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants 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/calendars/__init__.py
holidays/groups/burmese.py
holidays/calendars/burmese.py
📚 Learning: 2025-06-06T16:02:09.910Z
Learnt from: KJhellico
PR: vacanza/holidays#2606
File: README.md:562-568
Timestamp: 2025-06-06T16:02:09.910Z
Learning: The README.md country table displays ISO 3166-1 alpha-2 codes only in the "Code" column. Alpha-3 codes or country aliases should not be included in this table format, maintaining consistency with all other country entries.
Applied to files:
README.md
📚 Learning: 2025-07-12T20:54:28.749Z
Learnt from: KJhellico
PR: vacanza/holidays#2719
File: README.md:108-108
Timestamp: 2025-07-12T20:54:28.749Z
Learning: In PR #2719 adding Faroe Islands, KJhellico confirmed that the country count in README.md should be updated from 213 to 214, making 214 the accurate total after this addition.
Applied to files:
README.md
📚 Learning: 2025-08-03T12:59:53.286Z
Learnt from: KJhellico
PR: vacanza/holidays#2635
File: README.md:108-110
Timestamp: 2025-08-03T12:59:53.286Z
Learning: Always verify country counts in the COUNTRIES dictionary by checking the current count in the COUNTRIES dictionary in holidays/registry.py directly, rather than relying on information from previous PRs, as the count changes frequently with new country additions.
Applied to files:
holidays/registry.py
📚 Learning: 2025-07-15T15:00:32.728Z
Learnt from: KJhellico
PR: vacanza/holidays#2687
File: README.md:108-108
Timestamp: 2025-07-15T15:00:32.728Z
Learning: When verifying country counts in the holidays library, always check the current count in the COUNTRIES dictionary in holidays/registry.py rather than relying on previously recorded counts, as new countries may have been added in merged PRs.
Applied to files:
holidays/registry.py
📚 Learning: 2025-07-17T11:07:04.986Z
Learnt from: KJhellico
PR: vacanza/holidays#2720
File: README.md:108-110
Timestamp: 2025-07-17T11:07:04.986Z
Learning: Always verify country counts in the holidays library by checking the current count in the COUNTRIES dictionary in holidays/registry.py directly, rather than relying on information from previous PRs, as the count changes frequently with new country additions.
Applied to files:
holidays/registry.py
📚 Learning: 2025-07-10T11:00:13.195Z
Learnt from: KJhellico
PR: vacanza/holidays#2623
File: README.md:0-0
Timestamp: 2025-07-10T11:00:13.195Z
Learning: The COUNTRIES dictionary in holidays/registry.py contains 211 entries as confirmed by KJhellico in PR #2623, not 214 as previously calculated.
Applied to files:
holidays/registry.py
📚 Learning: 2025-04-18T21:13:55.589Z
Learnt from: KJhellico
PR: vacanza/holidays#2483
File: holidays/registry.py:177-177
Timestamp: 2025-04-18T21:13:55.589Z
Learning: In the holidays/registry.py file, COUNTRIES dictionary entries should use the class name (without spaces) as the first element of the tuple (e.g., "TurksAndCaicosIslands"), not the human-readable country name with spaces.
Applied to files:
holidays/registry.py
📚 Learning: 2025-08-24T11:55:06.810Z
Learnt from: KJhellico
PR: vacanza/holidays#2831
File: README.md:108-108
Timestamp: 2025-08-24T11:55:06.810Z
Learning: The actual count of countries in the holidays library should always be verified by counting entries in the COUNTRIES dictionary in holidays/registry.py using `grep -E '^\s*"[a-z_]+"\s*:' holidays/registry.py | wc -l`, rather than making assumptions about incremental changes.
Applied to files:
holidays/registry.py
📚 Learning: 2025-04-03T16:58:27.175Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants like FEB, TUE, MAR, and SUN internally through parent class implementations even when these constants don't appear directly in the file.
Applied to files:
holidays/groups/burmese.py
holidays/calendars/burmese.py
📚 Learning: 2025-03-19T16:54:58.657Z
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.
Applied to files:
holidays/groups/burmese.py
holidays/calendars/burmese.py
holidays/countries/myanmar.py
📚 Learning: 2025-06-15T11:50:44.366Z
Learnt from: PPsyrius
PR: vacanza/holidays#2601
File: holidays/countries/mongolia.py:140-146
Timestamp: 2025-06-15T11:50:44.366Z
Learning: The holidays library doesn't currently have helper functions like `_add_holiday_span` for adding consecutive multi-day holidays. Countries like Mongolia, Thailand, and Vietnam implement multi-day holiday spans using inline loops with `_timedelta(dt, delta)` pattern.
Applied to files:
holidays/groups/burmese.py
📚 Learning: 2025-08-12T17:16:54.497Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: tests/calendars/test_julian.py:35-36
Timestamp: 2025-08-12T17:16:54.497Z
Learning: In the vacanza/holidays project, test methods that iterate over dictionaries of test data (like calendar drift tests) follow the established pattern without using unittest's subTest, as evidenced by the Thai calendar tests and maintained consistently across similar test structures.
Applied to files:
tests/calendars/test_burmese.py
📚 Learning: 2025-09-03T16:49:35.246Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
tests/calendars/test_burmese.py
📚 Learning: 2025-07-02T18:17:53.342Z
Learnt from: KJhellico
PR: vacanza/holidays#2608
File: tests/countries/test_saint_vincent_and_the_grenadines.py:162-178
Timestamp: 2025-07-02T18:17:53.342Z
Learning: In the Saint Vincent and the Grenadines holidays implementation, New Year's Day is added without observed rules using `_add_new_years_day()` and should not include observed rule testing in its test method. Only holidays explicitly wrapped with `_add_observed()` have observed behavior.
Applied to files:
tests/groups/test_burmese.py
tests/test_holiday_base.py
📚 Learning: 2025-09-10T21:12:39.601Z
Learnt from: KJhellico
PR: vacanza/holidays#2854
File: tests/countries/test_sudan.py:21-25
Timestamp: 2025-09-10T21:12:39.601Z
Learning: Sudan holidays implementation does not include observed holiday logic (holidays that shift when falling on weekends), so test files for Sudan should not use years_non_observed parameter in the setUpClass method.
Applied to files:
tests/groups/test_burmese.py
tests/test_holiday_base.py
📚 Learning: 2025-09-10T14:35:54.603Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_brazil.py:28-30
Timestamp: 2025-09-10T14:35:54.603Z
Learning: In the holidays project, the test_no_holidays method should test ALL supported_categories (via categories=CountryClass.supported_categories) rather than just the default PUBLIC category, to ensure comprehensive validation that no holidays exist before start_year across any supported category including OPTIONAL and subdivision categories.
Applied to files:
tests/groups/test_burmese.py
tests/test_holiday_base.py
📚 Learning: 2025-07-24T15:21:31.632Z
Learnt from: PPsyrius
PR: vacanza/holidays#2750
File: tests/countries/test_germany.py:46-46
Timestamp: 2025-07-24T15:21:31.632Z
Learning: In the holidays project test files, the standard method name for testing the absence of holidays is `test_no_holidays`, not more descriptive names like `test_no_holidays_before_1990`. This is a consistent naming convention across country test files like France and Germany.
Applied to files:
tests/test_holiday_base.py
📚 Learning: 2025-03-23T16:59:25.794Z
Learnt from: PPsyrius
PR: vacanza/holidays#2362
File: tests/test_ical.py:31-40
Timestamp: 2025-03-23T16:59:25.794Z
Learning: In the holidays library's `TestIcalExporter` class, initializing `ICalExporter` with `None` is intentional. Using a mock object instead breaks tests because the constructor performs attribute validation with `getattr(self.holidays, "language", None)` which returns a mock with a mock object instead of `None`, causing validation failures. The approach isolates file operation tests from iCal generation logic.
Applied to files:
tests/test_holiday_base.py
📚 Learning: 2025-09-14T17:17:14.353Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_saint_helena_ascension_and_tristan_da_cunha.py:209-209
Timestamp: 2025-09-14T17:17:14.353Z
Learning: In tests/countries/test_saint_helena_ascension_and_tristan_da_cunha.py, the explicit loop iteration pattern for subdivision-specific holiday checks (like Anniversary Day for TA subdivision) is intentionally preferred over using assertSubdivTa helper methods, as confirmed by PPsyrius.
Applied to files:
tests/test_holiday_base.py
📚 Learning: 2025-04-23T14:55:35.504Z
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.
Applied to files:
tests/test_holiday_base.py
📚 Learning: 2025-06-18T10:07:58.780Z
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/french_southern_territories.py:41-44
Timestamp: 2025-06-18T10:07:58.780Z
Learning: Territorial holiday classes that inherit from parent countries (like HolidaysAX from Finland, HolidaysSJ from Norway, HolidaysTF from France) follow a standard pattern of silently overriding self.subdiv in their _populate_public_holidays() method without validation, as this ensures they always use the correct subdivision code for their territory regardless of user input.
Applied to files:
tests/test_holiday_base.py
holidays/groups/custom.py
📚 Learning: 2025-03-30T20:18:46.006Z
Learnt from: KJhellico
PR: vacanza/holidays#2386
File: holidays/countries/nepal.py:24-26
Timestamp: 2025-03-30T20:18:46.006Z
Learning: In the holidays library, country classes do not directly implement `_populate()`. Instead, they implement specialized methods like `_populate_public_holidays()`, and the base class `HolidayBase` handles the orchestration by calling these specialized methods.
Applied to files:
tests/test_holiday_base.py
📚 Learning: 2025-09-10T16:17:30.428Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_bosnia_and_herzegovina.py:21-24
Timestamp: 2025-09-10T16:17:30.428Z
Learning: Bosnia and Herzegovina holidays implementation currently lacks a start_year attribute. In tests/countries/test_bosnia_and_herzegovina.py, using cls.full_range = range(2000, 2050) is intentional to bound assertions and setup. Do not suggest replacing it with harness default full_range until start_year is introduced.
Applied to files:
tests/test_holiday_base.py
📚 Learning: 2025-06-14T11:04:31.180Z
Learnt from: PPsyrius
PR: vacanza/holidays#2609
File: holidays/countries/nauru.py:57-60
Timestamp: 2025-06-14T11:04:31.180Z
Learning: In the holidays library, the base `HolidayBase._populate()` method already includes a guard clause that prevents holiday population methods like `_populate_public_holidays()` from being called when the year is before `start_year` or after `end_year`. Therefore, individual country implementations do not need to add their own guard clauses for years before independence or other start dates.
Applied to files:
tests/test_holiday_base.py
📚 Learning: 2025-06-10T12:43:10.577Z
Learnt from: ankushhKapoor
PR: vacanza/holidays#2601
File: holidays/calendars/mongolian.py:1-1
Timestamp: 2025-06-10T12:43:10.577Z
Learning: The holidays project's calendar files (in holidays/calendars/) follow a consistent pattern of NOT having module-level docstrings. They only use class-level docstrings for their main classes. When reviewing calendar files, maintain this consistency and do not suggest adding module docstrings.
Applied to files:
holidays/calendars/burmese.py
📚 Learning: 2025-06-13T12:18:03.539Z
Learnt from: PPsyrius
PR: vacanza/holidays#2614
File: holidays/countries/guyana.py:78-90
Timestamp: 2025-06-13T12:18:03.539Z
Learning: The holidays codebase now uses the constructor signature pattern `__init__(self, *args, islamic_show_estimated: bool = True, **kwargs)` across country classes.
Applied to files:
holidays/groups/custom.py
holidays/countries/myanmar.py
📚 Learning: 2025-06-15T15:24:53.055Z
Learnt from: KJhellico
PR: vacanza/holidays#2606
File: holidays/countries/faroe_islands.py:62-67
Timestamp: 2025-06-15T15:24:53.055Z
Learning: The `HolidayBase` class uses `__getattr__` to dynamically implement `_add_holiday_*` methods through pattern matching, including patterns like `_add_holiday_<n>_days_past_easter`, `_add_holiday_<month>_<day>`, and various weekday-relative patterns. Methods like `_add_holiday_26_days_past_easter` are not explicitly defined but are dynamically generated when called.
Applied to files:
holidays/groups/custom.py
📚 Learning: 2025-03-30T18:25:07.087Z
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-05-06T15:25:44.333Z
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: holidays/locale/ca/LC_MESSAGES/AD.po:31-40
Timestamp: 2025-05-06T15:25:44.333Z
Learning: In the Holidays project, msgid fields in localization files contain strings in the entity's default language (as defined by default_language attribute), not English source strings as in standard gettext implementations.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-06-28T10:39:19.185Z
Learnt from: KJhellico
PR: vacanza/holidays#2684
File: holidays/locale/it/LC_MESSAGES/SM.po:13-13
Timestamp: 2025-06-28T10:39:19.185Z
Learning: In the holidays project, .po file header comments use the format "# [Country] holidays." for default language files (without trailing hash) and "# [Country] holidays [locale] localization." for non-default language files (also without trailing hash).
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-04-05T08:12:19.986Z
Learnt from: PPsyrius
PR: vacanza/holidays#2402
File: holidays/locale/en_TT/LC_MESSAGES/TT.po:46-48
Timestamp: 2025-04-05T08:12:19.986Z
Learning: In the holidays library, localization (PO) files follow this convention: comments (#.) always use American English (en_US) spelling, while the msgid content follows the locale-specific spelling standards of the target language.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-03-08T11:28:48.652Z
Learnt from: KJhellico
PR: vacanza/holidays#2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:285-299
Timestamp: 2025-03-08T11:28:48.652Z
Learning: In the holidays project, message IDs (msgids) in locale files use region-specific naming conventions (e.g., "Muharram", "Id-ul-Fitr" in en_IN locale for India), while translator comments use internationally recognized names from the project's default locale (en_US) such as "Ashura", "Eid al-Fitr". This difference is intentional for proper localization.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-03-05T17:51:00.633Z
Learnt from: KJhellico
PR: vacanza/holidays#2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:30-299
Timestamp: 2025-03-05T17:51:00.633Z
Learning: In the Holidays project, .po files for a country's default locale use empty msgstr fields as a standard convention.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-04-17T17:08:48.082Z
Learnt from: PPsyrius
PR: vacanza/holidays#2438
File: holidays/locale/ar_IQ/LC_MESSAGES/IQ.po:35-81
Timestamp: 2025-04-17T17:08:48.082Z
Learning: In holiday PO files, when the file represents the default language of an entity (e.g., ar_IQ for Iraq), no translations in `msgstr` are required as the `msgid` values are already in the target language.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-06-11T18:32:25.595Z
Learnt from: ankushhKapoor
PR: vacanza/holidays#2601
File: holidays/locale/en_MN/LC_MESSAGES/MN.po:13-14
Timestamp: 2025-06-11T18:32:25.595Z
Learning: For non-default locale `.po` files, the header comment format is:
`# <Country> holidays <locale> localization.` (no trailing hash).
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-06-25T20:55:00.642Z
Learnt from: KJhellico
PR: vacanza/holidays#2651
File: holidays/locale/nl/LC_MESSAGES/BQ.po:29-95
Timestamp: 2025-06-25T20:55:00.642Z
Learning: In the holidays library, Dutch locale files (.po) with `X-Source-Language: nl` should have empty msgstr entries when the target language is also Dutch. The library uses fallback=True with gettext, which returns the original msgid when msgstr is empty. This is the correct pattern for native language files and does not cause blank holiday names.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-06-26T15:34:35.476Z
Learnt from: KJhellico
PR: vacanza/holidays#2676
File: holidays/locale/en_US/LC_MESSAGES/TN.po:17-28
Timestamp: 2025-06-26T15:34:35.476Z
Learning: In the holidays project, .po file header metadata updates (version numbers, revision dates, translator information) are legitimate changes when part of localization work and don't require `make l10n` regeneration. The `make l10n` command is primarily for formatting fixes and missing translator comments, not for intentional metadata updates.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-08-26T21:24:41.827Z
Learnt from: KJhellico
PR: vacanza/holidays#2860
File: holidays/countries/burkina_faso.py:27-30
Timestamp: 2025-08-26T21:24:41.827Z
Learning: Countries in the holidays library that don't have localization support yet should use plain English strings for labels (e.g., `estimated_label = "%s (estimated)"`), while only countries with existing .po translation files should use `tr()` wrapping. Check for the presence of .po files in holidays/locale to determine if a country has localization support.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-03-30T13:33:31.598Z
Learnt from: PPsyrius
PR: vacanza/holidays#2388
File: holidays/locale/fr/LC_MESSAGES/CI.po:28-101
Timestamp: 2025-03-30T13:33:31.598Z
Learning: In the holidays library, for localization files of the default language (like French for Ivory Coast in fr/LC_MESSAGES/CI.po), the best practice is to leave the message strings (msgstr) empty to avoid possible typos, since the message IDs (msgid) are already in the target language.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-08-21T04:56:03.780Z
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.780Z
Learning: In the holidays library, countries with localization support consistently use tr() wrappers around holiday names when calling _add_* methods (e.g., self._add_new_years_day(tr("Holiday Name"))). This is the established pattern across United States, Thailand, and other l10n-enabled countries, contrary to any suggestion that translation is handled internally by _add_* methods.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-08-09T18:31:23.218Z
Learnt from: KJhellico
PR: vacanza/holidays#2778
File: tests/countries/test_kiribati.py:15-15
Timestamp: 2025-08-09T18:31:23.218Z
Learning: In the holidays project test files, the standard import pattern is `from holidays.countries.<country> import Country, CODE1, CODE2` (used in ~97% of test files), not `from holidays.countries import Country, CODE1, CODE2`. Only a few exceptions (Suriname, Sierra Leone, Mauritius, Mali, Ivory Coast, Guyana) use the aggregated import pattern.
Applied to files:
holidays/countries/__init__.py
📚 Learning: 2025-06-19T02:34:14.456Z
Learnt from: PPsyrius
PR: vacanza/holidays#2643
File: holidays/countries/mauritius.py:171-184
Timestamp: 2025-06-19T02:34:14.456Z
Learning: In the holidays library, `_CustomIslamicHolidays` subclasses follow a consistent pattern of NOT having docstrings. They go directly to defining date dictionaries, as evidenced by Malaysia, Singapore, UAE, and dozens of other country implementations.
Applied to files:
holidays/countries/myanmar.py
🧬 Code graph analysis (10)
holidays/groups/__init__.py (1)
holidays/groups/burmese.py (1)
BurmeseCalendarHolidays
(20-271)
tests/countries/test_myanmar.py (2)
tests/common.py (8)
TestCase
(31-370)assertAliases
(124-133)assertNoHolidays
(324-326)assertHolidayName
(198-202)assertNoHolidayName
(305-307)assertHolidayNameCount
(258-260)assertHolidays
(231-233)assertLocalizedHolidays
(359-370)holidays/countries/myanmar.py (3)
Myanmar
(28-142)MM
(145-146)MMR
(149-150)
holidays/calendars/__init__.py (1)
holidays/calendars/burmese.py (1)
_BurmeseLunisolar
(23-317)
holidays/groups/burmese.py (3)
holidays/calendars/burmese.py (9)
_BurmeseLunisolar
(23-317)tazaungmon_waxing_moon_date
(227-248)pyatho_waxing_moon_date
(273-294)kason_full_moon_date
(158-179)tazaungmon_full_moon_date
(250-271)thingyan_dates
(139-156)tabaung_full_moon_date
(296-317)thadingyut_full_moon_date
(204-225)waso_full_moon_date
(181-202)holidays/calendars/gregorian.py (1)
_timedelta
(37-42)holidays/holiday_base.py (1)
_add_holiday
(797-809)
tests/calendars/test_burmese.py (1)
holidays/calendars/burmese.py (3)
_BurmeseLunisolar
(23-317)thingyan_dates
(139-156)jdn_to_gregorian
(101-123)
tests/groups/test_burmese.py (2)
tests/common.py (1)
TestCase
(31-370)holidays/groups/burmese.py (10)
BurmeseCalendarHolidays
(20-271)_add_myanmar_new_year
(119-162)_add_tabaung_full_moon_day
(164-180)_add_kason_full_moon_day
(81-97)_add_waso_full_moon_day
(254-271)_add_thadingyut_full_moon_day
(218-234)_add_diwali_myanmar
(37-54)_add_tazaungmon_full_moon_day
(182-198)_add_myanmar_national_day
(99-117)_add_karen_new_year
(56-79)
holidays/calendars/burmese.py (1)
holidays/calendars/gregorian.py (1)
_timedelta
(37-42)
holidays/groups/custom.py (1)
holidays/helpers.py (1)
_normalize_tuple
(39-49)
holidays/countries/__init__.py (1)
holidays/countries/myanmar.py (3)
Myanmar
(28-142)MM
(145-146)MMR
(149-150)
holidays/countries/myanmar.py (6)
holidays/calendars/islamic.py (1)
_CustomIslamicHolidays
(4085-4086)holidays/groups/burmese.py (11)
_add_myanmar_new_year
(119-162)_add_tabaung_full_moon_day
(164-180)_add_kason_full_moon_day
(81-97)_add_waso_full_moon_day
(254-271)_add_thadingyut_full_moon_eve
(200-216)_add_thadingyut_full_moon_day
(218-234)_add_thadingyut_full_moon_day_two
(236-252)_add_diwali_myanmar
(37-54)_add_tazaungmon_full_moon_day
(182-198)_add_myanmar_national_day
(99-117)_add_karen_new_year
(56-79)holidays/groups/chinese.py (1)
_add_chinese_new_years_day
(134-144)holidays/groups/international.py (2)
_add_new_years_day
(142-150)_add_labor_day
(115-124)holidays/groups/islamic.py (2)
IslamicHolidays
(20-453)_add_eid_al_adha_day
(109-120)holidays/groups/custom.py (1)
StaticHolidays
(18-49)
⏰ 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). (2)
- GitHub Check: Build distribution
- GitHub Check: Test docs build
🔇 Additional comments (21)
snapshots/countries/MM_COMMON.json (2)
1-2472
: Confirm snapshot is generated, not hand‑edited.Ensure this file came from
make snapshot
and matches test expectations; fix generation code if discrepancies are found.
1721-1722
: Cross‑year substitutions are intentional — confirm official gazette source.
- holidays/countries/myanmar.py defines substituted_date_format and special_public_holidays and contains 2024: (DEC, 31, JAN, 11, 2025) (see lines ~168–179), which produces the 2024‑12‑31 substitution in the snapshot; the file cites a GNLM archive link as the source.
- Confirm the 2025→2026 substitution in the snapshot (lines 1754–1755) matches an official government gazette; if not, update the mapping/label or attach the official citation.
holidays/locale/en_US/LC_MESSAGES/MM.po (2)
110-118
: Substituted date format and message look correct for en_US.Matches snapshot’s “mm/dd/YYYY” and “Day off (substituted from %s)”.
74-77
: Verify translation intent for “holidays” vs “full‑moon day” labels.Burmese msgids imply multi‑day holidays (“...ရုံးပိတ်ရက်များ”), while en_US uses singular forms (“Myanmar New Year”, “Thadingyut Holiday”, “Full Moon Day of Tazaungmon”). Confirm this is deliberate and consistent with tests/docs.
Also applies to: 90-101
holidays/locale/my/LC_MESSAGES/MM.po (1)
13-28
: my default‑locale catalog shape is correct (empty msgstr).Header, source language, and empty msgstr entries follow project conventions.
holidays/groups/custom.py (1)
34-39
: Back‑compat check — no regression found: substituted_ are paired with special_public_holidays.*
Search output shows every file defining substituted_* also declares special_public_holidays (e.g. kazakhstan.py, myanmar.py, vietnam.py, uzbekistan.py, ukraine.py, taiwan.py, russia.py, hungary.py, china.py, belarus.py, azerbaijan.py). No change required.holidays/calendars/burmese.py (1)
100-124
: JDN→Gregorian conversion looks correct.Algorithm and edge handling are sound for our use here.
holidays/calendars/__init__.py (1)
17-17
: Public re-export of _BurmeseLunisolar is consistent.Placement and style match existing calendar exports.
holidays/groups/__init__.py (1)
17-17
: Expose BurmeseCalendarHolidays in groups API.Good addition; ordering remains coherent.
tests/test_holiday_base.py (1)
1228-1232
: Expectation fixed: no substituted holidays in empty stubs.Matches new detection logic.
holidays/countries/__init__.py (1)
166-166
: Myanmar re-export is correct and alphabetized.Absolute import and placement between Mozambique and Namibia match project convention. LGTM.
tests/groups/test_burmese.py (1)
31-41
: LGTM — out-of-range behavior is asserted cleanly.The custom HolidayBase mixin and empty result check are sound.
holidays/groups/burmese.py (1)
155-156
: Fix Thingyan span off-by-one: default to Akya..Atat inclusiveFile: holidays/groups/burmese.py lines 155–156 — current logic includes a pre-day by default and hardcodes 8 for extra_days_after; default should be Akya..Atat inclusive, with optional pre-days and 5 post-days.
- begin = -1 - extra_days_before - end = 8 if extra_days_after else (atat - akya).days + 1 + # Default: Akya..Atat inclusive. Optionals: pre-days and 5 post-days. + begin = -extra_days_before + days_after = 5 if extra_days_after else 0 + end = (atat - akya).days + 1 + days_afterRun Myanmar New Year tests for counts after this change (expected: 2007–2016 => 10; 2022–2023 => 8; 2024+ => 9).
holidays/countries/myanmar.py (8)
48-55
: Metadata looks solid.Country code, default language, estimated label, and start year are consistent with project patterns.
56-72
: Constructor matches current project convention.Signature and mixin initialization order look correct, including
islamic_show_estimated
and StaticHolidays wiring.
73-77
: Gate Jan 1 correctly (post-2024).Rule aligns with 2025 policy changes. Please confirm tests cover 2024 vs 2025 boundary.
171-176
: Substituted-holiday labels and format are set.Meets HolidayBase validation requirements. Numeric date format is fine for Burmese.
39-46
: Refs are helpful.Good use of archived sources; keep them up to date if MOI pages move again.
132-134
: Keep current Burmese spelling — "ဒီပါဝလီ" is correct. Government/official Burmese sources commonly use "ဒီပါဝလီ" (variants exist), so leave self._add_diwali_myanmar(tr("ဒီပါဝလီနေ့")) unchanged.Likely an incorrect or invalid review comment.
153-161
: Eid al‑Adha dates (2020–2025) verified — no changes requiredConfirmed against Myanmar Ministry of Information (Notification No.112/2023) and consolidated public-holiday listings (Timeanddate, Calendarific); holidays/countries/myanmar.py lines 153–161 match the government‑announced dates.
177-185
: Myanmar special/substituted holidays — mapping and tests checked; tests cover substituted "to" days but not the original "from" datesholidays/countries/myanmar.py (MyanmarStaticHolidays.special_public_holidays; ~lines 175–185) matches the snippet and Myanmar(years=...) emits substituted entries whose labels include the source dates. tests/countries/test_myanmar.py asserts those substituted "to" dates (Burmese and en_US localized labels — see asserts around lines 281–318 and 329–356). The original source dates (e.g., 2025-03-22, 2025-03-29, 2025-11-08, 2026-01-03) do not appear as separate holiday keys in the generated calendars.
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 job tackling this 🚀
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 (7)
tests/calendars/test_burmese.py (1)
20-21
: Call the instance setUp method, not the class setUpClass.This incorrectly attempts to invoke the classmethod within an instance method.
Apply this diff:
def setUp(self): - super().setUpClass() + super().setUp()tests/countries/test_myanmar.py (1)
240-253
: Consider verifying Karen New Year across the full date range.Karen New Year can occur in either December of the previous year or January of the current year. Consider adding a broader assertion to verify the holiday appears once per year across the entire range.
Add this assertion after line 252:
self.assertHolidayName(name, range(1948, 2050))holidays/groups/burmese.py (1)
151-151
: Fix typo in comment."Delault" should be "Default".
Apply this diff:
- # Delault length is from Thingyan Akyo (akya - 1) to New Year Day (atat + 1). + # Default length is from Thingyan Akyo (akya - 1) to New Year Day (atat + 1).holidays/countries/myanmar.py (4)
88-94
: Armed Forces Day label fixed — LGTM.Correct Burmese: “တပ်မတော်နေ့” (>=1955) vs “တော်လှန်ရေးနေ့” (earlier).
Please confirm the year of the official name change (1955 vs 1950s broadly):
When did "Resistance Day" (တော်လှန်ရေးနေ့) officially become "Armed Forces Day" (တပ်မတော်နေ့) in Myanmar?
129-131
: Waso label corrected — LGTM.“ဝါဆိုလပြည့်နေ့” is correct.
141-143
: Tazaungmon label aligned — LGTM.Using the singular “တန်ဆောင်တိုင်လပြည့်နေ့” for the single day is correct.
132-136
: Differentiate Thadingyut days or use a festival label.Reusing “သီတင်းကျွတ်လပြည့်နေ့” for eve/day/day+1 is misleading.
Apply one of:
- Generic festival for eve/day+1, specific for full moon day (minimal change), or
- Three distinct labels.
Minimal-change diff:
- # Thadingyut Holiday. - name = tr("သီတင်းကျွတ်လပြည့်နေ့") - self._add_thadingyut_full_moon_eve(name) - self._add_thadingyut_full_moon_day(name) - self._add_thadingyut_full_moon_day_two(name) + # Thadingyut Holiday. + festival = tr("သီတင်းကျွတ်ပိတ်ရက်များ") + self._add_thadingyut_full_moon_eve(festival) + self._add_thadingyut_full_moon_day(tr("သီတင်းကျွတ်လပြည့်နေ့")) + self._add_thadingyut_full_moon_day_two(festival)
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (7)
holidays/countries/myanmar.py
(1 hunks)holidays/groups/burmese.py
(1 hunks)holidays/locale/en_US/LC_MESSAGES/MM.po
(1 hunks)holidays/locale/my/LC_MESSAGES/MM.po
(1 hunks)snapshots/countries/MM_COMMON.json
(1 hunks)tests/calendars/test_burmese.py
(1 hunks)tests/countries/test_myanmar.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (58)
📚 Learning: 2025-04-03T05:59:57.480Z
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.
Applied to files:
snapshots/countries/MM_COMMON.json
📚 Learning: 2025-06-24T17:26:17.728Z
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/MM_COMMON.json
📚 Learning: 2025-05-06T21:07:11.577Z
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: tests/countries/test_andorra.py:23-28
Timestamp: 2025-05-06T21:07:11.577Z
Learning: In the holidays project, test methods for country holidays follow a standard form where year ranges are explicitly recreated in each test method rather than being stored as class variables, to maintain consistency across all country tests.
Applied to files:
tests/countries/test_myanmar.py
tests/calendars/test_burmese.py
📚 Learning: 2025-04-05T06:49:06.217Z
Learnt from: PPsyrius
PR: vacanza/holidays#2386
File: tests/countries/test_nepal.py:499-536
Timestamp: 2025-04-05T06:49:06.217Z
Learning: In the holidays project, test files follow a dual testing approach: individual methods test specific holidays across multiple years, while comprehensive year-specific tests (e.g., `test_2025`) verify all holidays for a specific year in a single assertion. Both approaches serve different testing purposes and complement each other.
Applied to files:
tests/countries/test_myanmar.py
tests/calendars/test_burmese.py
📚 Learning: 2025-04-05T04:47:27.213Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:47:27.213Z
Learning: For holiday tests in the vacanza/holidays project, structure tests by individual holidays rather than by years. Each test method should focus on a specific holiday and test it across multiple years (from start_year through 2050) using helper methods like `assertHolidayName`. For fixed holidays, use generators like `(f"{year}-01-01" for year in range(1991, 2051))`. For movable holidays, specify individual dates for specific years followed by a range check.
Applied to files:
tests/countries/test_myanmar.py
tests/calendars/test_burmese.py
📚 Learning: 2025-06-16T15:48:48.680Z
Learnt from: PPsyrius
PR: vacanza/holidays#2615
File: tests/countries/test_anguilla.py:1-12
Timestamp: 2025-06-16T15:48:48.680Z
Learning: Test files in the holidays repository follow a standardized structure without module or class docstrings. All country test files use the same pattern: license header, imports, and class definition (`class Test{Country}(CommonCountryTests, TestCase):`) without docstrings. This is an established codebase convention that should be maintained for consistency.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-08-08T14:37:03.045Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-04-05T04:33:53.254Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:33:53.254Z
Learning: For Turkmenistan holiday tests, recommend using CommonCountryTests as the base class rather than unittest.TestCase to follow project conventions, be consistent with other country test files, and gain access to common test utilities.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-04-05T04:50:40.752Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:31-49
Timestamp: 2025-04-05T04:50:40.752Z
Learning: For Turkmenistan holiday tests, use this class structure: `class TestTurkmenistan(CommonCountryTests, TestCase)` with imports `from unittest import TestCase`, `from holidays.countries import Turkmenistan, TM, TKM`, and `from tests.common import CommonCountryTests`. Ensure to call `super().setUp()` in the setUp method.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-04-05T04:29:38.042Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:85-86
Timestamp: 2025-04-05T04:29:38.042Z
Learning: For testing holiday implementations in the vacanza/holidays repository, recommend using `from tests.common import CommonCountryTests` as the base class instead of directly using `unittest.TestCase` to maintain consistency with project conventions and leverage common test utilities.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-08-20T19:46:15.625Z
Learnt from: KJhellico
PR: vacanza/holidays#2833
File: tests/countries/test_uganda.py:15-0
Timestamp: 2025-08-20T19:46:15.625Z
Learning: In the holidays project, the standard import pattern for country test files is `from holidays.countries.<country> import Country, CODE1, CODE2` (direct module import), used by ~75% of country test files. Only a minority (~25%) use the aggregated public API import `from holidays.countries import Country, CODE1, CODE2`. The direct module import pattern should be used for new country test files to follow the established convention.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-14T16:05:55.181Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_iran.py:28-28
Timestamp: 2025-09-14T16:05:55.181Z
Learning: In tests/countries/test_iran.py, using years=(self.start_year - 1, 2102) in the no-holiday test is intentional because Iran uses the Persian Calendar which has specific supported year range constraints, and 2102 represents the upper limit of the Persian Calendar's supported range, not just an arbitrary far-future date.
Applied to files:
tests/countries/test_myanmar.py
tests/calendars/test_burmese.py
📚 Learning: 2025-09-17T09:07:56.435Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_paraguay.py:134-139
Timestamp: 2025-09-17T09:07:56.435Z
Learning: In the vacanza/holidays project, when testing holidays that start from a specific year (not the country's start_year), the standard pattern is to use `range(specific_year, self.end_year)` for the holiday dates and `assertNoHolidayName(name, range(self.start_year, specific_year))` for the gap period. Using `self.full_range` with year conditions like `if year >= specific_year` is not the established pattern and would be inconsistent with the codebase.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-03T14:05:10.592Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_aruba.py:77-79
Timestamp: 2025-09-03T14:05:10.592Z
Learning: The assertNoHolidayName helper method in the vacanza/holidays test framework accepts both individual years (scalars) and iterables of years, making calls like assertNoHolidayName(name, AW.start_year, range(2023, 2050)) valid where AW.start_year is a single integer year.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-06-14T10:58:43.636Z
Learnt from: PPsyrius
PR: vacanza/holidays#2629
File: tests/countries/test_namibia.py:22-23
Timestamp: 2025-06-14T10:58:43.636Z
Learning: In the vacanza/holidays project, country test files consistently use range(start_year, 2050) which intentionally excludes 2050 and stops at 2049. This is a library-wide implementation pattern, not an off-by-one error.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-14T16:03:13.496Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_barbados.py:21-23
Timestamp: 2025-09-14T16:03:13.496Z
Learning: In tests/countries/test_barbados.py, using years_non_observed=range(2000, 2024) is intentional because all observed holiday examples fall within 2001-2023, making this range appropriate for limiting testing to years where observed holidays actually exist in the test data.
Applied to files:
tests/countries/test_myanmar.py
tests/calendars/test_burmese.py
📚 Learning: 2025-09-17T09:07:56.435Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_paraguay.py:134-139
Timestamp: 2025-09-17T09:07:56.435Z
Learning: In the vacanza/holidays project, for holidays that start from a specific year (not the country's start_year), the standard pattern is to use `range(specific_year, self.end_year)` rather than `self.full_range` with year conditions. This maintains consistency across the codebase and clearly separates the holiday period from the pre-holiday period using `assertNoHolidayName(name, range(self.start_year, specific_year))`.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-10T16:17:30.428Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_bosnia_and_herzegovina.py:21-24
Timestamp: 2025-09-10T16:17:30.428Z
Learning: Bosnia and Herzegovina holidays implementation currently lacks a start_year attribute. In tests/countries/test_bosnia_and_herzegovina.py, using cls.full_range = range(2000, 2050) is intentional to bound assertions and setup. Do not suggest replacing it with harness default full_range until start_year is introduced.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-10T13:46:06.329Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_canada.py:745-747
Timestamp: 2025-09-10T13:46:06.329Z
Learning: In the vacanza/holidays test framework, assertion methods like assertNoSubdivNuOptionalHolidayName correctly accept multiple range objects as separate arguments, such as assertNoSubdivNuOptionalHolidayName(name, range(CA.start_year, 2000), range(2020, 2050)). This is the intended usage pattern and should not be "fixed" by splitting into separate calls.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-07-24T15:21:31.632Z
Learnt from: PPsyrius
PR: vacanza/holidays#2750
File: tests/countries/test_germany.py:46-46
Timestamp: 2025-07-24T15:21:31.632Z
Learning: In the holidays project test files, the standard method name for testing the absence of holidays is `test_no_holidays`, not more descriptive names like `test_no_holidays_before_1990`. This is a consistent naming convention across country test files like France and Germany.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-03T16:49:35.246Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
tests/countries/test_myanmar.py
tests/calendars/test_burmese.py
📚 Learning: 2025-09-14T16:14:44.954Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_bulgaria.py:21-23
Timestamp: 2025-09-14T16:14:44.954Z
Learning: For Bulgaria in the holidays library, using years_non_observed=range(2017, 2030) in tests/countries/test_bulgaria.py is intentional because all observed holiday examples in the test data fall within this range (latest being 2029), making this range appropriate for limiting testing to years where observed holidays actually exist, improving both correctness and performance.
Applied to files:
tests/countries/test_myanmar.py
tests/calendars/test_burmese.py
📚 Learning: 2025-09-14T16:14:44.954Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_bulgaria.py:21-23
Timestamp: 2025-09-14T16:14:44.954Z
Learning: For Bulgaria in the holidays library, using years_non_observed=range(2017, 2030) in tests/countries/test_bulgaria.py is intentional because all observed holiday examples in the test data fall within this range (latest being 2029), making this range appropriate for limiting testing to years where observed holidays actually exist.
Applied to files:
tests/countries/test_myanmar.py
tests/calendars/test_burmese.py
📚 Learning: 2025-08-25T04:28:02.061Z
Learnt from: PPsyrius
PR: vacanza/holidays#2848
File: tests/countries/test_somalia.py:44-127
Timestamp: 2025-08-25T04:28:02.061Z
Learning: In the holidays library, Islamic holiday tests use `self.no_estimated_holidays = Country(years=years, islamic_show_estimated=False)` as the library-wide standard approach to simplify test cases. This pattern is intentional and preferred over testing estimated labels.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-07-09T21:16:35.145Z
Learnt from: KJhellico
PR: vacanza/holidays#2623
File: tests/countries/test_christmas_island.py:136-146
Timestamp: 2025-07-09T21:16:35.145Z
Learning: In Christmas Island's holiday implementation, the test_christmas_day method cannot use assertNoNonObservedHoliday because in some years observed Christmas Day overlaps with Boxing Day when both holidays are moved due to weekend conflicts, causing the standard non-observed holiday check to fail inappropriately.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-08-12T17:16:54.497Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: tests/calendars/test_julian.py:35-36
Timestamp: 2025-08-12T17:16:54.497Z
Learning: In the vacanza/holidays project calendar tests (Thai, Ethiopian, Julian, etc.), the established testing pattern for validation methods is to use simple for loops like `for year in known_data_dict:` followed by `self.assertEqual(expected, actual)` without using unittest's subTest feature. This pattern is consistently maintained across all calendar test files.
Applied to files:
tests/countries/test_myanmar.py
tests/calendars/test_burmese.py
📚 Learning: 2025-06-26T15:34:35.476Z
Learnt from: KJhellico
PR: vacanza/holidays#2676
File: holidays/locale/en_US/LC_MESSAGES/TN.po:17-28
Timestamp: 2025-06-26T15:34:35.476Z
Learning: In the holidays project, .po file header metadata updates (version numbers, revision dates, translator information) are legitimate changes when part of localization work and don't require `make l10n` regeneration. The `make l10n` command is primarily for formatting fixes and missing translator comments, not for intentional metadata updates.
Applied to files:
holidays/locale/my/LC_MESSAGES/MM.po
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-03-30T18:25:07.087Z
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.
Applied to files:
holidays/locale/my/LC_MESSAGES/MM.po
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-06-28T10:39:19.185Z
Learnt from: KJhellico
PR: vacanza/holidays#2684
File: holidays/locale/it/LC_MESSAGES/SM.po:13-13
Timestamp: 2025-06-28T10:39:19.185Z
Learning: In the holidays project, .po file header comments use the format "# [Country] holidays." for default language files (without trailing hash) and "# [Country] holidays [locale] localization." for non-default language files (also without trailing hash).
Applied to files:
holidays/locale/my/LC_MESSAGES/MM.po
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-06-11T18:32:25.595Z
Learnt from: ankushhKapoor
PR: vacanza/holidays#2601
File: holidays/locale/en_MN/LC_MESSAGES/MN.po:13-14
Timestamp: 2025-06-11T18:32:25.595Z
Learning: For non-default locale `.po` files, the header comment format is:
`# <Country> holidays <locale> localization.` (no trailing hash).
Applied to files:
holidays/locale/my/LC_MESSAGES/MM.po
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-03-05T17:51:00.633Z
Learnt from: KJhellico
PR: vacanza/holidays#2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:30-299
Timestamp: 2025-03-05T17:51:00.633Z
Learning: In the Holidays project, .po files for a country's default locale use empty msgstr fields as a standard convention.
Applied to files:
holidays/locale/my/LC_MESSAGES/MM.po
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-05-06T15:25:44.333Z
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: holidays/locale/ca/LC_MESSAGES/AD.po:31-40
Timestamp: 2025-05-06T15:25:44.333Z
Learning: In the Holidays project, msgid fields in localization files contain strings in the entity's default language (as defined by default_language attribute), not English source strings as in standard gettext implementations.
Applied to files:
holidays/locale/my/LC_MESSAGES/MM.po
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-06-25T20:55:00.642Z
Learnt from: KJhellico
PR: vacanza/holidays#2651
File: holidays/locale/nl/LC_MESSAGES/BQ.po:29-95
Timestamp: 2025-06-25T20:55:00.642Z
Learning: In the holidays library, Dutch locale files (.po) with `X-Source-Language: nl` should have empty msgstr entries when the target language is also Dutch. The library uses fallback=True with gettext, which returns the original msgid when msgstr is empty. This is the correct pattern for native language files and does not cause blank holiday names.
Applied to files:
holidays/locale/my/LC_MESSAGES/MM.po
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-03-08T11:28:48.652Z
Learnt from: KJhellico
PR: vacanza/holidays#2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:285-299
Timestamp: 2025-03-08T11:28:48.652Z
Learning: In the holidays project, message IDs (msgids) in locale files use region-specific naming conventions (e.g., "Muharram", "Id-ul-Fitr" in en_IN locale for India), while translator comments use internationally recognized names from the project's default locale (en_US) such as "Ashura", "Eid al-Fitr". This difference is intentional for proper localization.
Applied to files:
holidays/locale/my/LC_MESSAGES/MM.po
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-06-13T12:18:03.539Z
Learnt from: PPsyrius
PR: vacanza/holidays#2614
File: holidays/countries/guyana.py:78-90
Timestamp: 2025-06-13T12:18:03.539Z
Learning: The holidays codebase now uses the constructor signature pattern `__init__(self, *args, islamic_show_estimated: bool = True, **kwargs)` across country classes.
Applied to files:
holidays/countries/myanmar.py
📚 Learning: 2025-06-19T02:34:18.382Z
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/myanmar.py
holidays/groups/burmese.py
📚 Learning: 2025-08-24T06:53:35.897Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2852
File: holidays/countries/tajikistan.py:55-56
Timestamp: 2025-08-24T06:53:35.897Z
Learning: In Tajikistan, March 8th is celebrated as Mother's Day (Рӯзи Модар) rather than International Women's Day, so the country-specific implementation should use _add_holiday_mar_8() rather than the shared _add_womens_day() helper from InternationalHolidays.
Applied to files:
holidays/countries/myanmar.py
📚 Learning: 2025-08-21T04:56:03.780Z
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.780Z
Learning: In the holidays library, countries with localization support consistently use tr() wrappers around holiday names when calling _add_* methods (e.g., self._add_new_years_day(tr("Holiday Name"))). This is the established pattern across United States, Thailand, and other l10n-enabled countries, contrary to any suggestion that translation is handled internally by _add_* methods.
Applied to files:
holidays/countries/myanmar.py
📚 Learning: 2025-08-28T02:34:11.657Z
Learnt from: PPsyrius
PR: vacanza/holidays#2860
File: holidays/groups/eastern.py:36-36
Timestamp: 2025-08-28T02:34:11.657Z
Learning: The default estimated_label change from "%s (estimated)" to "%s" in holidays/groups/eastern.py is intentional to remove English-only fallback text from localized holiday names. Countries that need estimated labels should define them properly with localization support rather than relying on the English fallback.
Applied to files:
holidays/countries/myanmar.py
📚 Learning: 2025-08-11T10:14:28.517Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/groups/christian.py:328-343
Timestamp: 2025-08-11T10:14:28.517Z
Learning: For Ethiopian holidays in the `holidays/groups/christian.py` file, docstring wording should maintain source-accurate phrasing (e.g., "in coincidence of" for Ethiopian New Year/Enkutatash), even when it might read awkwardly in English, to ensure consistency with official Ethiopian documentation.
Applied to files:
holidays/countries/myanmar.py
holidays/groups/burmese.py
📚 Learning: 2025-06-19T02:34:14.456Z
Learnt from: PPsyrius
PR: vacanza/holidays#2643
File: holidays/countries/mauritius.py:171-184
Timestamp: 2025-06-19T02:34:14.456Z
Learning: In the holidays library, `_CustomIslamicHolidays` subclasses follow a consistent pattern of NOT having docstrings. They go directly to defining date dictionaries, as evidenced by Malaysia, Singapore, UAE, and dozens of other country implementations.
Applied to files:
holidays/countries/myanmar.py
📚 Learning: 2025-03-19T16:54:58.657Z
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.
Applied to files:
holidays/countries/myanmar.py
holidays/groups/burmese.py
📚 Learning: 2025-04-05T08:12:19.986Z
Learnt from: PPsyrius
PR: vacanza/holidays#2402
File: holidays/locale/en_TT/LC_MESSAGES/TT.po:46-48
Timestamp: 2025-04-05T08:12:19.986Z
Learning: In the holidays library, localization (PO) files follow this convention: comments (#.) always use American English (en_US) spelling, while the msgid content follows the locale-specific spelling standards of the target language.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-04-17T17:08:48.082Z
Learnt from: PPsyrius
PR: vacanza/holidays#2438
File: holidays/locale/ar_IQ/LC_MESSAGES/IQ.po:35-81
Timestamp: 2025-04-17T17:08:48.082Z
Learning: In holiday PO files, when the file represents the default language of an entity (e.g., ar_IQ for Iraq), no translations in `msgstr` are required as the `msgid` values are already in the target language.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-03-30T13:33:31.598Z
Learnt from: PPsyrius
PR: vacanza/holidays#2388
File: holidays/locale/fr/LC_MESSAGES/CI.po:28-101
Timestamp: 2025-03-30T13:33:31.598Z
Learning: In the holidays library, for localization files of the default language (like French for Ivory Coast in fr/LC_MESSAGES/CI.po), the best practice is to leave the message strings (msgstr) empty to avoid possible typos, since the message IDs (msgid) are already in the target language.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-08-26T21:24:41.827Z
Learnt from: KJhellico
PR: vacanza/holidays#2860
File: holidays/countries/burkina_faso.py:27-30
Timestamp: 2025-08-26T21:24:41.827Z
Learning: Countries in the holidays library that don't have localization support yet should use plain English strings for labels (e.g., `estimated_label = "%s (estimated)"`), while only countries with existing .po translation files should use `tr()` wrapping. Check for the presence of .po files in holidays/locale to determine if a country has localization support.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-06-18T17:01:58.067Z
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/calendars/test_burmese.py
📚 Learning: 2025-06-18T17:01:58.067Z
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)` where HolidayClass is passed as the first argument. This is the correct signature used across all country test files.
Applied to files:
tests/calendars/test_burmese.py
📚 Learning: 2025-08-12T17:16:54.497Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: tests/calendars/test_julian.py:35-36
Timestamp: 2025-08-12T17:16:54.497Z
Learning: In the vacanza/holidays project, test methods that iterate over dictionaries of test data (like calendar drift tests) follow the established pattern without using unittest's subTest, as evidenced by the Thai calendar tests and maintained consistently across similar test structures.
Applied to files:
tests/calendars/test_burmese.py
📚 Learning: 2025-04-03T16:58:27.175Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants 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/groups/burmese.py
📚 Learning: 2025-09-17T14:47:15.069Z
Learnt from: KJhellico
PR: vacanza/holidays#2944
File: holidays/groups/burmese.py:151-154
Timestamp: 2025-09-17T14:47:15.069Z
Learning: In the holidays library Myanmar implementation, "Akyo" refers to the Thingyan eve (the day before akya day) according to the main calendar source (cool-emerald.blogspot.com). The spelling "Akyo" should be preserved in comments even when variable names use "akya", as it matches the authoritative calendar terminology.
Applied to files:
holidays/groups/burmese.py
📚 Learning: 2025-09-14T07:26:25.403Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: holidays/countries/south_africa.py:69-75
Timestamp: 2025-09-14T07:26:25.403Z
Learning: When reviewing historical holiday implementations in the vacanza/holidays repository, trust the maintainers' research and implementation decisions for specific historical edge cases, especially when they can provide sources like Wikipedia or other historical documentation that supports unusual or complex date calculation rules during specific time periods.
Applied to files:
holidays/groups/burmese.py
📚 Learning: 2025-08-03T13:48:11.910Z
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:
holidays/groups/burmese.py
📚 Learning: 2025-03-29T15:15:05.919Z
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:
holidays/groups/burmese.py
📚 Learning: 2025-08-19T21:22:13.125Z
Learnt from: KJhellico
PR: vacanza/holidays#2831
File: holidays/countries/south_sudan.py:84-88
Timestamp: 2025-08-19T21:22:13.125Z
Learning: In the holidays library, message comments directly above holiday addition methods must match the holiday name exactly without any additions, modifications, or explanatory text. For example, if the holiday name is "Eid al-Fitr Holiday", the comment should be "# Eid al-Fitr Holiday." with no extra context.
Applied to files:
holidays/groups/burmese.py
📚 Learning: 2025-08-25T09:57:22.291Z
Learnt from: PPsyrius
PR: vacanza/holidays#2833
File: holidays/countries/uganda.py:50-56
Timestamp: 2025-08-25T09:57:22.291Z
Learning: In the holidays package, when adding comments for year-restricted holidays in Uganda and similar country modules, include specific legal or historical context such as the actual laws, parliamentary acts, or government decisions that established the holidays, rather than just generic "since YEAR" information. For example, reference the specific Parliament act, decree, or historical event that created the holiday.
Applied to files:
holidays/groups/burmese.py
📚 Learning: 2025-05-10T04:32:15.760Z
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:
holidays/groups/burmese.py
📚 Learning: 2025-06-15T11:50:44.366Z
Learnt from: PPsyrius
PR: vacanza/holidays#2601
File: holidays/countries/mongolia.py:140-146
Timestamp: 2025-06-15T11:50:44.366Z
Learning: The holidays library doesn't currently have helper functions like `_add_holiday_span` for adding consecutive multi-day holidays. Countries like Mongolia, Thailand, and Vietnam implement multi-day holiday spans using inline loops with `_timedelta(dt, delta)` pattern.
Applied to files:
holidays/groups/burmese.py
🧬 Code graph analysis (4)
tests/countries/test_myanmar.py (2)
tests/common.py (8)
TestCase
(31-370)assertAliases
(124-133)assertNoHolidays
(324-326)assertHolidayName
(198-202)assertNoHolidayName
(305-307)assertHolidayNameCount
(258-260)assertHolidays
(231-233)assertLocalizedHolidays
(359-370)holidays/countries/myanmar.py (3)
Myanmar
(28-148)MM
(151-152)MMR
(155-156)
holidays/countries/myanmar.py (6)
holidays/calendars/islamic.py (1)
_CustomIslamicHolidays
(4085-4086)holidays/groups/burmese.py (12)
BurmeseCalendarHolidays
(20-271)_add_myanmar_new_year
(119-162)_add_tabaung_full_moon_day
(164-180)_add_kason_full_moon_day
(81-97)_add_waso_full_moon_day
(254-271)_add_thadingyut_full_moon_eve
(200-216)_add_thadingyut_full_moon_day
(218-234)_add_thadingyut_full_moon_day_two
(236-252)_add_diwali_myanmar
(37-54)_add_tazaungmon_full_moon_day
(182-198)_add_myanmar_national_day
(99-117)_add_karen_new_year
(56-79)holidays/groups/chinese.py (2)
ChineseCalendarHolidays
(21-265)_add_chinese_new_years_day
(134-144)holidays/groups/islamic.py (2)
IslamicHolidays
(20-453)_add_eid_al_adha_day
(109-120)holidays/groups/custom.py (1)
StaticHolidays
(18-49)holidays/holiday_base.py (1)
HolidayBase
(57-1296)
tests/calendars/test_burmese.py (1)
holidays/calendars/burmese.py (3)
_BurmeseLunisolar
(23-317)thingyan_dates
(139-156)jdn_to_gregorian
(101-123)
holidays/groups/burmese.py (3)
holidays/calendars/burmese.py (9)
_BurmeseLunisolar
(23-317)tazaungmon_waxing_moon_date
(227-248)pyatho_waxing_moon_date
(273-294)kason_full_moon_date
(158-179)tazaungmon_full_moon_date
(250-271)thingyan_dates
(139-156)tabaung_full_moon_date
(296-317)thadingyut_full_moon_date
(204-225)waso_full_moon_date
(181-202)holidays/calendars/gregorian.py (1)
_timedelta
(37-42)holidays/holiday_base.py (1)
_add_holiday
(797-809)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Test Python 3.10 on windows-latest
🔇 Additional comments (14)
snapshots/countries/MM_COMMON.json (1)
1-2472
: LGTM!The snapshot data accurately captures Myanmar holidays from 1950-2050, including multi-day observances, religious festivals, and substituted holidays. The file structure follows the established snapshot format.
holidays/locale/en_US/LC_MESSAGES/MM.po (1)
1-122
: LGTM!The English localization file is well-structured with accurate translations from Burmese to English. The msgid entries use proper Burmese text and msgstr provides corresponding English translations. The header metadata and format strings follow the established conventions.
holidays/locale/my/LC_MESSAGES/MM.po (2)
1-122
: LGTM!The Myanmar default locale file follows the correct pattern with empty msgstr entries and proper Burmese msgid values. The header format and structure align with project conventions for default language files.
13-13
: Fix header comment format for default language file.Based on the project's conventions, default language files should use the format "# [Country] holidays." not "# [Country] holidays [locale] localization.". Since
my
is the default language for Myanmar, this should be "# Myanmar holidays."Apply this diff:
-# Myanmar holidays. +# Myanmar holidays.Wait, the current format is already correct. My apologies for the confusion - the file already uses "# Myanmar holidays." which is the proper format for the default language file.
tests/countries/test_myanmar.py (2)
129-131
: LGTM!The holiday name count assertions are correctly structured and cover the various Myanmar New Year patterns across different year ranges.
254-287
: LGTM!The comprehensive test for 2024 holidays effectively validates the complete set of Myanmar holidays including the substituted day off entries. Good coverage of all holiday types.
holidays/groups/burmese.py (1)
119-162
: LGTM!The Myanmar New Year implementation correctly handles the various holiday patterns with flexible extra days before and after the core festival period. The logic properly accounts for the different configurations used across years.
holidays/countries/myanmar.py (7)
28-36
: Good base-class composition order.HolidayBase first, then calendar mixins. Matches repo conventions.
49-56
: i18n defaults and estimated_label look right."default_language", "supported_languages", and a localized estimated_label align with recent changes to eastern calendars.
57-73
: Constructor signature matches project pattern.
islamic_show_estimated
plumbed into IslamicHolidays via custom class. Nice.
177-182
: Substitution metadata looks good.Localized date format and label are consistent with StaticHolidays expectations.
75-78
: Verify source before making Jan 1 permanentFile: holidays/countries/myanmar.py:75-78 — current code adds New Year's Day for all years >= 2025 without an authoritative source; either attach a source showing the change is permanent or restrict the rule to 2025:
- if self._year >= 2025: + if self._year == 2025: # New Year's Day. self._add_new_years_day(tr("နိုင်ငံတကာနှစ်သစ်ကူးနေ့"))
159-167
: Eid al‑Adha 2025 confirmed (Jun 7); Eid al‑Fitr is variableJun 7, 2025 is the correct Eid al‑Adha date for Myanmar. Eid al‑Fitr is declared annually by authorities (not a permanently fixed entry) — do not add predicted Eid al‑Fitr dates; only include officially announced dates.
108-111
: Make Chinese New Year year-specific (2025 only) unless MOI confirms it's permanent).MOI/state sources show Chinese New Year was added to the 2025 public-holiday calendar but do not clearly state it is an indefinite/recurring holiday. (evisa.moip.gov.mm)
File: holidays/countries/myanmar.py Lines: 108-111
- if self._year >= 2025: + if self._year == 2025: # Chinese New Year. self._add_chinese_new_years_day(tr("တရုတ်နှစ်သစ်ကူးနေ့"))
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: 6
♻️ Duplicate comments (1)
holidays/calendars/burmese.py (1)
181-317
: DRY up “from next-year start” helpers.Six methods repeat the same pattern differing only by the delta. Extract a private helper and pass the offsets.
class _BurmeseLunisolar: + def _from_next_year_start(self, year: int, delta: int) -> Optional[date]: + if not (next_year_start_date := self._get_start_date(year + 1)): + return None + return _timedelta(next_year_start_date, delta) @@ - if not (next_year_start_date := self._get_start_date(year + 1)): - return None - return _timedelta(next_year_start_date, -252) + return self._from_next_year_start(year, -252) @@ - if not (next_year_start_date := self._get_start_date(year + 1)): - return None - return _timedelta(next_year_start_date, -163) + return self._from_next_year_start(year, -163) @@ - if not (next_year_start_date := self._get_start_date(year + 1)): - return None - return _timedelta(next_year_start_date, -148) + return self._from_next_year_start(year, -148) @@ - if not (next_year_start_date := self._get_start_date(year + 1)): - return None - return _timedelta(next_year_start_date, -134) + return self._from_next_year_start(year, -134) @@ - if not (next_year_start_date := self._get_start_date(year + 1)): - return None - return _timedelta(next_year_start_date, -89) + return self._from_next_year_start(year, -89) @@ - if not (next_year_start_date := self._get_start_date(year + 1)): - return None - return _timedelta(next_year_start_date, -16) + return self._from_next_year_start(year, -16)
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (6)
holidays/calendars/burmese.py
(1 hunks)holidays/countries/myanmar.py
(1 hunks)holidays/locale/en_US/LC_MESSAGES/MM.po
(1 hunks)holidays/locale/my/LC_MESSAGES/MM.po
(1 hunks)snapshots/countries/MM_COMMON.json
(1 hunks)tests/countries/test_myanmar.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (69)
📓 Common learnings
Learnt from: KJhellico
PR: vacanza/holidays#2944
File: holidays/countries/myanmar.py:112-121
Timestamp: 2025-09-17T15:15:24.229Z
Learning: The Myanmar government's "continuous public days for 2024-2025" policy specifically covers Tabaung and Tazaungmon full moon days by bridging gaps with weekends, but does not apply to Myanmar New Year (Thingyan) extra days, which follow a separate policy that correctly uses `self._year >= 2024`.
📚 Learning: 2025-03-30T18:25:07.087Z
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-06-28T10:39:19.185Z
Learnt from: KJhellico
PR: vacanza/holidays#2684
File: holidays/locale/it/LC_MESSAGES/SM.po:13-13
Timestamp: 2025-06-28T10:39:19.185Z
Learning: In the holidays project, .po file header comments use the format "# [Country] holidays." for default language files (without trailing hash) and "# [Country] holidays [locale] localization." for non-default language files (also without trailing hash).
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-05-06T15:25:44.333Z
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: holidays/locale/ca/LC_MESSAGES/AD.po:31-40
Timestamp: 2025-05-06T15:25:44.333Z
Learning: In the Holidays project, msgid fields in localization files contain strings in the entity's default language (as defined by default_language attribute), not English source strings as in standard gettext implementations.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-03-08T11:28:48.652Z
Learnt from: KJhellico
PR: vacanza/holidays#2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:285-299
Timestamp: 2025-03-08T11:28:48.652Z
Learning: In the holidays project, message IDs (msgids) in locale files use region-specific naming conventions (e.g., "Muharram", "Id-ul-Fitr" in en_IN locale for India), while translator comments use internationally recognized names from the project's default locale (en_US) such as "Ashura", "Eid al-Fitr". This difference is intentional for proper localization.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-04-05T08:12:19.986Z
Learnt from: PPsyrius
PR: vacanza/holidays#2402
File: holidays/locale/en_TT/LC_MESSAGES/TT.po:46-48
Timestamp: 2025-04-05T08:12:19.986Z
Learning: In the holidays library, localization (PO) files follow this convention: comments (#.) always use American English (en_US) spelling, while the msgid content follows the locale-specific spelling standards of the target language.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-04-17T17:08:48.082Z
Learnt from: PPsyrius
PR: vacanza/holidays#2438
File: holidays/locale/ar_IQ/LC_MESSAGES/IQ.po:35-81
Timestamp: 2025-04-17T17:08:48.082Z
Learning: In holiday PO files, when the file represents the default language of an entity (e.g., ar_IQ for Iraq), no translations in `msgstr` are required as the `msgid` values are already in the target language.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-03-05T17:51:00.633Z
Learnt from: KJhellico
PR: vacanza/holidays#2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:30-299
Timestamp: 2025-03-05T17:51:00.633Z
Learning: In the Holidays project, .po files for a country's default locale use empty msgstr fields as a standard convention.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-06-11T18:32:25.595Z
Learnt from: ankushhKapoor
PR: vacanza/holidays#2601
File: holidays/locale/en_MN/LC_MESSAGES/MN.po:13-14
Timestamp: 2025-06-11T18:32:25.595Z
Learning: For non-default locale `.po` files, the header comment format is:
`# <Country> holidays <locale> localization.` (no trailing hash).
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-06-25T20:55:00.642Z
Learnt from: KJhellico
PR: vacanza/holidays#2651
File: holidays/locale/nl/LC_MESSAGES/BQ.po:29-95
Timestamp: 2025-06-25T20:55:00.642Z
Learning: In the holidays library, Dutch locale files (.po) with `X-Source-Language: nl` should have empty msgstr entries when the target language is also Dutch. The library uses fallback=True with gettext, which returns the original msgid when msgstr is empty. This is the correct pattern for native language files and does not cause blank holiday names.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-06-26T15:34:35.476Z
Learnt from: KJhellico
PR: vacanza/holidays#2676
File: holidays/locale/en_US/LC_MESSAGES/TN.po:17-28
Timestamp: 2025-06-26T15:34:35.476Z
Learning: In the holidays project, .po file header metadata updates (version numbers, revision dates, translator information) are legitimate changes when part of localization work and don't require `make l10n` regeneration. The `make l10n` command is primarily for formatting fixes and missing translator comments, not for intentional metadata updates.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-03-30T13:33:31.598Z
Learnt from: PPsyrius
PR: vacanza/holidays#2388
File: holidays/locale/fr/LC_MESSAGES/CI.po:28-101
Timestamp: 2025-03-30T13:33:31.598Z
Learning: In the holidays library, for localization files of the default language (like French for Ivory Coast in fr/LC_MESSAGES/CI.po), the best practice is to leave the message strings (msgstr) empty to avoid possible typos, since the message IDs (msgid) are already in the target language.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/locale/my/LC_MESSAGES/MM.po
📚 Learning: 2025-08-26T21:24:41.827Z
Learnt from: KJhellico
PR: vacanza/holidays#2860
File: holidays/countries/burkina_faso.py:27-30
Timestamp: 2025-08-26T21:24:41.827Z
Learning: Countries in the holidays library that don't have localization support yet should use plain English strings for labels (e.g., `estimated_label = "%s (estimated)"`), while only countries with existing .po translation files should use `tr()` wrapping. Check for the presence of .po files in holidays/locale to determine if a country has localization support.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
📚 Learning: 2025-08-21T04:56:03.780Z
Learnt from: PPsyrius
PR: vacanza/holidays#2843
File: holidays/countries/burundi.py:63-101
Timestamp: 2025-08-21T04:56:03.780Z
Learning: In the holidays library, countries with localization support consistently use tr() wrappers around holiday names when calling _add_* methods (e.g., self._add_new_years_day(tr("Holiday Name"))). This is the established pattern across United States, Thailand, and other l10n-enabled countries, contrary to any suggestion that translation is handled internally by _add_* methods.
Applied to files:
holidays/locale/en_US/LC_MESSAGES/MM.po
holidays/countries/myanmar.py
📚 Learning: 2025-04-03T16:58:27.175Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants 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/calendars/burmese.py
holidays/countries/myanmar.py
📚 Learning: 2025-06-10T12:43:10.577Z
Learnt from: ankushhKapoor
PR: vacanza/holidays#2601
File: holidays/calendars/mongolian.py:1-1
Timestamp: 2025-06-10T12:43:10.577Z
Learning: The holidays project's calendar files (in holidays/calendars/) follow a consistent pattern of NOT having module-level docstrings. They only use class-level docstrings for their main classes. When reviewing calendar files, maintain this consistency and do not suggest adding module docstrings.
Applied to files:
holidays/calendars/burmese.py
📚 Learning: 2025-09-17T15:15:24.229Z
Learnt from: KJhellico
PR: vacanza/holidays#2944
File: holidays/countries/myanmar.py:112-121
Timestamp: 2025-09-17T15:15:24.229Z
Learning: The Myanmar government's "continuous public days for 2024-2025" policy specifically covers Tabaung and Tazaungmon full moon days by bridging gaps with weekends, but does not apply to Myanmar New Year (Thingyan) extra days, which follow a separate policy that correctly uses `self._year >= 2024`.
Applied to files:
holidays/calendars/burmese.py
snapshots/countries/MM_COMMON.json
tests/countries/test_myanmar.py
holidays/countries/myanmar.py
📚 Learning: 2025-06-14T11:05:21.250Z
Learnt from: PPsyrius
PR: vacanza/holidays#2609
File: holidays/countries/nauru.py:48-50
Timestamp: 2025-06-14T11:05:21.250Z
Learning: In the holidays library, newer implementations use `start_year` to indicate the earliest year with complete holiday data coverage, not necessarily the first year a holiday existed. If a holiday system starts partway through a year (like Nauru's Public Holidays Act starting Jan 31, 1968), the start_year should be set to the following year (1969) to ensure users get full annual holiday coverage.
Applied to files:
holidays/calendars/burmese.py
📚 Learning: 2025-04-03T12:36:41.201Z
Learnt from: PPsyrius
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:73-77
Timestamp: 2025-04-03T12:36:41.201Z
Learning: In the Holidays library, comments explaining year restrictions for holidays should be placed above the year check conditional statement, not inside it. Example format:
```python
# reason why goes here
if start_year <= self._year <= end_year:
# Holiday name
self._add_holiday_function(tr("Holiday Name"))
```
Applied to files:
holidays/calendars/burmese.py
holidays/countries/myanmar.py
📚 Learning: 2025-09-14T16:05:55.181Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_iran.py:28-28
Timestamp: 2025-09-14T16:05:55.181Z
Learning: In tests/countries/test_iran.py, using years=(self.start_year - 1, 2102) in the no-holiday test is intentional because Iran uses the Persian Calendar which has specific supported year range constraints, and 2102 represents the upper limit of the Persian Calendar's supported range, not just an arbitrary far-future date.
Applied to files:
holidays/calendars/burmese.py
tests/countries/test_myanmar.py
holidays/countries/myanmar.py
📚 Learning: 2025-09-17T09:07:56.435Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_paraguay.py:134-139
Timestamp: 2025-09-17T09:07:56.435Z
Learning: In the vacanza/holidays project, for holidays that start from a specific year (not the country's start_year), the standard pattern is to use `range(specific_year, self.end_year)` rather than `self.full_range` with year conditions. This maintains consistency across the codebase and clearly separates the holiday period from the pre-holiday period using `assertNoHolidayName(name, range(self.start_year, specific_year))`.
Applied to files:
holidays/calendars/burmese.py
tests/countries/test_myanmar.py
📚 Learning: 2025-04-05T04:47:27.213Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:47:27.213Z
Learning: For holiday tests in the vacanza/holidays project, structure tests by individual holidays rather than by years. Each test method should focus on a specific holiday and test it across multiple years (from start_year through 2050) using helper methods like `assertHolidayName`. For fixed holidays, use generators like `(f"{year}-01-01" for year in range(1991, 2051))`. For movable holidays, specify individual dates for specific years followed by a range check.
Applied to files:
holidays/calendars/burmese.py
tests/countries/test_myanmar.py
📚 Learning: 2025-06-04T10:09:28.732Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2593
File: holidays/calendars/islamic.py:3993-3994
Timestamp: 2025-06-04T10:09:28.732Z
Learning: In the holidays/calendars/islamic.py file, the Islamic calendar date methods in the _IslamicLunar class (like ali_al_rida_death_dates, ashura_dates, etc.) follow a consistent pattern of being single-line methods that return self._get_holiday(CONSTANT, year) without docstrings. New methods should follow this same pattern for consistency.
Applied to files:
holidays/calendars/burmese.py
📚 Learning: 2025-06-16T12:28:31.641Z
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:
holidays/calendars/burmese.py
📚 Learning: 2025-06-15T11:52:39.572Z
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:
holidays/calendars/burmese.py
holidays/countries/myanmar.py
📚 Learning: 2025-09-04T08:54:35.319Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_albania.py:40-42
Timestamp: 2025-09-04T08:54:35.319Z
Learning: In the vacanza/holidays project test files, extract holiday name strings to local variables only when they are reused multiple times within the same test method (e.g., used in both assertHolidayName and assertNoHolidayName calls). When a holiday name is used only once, keep it inline rather than extracting it to a variable for the sake of consistency.
Applied to files:
holidays/calendars/burmese.py
📚 Learning: 2025-04-05T06:49:06.217Z
Learnt from: PPsyrius
PR: vacanza/holidays#2386
File: tests/countries/test_nepal.py:499-536
Timestamp: 2025-04-05T06:49:06.217Z
Learning: In the holidays project, test files follow a dual testing approach: individual methods test specific holidays across multiple years, while comprehensive year-specific tests (e.g., `test_2025`) verify all holidays for a specific year in a single assertion. Both approaches serve different testing purposes and complement each other.
Applied to files:
holidays/calendars/burmese.py
tests/countries/test_myanmar.py
holidays/countries/myanmar.py
📚 Learning: 2025-05-06T21:07:11.577Z
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: tests/countries/test_andorra.py:23-28
Timestamp: 2025-05-06T21:07:11.577Z
Learning: In the holidays project, test methods for country holidays follow a standard form where year ranges are explicitly recreated in each test method rather than being stored as class variables, to maintain consistency across all country tests.
Applied to files:
holidays/calendars/burmese.py
tests/countries/test_myanmar.py
📚 Learning: 2025-06-14T21:12:07.224Z
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.
Applied to files:
holidays/calendars/burmese.py
📚 Learning: 2025-06-06T14:40:31.932Z
Learnt from: KJhellico
PR: vacanza/holidays#2593
File: holidays/countries/senegal.py:66-110
Timestamp: 2025-06-06T14:40:31.932Z
Learning: In the holidays library, within the _populate_public_holidays method, holidays should be arranged by calendar type (Islamic holidays first, then Gregorian holidays) without additional type grouping comments. The organization by calendar type is sufficient and follows the project's established conventions.
Applied to files:
holidays/calendars/burmese.py
holidays/countries/myanmar.py
📚 Learning: 2025-08-03T13:48:11.910Z
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:
holidays/calendars/burmese.py
holidays/countries/myanmar.py
📚 Learning: 2025-09-14T07:26:25.403Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: holidays/countries/south_africa.py:69-75
Timestamp: 2025-09-14T07:26:25.403Z
Learning: When reviewing historical holiday implementations in the vacanza/holidays repository, trust the maintainers' research and implementation decisions for specific historical edge cases, especially when they can provide sources like Wikipedia or other historical documentation that supports unusual or complex date calculation rules during specific time periods.
Applied to files:
holidays/calendars/burmese.py
holidays/countries/myanmar.py
📚 Learning: 2025-06-16T15:48:48.680Z
Learnt from: PPsyrius
PR: vacanza/holidays#2615
File: tests/countries/test_anguilla.py:1-12
Timestamp: 2025-06-16T15:48:48.680Z
Learning: Test files in the holidays repository follow a standardized structure without module or class docstrings. All country test files use the same pattern: license header, imports, and class definition (`class Test{Country}(CommonCountryTests, TestCase):`) without docstrings. This is an established codebase convention that should be maintained for consistency.
Applied to files:
holidays/calendars/burmese.py
tests/countries/test_myanmar.py
📚 Learning: 2025-03-19T16:54:58.657Z
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.
Applied to files:
holidays/calendars/burmese.py
holidays/countries/myanmar.py
📚 Learning: 2025-04-03T05:59:57.480Z
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.
Applied to files:
snapshots/countries/MM_COMMON.json
📚 Learning: 2025-06-24T17:26:17.728Z
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/MM_COMMON.json
📚 Learning: 2025-08-08T14:37:03.045Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-04-05T04:33:53.254Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:33:53.254Z
Learning: For Turkmenistan holiday tests, recommend using CommonCountryTests as the base class rather than unittest.TestCase to follow project conventions, be consistent with other country test files, and gain access to common test utilities.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-04-05T04:50:40.752Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:31-49
Timestamp: 2025-04-05T04:50:40.752Z
Learning: For Turkmenistan holiday tests, use this class structure: `class TestTurkmenistan(CommonCountryTests, TestCase)` with imports `from unittest import TestCase`, `from holidays.countries import Turkmenistan, TM, TKM`, and `from tests.common import CommonCountryTests`. Ensure to call `super().setUp()` in the setUp method.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-04-05T04:29:38.042Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:85-86
Timestamp: 2025-04-05T04:29:38.042Z
Learning: For testing holiday implementations in the vacanza/holidays repository, recommend using `from tests.common import CommonCountryTests` as the base class instead of directly using `unittest.TestCase` to maintain consistency with project conventions and leverage common test utilities.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-08-20T19:46:15.625Z
Learnt from: KJhellico
PR: vacanza/holidays#2833
File: tests/countries/test_uganda.py:15-0
Timestamp: 2025-08-20T19:46:15.625Z
Learning: In the holidays project, the standard import pattern for country test files is `from holidays.countries.<country> import Country, CODE1, CODE2` (direct module import), used by ~75% of country test files. Only a minority (~25%) use the aggregated public API import `from holidays.countries import Country, CODE1, CODE2`. The direct module import pattern should be used for new country test files to follow the established convention.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-17T09:07:56.435Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_paraguay.py:134-139
Timestamp: 2025-09-17T09:07:56.435Z
Learning: In the vacanza/holidays project, when testing holidays that start from a specific year (not the country's start_year), the standard pattern is to use `range(specific_year, self.end_year)` for the holiday dates and `assertNoHolidayName(name, range(self.start_year, specific_year))` for the gap period. Using `self.full_range` with year conditions like `if year >= specific_year` is not the established pattern and would be inconsistent with the codebase.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-03T14:05:10.592Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_aruba.py:77-79
Timestamp: 2025-09-03T14:05:10.592Z
Learning: The assertNoHolidayName helper method in the vacanza/holidays test framework accepts both individual years (scalars) and iterables of years, making calls like assertNoHolidayName(name, AW.start_year, range(2023, 2050)) valid where AW.start_year is a single integer year.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-06-14T10:58:43.636Z
Learnt from: PPsyrius
PR: vacanza/holidays#2629
File: tests/countries/test_namibia.py:22-23
Timestamp: 2025-06-14T10:58:43.636Z
Learning: In the vacanza/holidays project, country test files consistently use range(start_year, 2050) which intentionally excludes 2050 and stops at 2049. This is a library-wide implementation pattern, not an off-by-one error.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-14T16:03:13.496Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_barbados.py:21-23
Timestamp: 2025-09-14T16:03:13.496Z
Learning: In tests/countries/test_barbados.py, using years_non_observed=range(2000, 2024) is intentional because all observed holiday examples fall within 2001-2023, making this range appropriate for limiting testing to years where observed holidays actually exist in the test data.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-10T16:17:30.428Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_bosnia_and_herzegovina.py:21-24
Timestamp: 2025-09-10T16:17:30.428Z
Learning: Bosnia and Herzegovina holidays implementation currently lacks a start_year attribute. In tests/countries/test_bosnia_and_herzegovina.py, using cls.full_range = range(2000, 2050) is intentional to bound assertions and setup. Do not suggest replacing it with harness default full_range until start_year is introduced.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-10T13:46:06.329Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_canada.py:745-747
Timestamp: 2025-09-10T13:46:06.329Z
Learning: In the vacanza/holidays test framework, assertion methods like assertNoSubdivNuOptionalHolidayName correctly accept multiple range objects as separate arguments, such as assertNoSubdivNuOptionalHolidayName(name, range(CA.start_year, 2000), range(2020, 2050)). This is the intended usage pattern and should not be "fixed" by splitting into separate calls.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-07-24T15:21:31.632Z
Learnt from: PPsyrius
PR: vacanza/holidays#2750
File: tests/countries/test_germany.py:46-46
Timestamp: 2025-07-24T15:21:31.632Z
Learning: In the holidays project test files, the standard method name for testing the absence of holidays is `test_no_holidays`, not more descriptive names like `test_no_holidays_before_1990`. This is a consistent naming convention across country test files like France and Germany.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-03T16:49:35.246Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-14T16:14:44.954Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_bulgaria.py:21-23
Timestamp: 2025-09-14T16:14:44.954Z
Learning: For Bulgaria in the holidays library, using years_non_observed=range(2017, 2030) in tests/countries/test_bulgaria.py is intentional because all observed holiday examples in the test data fall within this range (latest being 2029), making this range appropriate for limiting testing to years where observed holidays actually exist, improving both correctness and performance.
Applied to files:
tests/countries/test_myanmar.py
holidays/countries/myanmar.py
📚 Learning: 2025-09-14T16:14:44.954Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_bulgaria.py:21-23
Timestamp: 2025-09-14T16:14:44.954Z
Learning: For Bulgaria in the holidays library, using years_non_observed=range(2017, 2030) in tests/countries/test_bulgaria.py is intentional because all observed holiday examples in the test data fall within this range (latest being 2029), making this range appropriate for limiting testing to years where observed holidays actually exist.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-08-25T04:28:02.061Z
Learnt from: PPsyrius
PR: vacanza/holidays#2848
File: tests/countries/test_somalia.py:44-127
Timestamp: 2025-08-25T04:28:02.061Z
Learning: In the holidays library, Islamic holiday tests use `self.no_estimated_holidays = Country(years=years, islamic_show_estimated=False)` as the library-wide standard approach to simplify test cases. This pattern is intentional and preferred over testing estimated labels.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-07-09T21:16:35.145Z
Learnt from: KJhellico
PR: vacanza/holidays#2623
File: tests/countries/test_christmas_island.py:136-146
Timestamp: 2025-07-09T21:16:35.145Z
Learning: In Christmas Island's holiday implementation, the test_christmas_day method cannot use assertNoNonObservedHoliday because in some years observed Christmas Day overlaps with Boxing Day when both holidays are moved due to weekend conflicts, causing the standard non-observed holiday check to fail inappropriately.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-08-12T17:16:54.497Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: tests/calendars/test_julian.py:35-36
Timestamp: 2025-08-12T17:16:54.497Z
Learning: In the vacanza/holidays project calendar tests (Thai, Ethiopian, Julian, etc.), the established testing pattern for validation methods is to use simple for loops like `for year in known_data_dict:` followed by `self.assertEqual(expected, actual)` without using unittest's subTest feature. This pattern is consistently maintained across all calendar test files.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-06-13T12:18:03.539Z
Learnt from: PPsyrius
PR: vacanza/holidays#2614
File: holidays/countries/guyana.py:78-90
Timestamp: 2025-06-13T12:18:03.539Z
Learning: The holidays codebase now uses the constructor signature pattern `__init__(self, *args, islamic_show_estimated: bool = True, **kwargs)` across country classes.
Applied to files:
holidays/countries/myanmar.py
📚 Learning: 2025-06-19T02:34:18.382Z
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/myanmar.py
📚 Learning: 2025-04-03T16:58:27.175Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants like FEB, TUE, MAR, and SUN internally through parent class implementations even when these constants don't appear directly in the file.
Applied to files:
holidays/countries/myanmar.py
📚 Learning: 2025-08-11T13:48:45.953Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/calendars/ethiopian.py:13-13
Timestamp: 2025-08-11T13:48:45.953Z
Learning: The holidays library does not use `__all__` declarations in calendar modules (holidays/calendars/). Calendar files follow a standard pattern of defining constants and functions directly without explicit exports, similar to the convention used in country modules.
Applied to files:
holidays/countries/myanmar.py
📚 Learning: 2025-06-19T02:34:14.456Z
Learnt from: PPsyrius
PR: vacanza/holidays#2643
File: holidays/countries/mauritius.py:171-184
Timestamp: 2025-06-19T02:34:14.456Z
Learning: In the holidays library, `_CustomIslamicHolidays` subclasses follow a consistent pattern of NOT having docstrings. They go directly to defining date dictionaries, as evidenced by Malaysia, Singapore, UAE, and dozens of other country implementations.
Applied to files:
holidays/countries/myanmar.py
📚 Learning: 2025-08-28T02:34:11.657Z
Learnt from: PPsyrius
PR: vacanza/holidays#2860
File: holidays/groups/eastern.py:36-36
Timestamp: 2025-08-28T02:34:11.657Z
Learning: The default estimated_label change from "%s (estimated)" to "%s" in holidays/groups/eastern.py is intentional to remove English-only fallback text from localized holiday names. Countries that need estimated labels should define them properly with localization support rather than relying on the English fallback.
Applied to files:
holidays/countries/myanmar.py
📚 Learning: 2025-08-24T06:53:35.897Z
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2852
File: holidays/countries/tajikistan.py:55-56
Timestamp: 2025-08-24T06:53:35.897Z
Learning: In Tajikistan, March 8th is celebrated as Mother's Day (Рӯзи Модар) rather than International Women's Day, so the country-specific implementation should use _add_holiday_mar_8() rather than the shared _add_womens_day() helper from InternationalHolidays.
Applied to files:
holidays/countries/myanmar.py
📚 Learning: 2025-08-11T10:14:28.517Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: holidays/groups/christian.py:328-343
Timestamp: 2025-08-11T10:14:28.517Z
Learning: For Ethiopian holidays in the `holidays/groups/christian.py` file, docstring wording should maintain source-accurate phrasing (e.g., "in coincidence of" for Ethiopian New Year/Enkutatash), even when it might read awkwardly in English, to ensure consistency with official Ethiopian documentation.
Applied to files:
holidays/countries/myanmar.py
📚 Learning: 2025-03-29T15:15:05.919Z
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:
holidays/countries/myanmar.py
📚 Learning: 2025-09-17T15:16:16.167Z
Learnt from: KJhellico
PR: vacanza/holidays#2944
File: holidays/countries/myanmar.py:183-191
Timestamp: 2025-09-17T15:16:16.167Z
Learning: The special_public_holidays formatting pattern in the holidays codebase follows a consistent convention: single entries per year use flat tuple format like `2024: (MONTH, DAY, name)`, while multiple entries per year use tuple-of-tuples format like `2024: ((MONTH, DAY, name), (MONTH, DAY, name))`. This pattern is used consistently across all countries.
Applied to files:
holidays/countries/myanmar.py
📚 Learning: 2025-09-17T14:47:15.069Z
Learnt from: KJhellico
PR: vacanza/holidays#2944
File: holidays/groups/burmese.py:151-154
Timestamp: 2025-09-17T14:47:15.069Z
Learning: In the holidays library Myanmar implementation, "Akyo" refers to the Thingyan eve (the day before akya day) according to the main calendar source (cool-emerald.blogspot.com). The spelling "Akyo" should be preserved in comments even when variable names use "akya", as it matches the authoritative calendar terminology.
Applied to files:
holidays/countries/myanmar.py
📚 Learning: 2025-08-25T09:57:22.291Z
Learnt from: PPsyrius
PR: vacanza/holidays#2833
File: holidays/countries/uganda.py:50-56
Timestamp: 2025-08-25T09:57:22.291Z
Learning: In the holidays package, when adding comments for year-restricted holidays in Uganda and similar country modules, include specific legal or historical context such as the actual laws, parliamentary acts, or government decisions that established the holidays, rather than just generic "since YEAR" information. For example, reference the specific Parliament act, decree, or historical event that created the holiday.
Applied to files:
holidays/countries/myanmar.py
📚 Learning: 2025-04-23T09:59:19.886Z
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/myanmar.py
📚 Learning: 2025-03-19T16:53:00.375Z
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/countries/myanmar.py
📚 Learning: 2025-06-18T10:21:01.376Z
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/france.py:300-319
Timestamp: 2025-06-18T10:21:01.376Z
Learning: In the France holidays implementation, legislative years for holiday changes should be hard-coded rather than extracted into constants, as this maintains consistency with the existing codebase pattern and provides historical accuracy for specific legislative acts.
Applied to files:
holidays/countries/myanmar.py
🧬 Code graph analysis (3)
holidays/calendars/burmese.py (1)
holidays/calendars/gregorian.py (1)
_timedelta
(37-42)
tests/countries/test_myanmar.py (2)
tests/common.py (8)
TestCase
(31-370)assertAliases
(124-133)assertNoHolidays
(324-326)assertHolidayName
(198-202)assertNoHolidayName
(305-307)assertHolidayNameCount
(258-260)assertHolidays
(231-233)assertLocalizedHolidays
(359-370)holidays/countries/myanmar.py (3)
Myanmar
(28-148)MM
(151-152)MMR
(155-156)
holidays/countries/myanmar.py (6)
holidays/calendars/islamic.py (1)
_CustomIslamicHolidays
(4085-4086)holidays/groups/burmese.py (12)
BurmeseCalendarHolidays
(20-271)_add_myanmar_new_year
(119-162)_add_tabaung_full_moon_day
(164-180)_add_kason_full_moon_day
(81-97)_add_waso_full_moon_day
(254-271)_add_thadingyut_full_moon_eve
(200-216)_add_thadingyut_full_moon_day
(218-234)_add_thadingyut_full_moon_day_two
(236-252)_add_diwali_myanmar
(37-54)_add_tazaungmon_full_moon_day
(182-198)_add_myanmar_national_day
(99-117)_add_karen_new_year
(56-79)holidays/groups/chinese.py (2)
ChineseCalendarHolidays
(21-265)_add_chinese_new_years_day
(134-144)holidays/groups/international.py (3)
InternationalHolidays
(20-236)_add_new_years_day
(142-150)_add_labor_day
(115-124)holidays/groups/islamic.py (2)
IslamicHolidays
(20-453)_add_eid_al_adha_day
(109-120)holidays/groups/custom.py (1)
StaticHolidays
(18-49)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Test build on windows-latest
🔇 Additional comments (19)
holidays/locale/en_US/LC_MESSAGES/MM.po (3)
15-28
: Header metadata OK for en_US.X-Source-Language=my is correct given msgids are Burmese (default_language="my"). No action.
29-33
: Estimated label and date-format translation look right.“%s (ခန့်မှန်း)” → “%s (estimated)” and "%d-%m-%Y" → "%m/%d/%Y" align with tests. LGTM.
Also applies to: 114-121
34-113
: Holiday name translations read clean and consistent.Mappings (Thingyan, full moons, Thadingyut, CNY, Eid, Karen NY) are idiomatic. No changes needed.
holidays/locale/my/LC_MESSAGES/MM.po (2)
13-28
: Header looks correct for default locale.Default language file (“my”) keeps msgstr empty; X-Source-Language=my is consistent. Good.
29-121
: Leave msgstr empty (intended).All entries (including date format and estimated label) correctly use empty msgstr to echo msgid. Matches project convention.
holidays/calendars/burmese.py (2)
125-137
: Unbounded cache applied — good call.@cache on _get_start_date avoids churn over 1939–2100. No further changes.
100-124
: jdn_to_gregorian: sanity check passed; keep as-is.Algorithmic variant is consistent with standard JDN→Gregorian transforms; no off-by-one found.
If you want an extra guard, add a tiny self-test in calendar tests for a known JDN (e.g., 2451545 -> 2000-01-01).
tests/countries/test_myanmar.py (6)
19-25
: Test harness setup matches project conventions.Direct module import + CommonCountryTests + range(1948,2050) are consistent. Nice.
32-36
: New Year’s Day gating verified.Asserts presence only from 2025; aligns with implementation.
85-136
: Thingyan counts cover all policy eras.Counts (4/5/10/8/9) align with year rules; explicit date checks for 2021–2025 are helpful.
Consider adding a brief comment noting 2024+ “extra days after” vs 2022–2023 “extra days before (4)” to aid future readers.
176-200
: Thadingyut 3-day invariant enforced.Good use of count assertion across full range.
254-286
: 2024 full-year snapshot assertion is precise.Matches added holidays and the substituted-day Burmese date format.
288-361
: Localization assertions are thorough (default and en_US).Covers estimated label suppression, substituted-date formatting, and multi-day spans.
snapshots/countries/MM_COMMON.json (1)
1-2471
: Approve snapshot — MM_COMMON.json validatedSanity checks passed: JSON valid, spot-checked entries (2025-01-01 New Year's Day; 2025-01-29 Chinese New Year; 2024-12-31 substitution; Myanmar New Year dates) match expectations and there are no duplicate keys. Do not hand-edit snapshots — regenerate via make snapshot if changes are needed.
holidays/countries/myanmar.py (5)
57-73
: Constructor signature and parent inits look correct.Matches project pattern and wires Islamic custom calendar + StaticHolidays as expected.
132-137
: Thadingyut labeling choice is good.Single festival label across eve/day/day+1 reads clean and consistent.
159-167
: Confirm Eid al-Adha fixed dates alignment.Looks fine; please double-check these match official Myanmar announcements for 2020–2025.
Would you like me to add a small test asserting 2025-06-07 is present and localized?
183-191
: Special-holidays mapping shape is consistent.Flat tuple for single (2024) and tuple-of-tuples for multiples (2025) matches project convention.
177-182
: Resolved — substituted-label formatting validatedTests include explicit assertions for Burmese cross‑year substitution formatting (tests/test_myanmar.py — e.g. ("2024-12-31", "အလုပ်ပိတ်ရက် (11-01-2025 မှ ပြန်လဲထားသည်)"); matches at lines ~285, 295, 297, 317, 322).
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.
Actionable comments posted: 4
♻️ Duplicate comments (1)
tests/countries/test_myanmar.py (1)
158-165
: Reversed‑range fix acknowledged.The earlier inverted range is corrected; current ranges ascend properly.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
tests/countries/test_myanmar.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (26)
📓 Common learnings
Learnt from: KJhellico
PR: vacanza/holidays#2944
File: holidays/countries/myanmar.py:112-121
Timestamp: 2025-09-17T15:15:24.269Z
Learning: The Myanmar government's "continuous public days for 2024-2025" policy specifically covers Tabaung and Tazaungmon full moon days by bridging gaps with weekends, but does not apply to Myanmar New Year (Thingyan) extra days, which follow a separate policy that correctly uses `self._year >= 2024`.
📚 Learning: 2025-05-06T21:07:11.577Z
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: tests/countries/test_andorra.py:23-28
Timestamp: 2025-05-06T21:07:11.577Z
Learning: In the holidays project, test methods for country holidays follow a standard form where year ranges are explicitly recreated in each test method rather than being stored as class variables, to maintain consistency across all country tests.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-08-08T14:37:03.045Z
Learnt from: KJhellico
PR: vacanza/holidays#2774
File: tests/countries/test_liberia.py:15-16
Timestamp: 2025-08-08T14:37:03.045Z
Learning: When adding a new country in vacanza/holidays, also re-export it in holidays/countries/__init__.py (e.g., from .liberia import Liberia, LR, LBR) so tests and users can import from holidays.countries consistently.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-04-05T06:49:06.217Z
Learnt from: PPsyrius
PR: vacanza/holidays#2386
File: tests/countries/test_nepal.py:499-536
Timestamp: 2025-04-05T06:49:06.217Z
Learning: In the holidays project, test files follow a dual testing approach: individual methods test specific holidays across multiple years, while comprehensive year-specific tests (e.g., `test_2025`) verify all holidays for a specific year in a single assertion. Both approaches serve different testing purposes and complement each other.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-06-16T15:48:48.680Z
Learnt from: PPsyrius
PR: vacanza/holidays#2615
File: tests/countries/test_anguilla.py:1-12
Timestamp: 2025-06-16T15:48:48.680Z
Learning: Test files in the holidays repository follow a standardized structure without module or class docstrings. All country test files use the same pattern: license header, imports, and class definition (`class Test{Country}(CommonCountryTests, TestCase):`) without docstrings. This is an established codebase convention that should be maintained for consistency.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-04-05T04:47:27.213Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:47:27.213Z
Learning: For holiday tests in the vacanza/holidays project, structure tests by individual holidays rather than by years. Each test method should focus on a specific holiday and test it across multiple years (from start_year through 2050) using helper methods like `assertHolidayName`. For fixed holidays, use generators like `(f"{year}-01-01" for year in range(1991, 2051))`. For movable holidays, specify individual dates for specific years followed by a range check.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-04-05T04:33:53.254Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:33:53.254Z
Learning: For Turkmenistan holiday tests, recommend using CommonCountryTests as the base class rather than unittest.TestCase to follow project conventions, be consistent with other country test files, and gain access to common test utilities.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-04-05T04:50:40.752Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:31-49
Timestamp: 2025-04-05T04:50:40.752Z
Learning: For Turkmenistan holiday tests, use this class structure: `class TestTurkmenistan(CommonCountryTests, TestCase)` with imports `from unittest import TestCase`, `from holidays.countries import Turkmenistan, TM, TKM`, and `from tests.common import CommonCountryTests`. Ensure to call `super().setUp()` in the setUp method.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-04-05T04:29:38.042Z
Learnt from: PPsyrius
PR: vacanza/holidays#2416
File: tests/countries/test_turkmenistan.py:85-86
Timestamp: 2025-04-05T04:29:38.042Z
Learning: For testing holiday implementations in the vacanza/holidays repository, recommend using `from tests.common import CommonCountryTests` as the base class instead of directly using `unittest.TestCase` to maintain consistency with project conventions and leverage common test utilities.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-08-20T19:46:15.625Z
Learnt from: KJhellico
PR: vacanza/holidays#2833
File: tests/countries/test_uganda.py:15-0
Timestamp: 2025-08-20T19:46:15.625Z
Learning: In the holidays project, the standard import pattern for country test files is `from holidays.countries.<country> import Country, CODE1, CODE2` (direct module import), used by ~75% of country test files. Only a minority (~25%) use the aggregated public API import `from holidays.countries import Country, CODE1, CODE2`. The direct module import pattern should be used for new country test files to follow the established convention.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-10T14:35:54.603Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_brazil.py:28-30
Timestamp: 2025-09-10T14:35:54.603Z
Learning: In the holidays project, the test_no_holidays method should test ALL supported_categories (via categories=CountryClass.supported_categories) rather than just the default PUBLIC category, to ensure comprehensive validation that no holidays exist before start_year across any supported category including OPTIONAL and subdivision categories.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-17T09:07:56.459Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_paraguay.py:134-139
Timestamp: 2025-09-17T09:07:56.459Z
Learning: In the vacanza/holidays project, when testing holidays that start from a specific year (not the country's start_year), the standard pattern is to use `range(specific_year, self.end_year)` for the holiday dates and `assertNoHolidayName(name, range(self.start_year, specific_year))` for the gap period. Using `self.full_range` with year conditions like `if year >= specific_year` is not the established pattern and would be inconsistent with the codebase.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-03T14:05:10.592Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_aruba.py:77-79
Timestamp: 2025-09-03T14:05:10.592Z
Learning: The assertNoHolidayName helper method in the vacanza/holidays test framework accepts both individual years (scalars) and iterables of years, making calls like assertNoHolidayName(name, AW.start_year, range(2023, 2050)) valid where AW.start_year is a single integer year.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-06-14T10:58:43.636Z
Learnt from: PPsyrius
PR: vacanza/holidays#2629
File: tests/countries/test_namibia.py:22-23
Timestamp: 2025-06-14T10:58:43.636Z
Learning: In the vacanza/holidays project, country test files consistently use range(start_year, 2050) which intentionally excludes 2050 and stops at 2049. This is a library-wide implementation pattern, not an off-by-one error.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-14T16:03:13.558Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_barbados.py:21-23
Timestamp: 2025-09-14T16:03:13.558Z
Learning: In tests/countries/test_barbados.py, using years_non_observed=range(2000, 2024) is intentional because all observed holiday examples fall within 2001-2023, making this range appropriate for limiting testing to years where observed holidays actually exist in the test data.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-17T09:07:56.459Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_paraguay.py:134-139
Timestamp: 2025-09-17T09:07:56.459Z
Learning: In the vacanza/holidays project, for holidays that start from a specific year (not the country's start_year), the standard pattern is to use `range(specific_year, self.end_year)` rather than `self.full_range` with year conditions. This maintains consistency across the codebase and clearly separates the holiday period from the pre-holiday period using `assertNoHolidayName(name, range(self.start_year, specific_year))`.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-10T13:46:06.329Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_canada.py:745-747
Timestamp: 2025-09-10T13:46:06.329Z
Learning: In the vacanza/holidays test framework, assertion methods like assertNoSubdivNuOptionalHolidayName correctly accept multiple range objects as separate arguments, such as assertNoSubdivNuOptionalHolidayName(name, range(CA.start_year, 2000), range(2020, 2050)). This is the intended usage pattern and should not be "fixed" by splitting into separate calls.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-10T16:17:30.428Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_bosnia_and_herzegovina.py:21-24
Timestamp: 2025-09-10T16:17:30.428Z
Learning: Bosnia and Herzegovina holidays implementation currently lacks a start_year attribute. In tests/countries/test_bosnia_and_herzegovina.py, using cls.full_range = range(2000, 2050) is intentional to bound assertions and setup. Do not suggest replacing it with harness default full_range until start_year is introduced.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-14T16:05:55.205Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_iran.py:28-28
Timestamp: 2025-09-14T16:05:55.205Z
Learning: In tests/countries/test_iran.py, using years=(self.start_year - 1, 2102) in the no-holiday test is intentional because Iran uses the Persian Calendar which has specific supported year range constraints, and 2102 represents the upper limit of the Persian Calendar's supported range, not just an arbitrary far-future date.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-07-24T15:21:31.632Z
Learnt from: PPsyrius
PR: vacanza/holidays#2750
File: tests/countries/test_germany.py:46-46
Timestamp: 2025-07-24T15:21:31.632Z
Learning: In the holidays project test files, the standard method name for testing the absence of holidays is `test_no_holidays`, not more descriptive names like `test_no_holidays_before_1990`. This is a consistent naming convention across country test files like France and Germany.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-03T16:49:35.246Z
Learnt from: PPsyrius
PR: vacanza/holidays#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:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-14T16:14:44.966Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_bulgaria.py:21-23
Timestamp: 2025-09-14T16:14:44.966Z
Learning: For Bulgaria in the holidays library, using years_non_observed=range(2017, 2030) in tests/countries/test_bulgaria.py is intentional because all observed holiday examples in the test data fall within this range (latest being 2029), making this range appropriate for limiting testing to years where observed holidays actually exist, improving both correctness and performance.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-14T16:14:44.966Z
Learnt from: PPsyrius
PR: vacanza/holidays#2881
File: tests/countries/test_bulgaria.py:21-23
Timestamp: 2025-09-14T16:14:44.966Z
Learning: For Bulgaria in the holidays library, using years_non_observed=range(2017, 2030) in tests/countries/test_bulgaria.py is intentional because all observed holiday examples in the test data fall within this range (latest being 2029), making this range appropriate for limiting testing to years where observed holidays actually exist.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-08-12T17:16:54.497Z
Learnt from: PPsyrius
PR: vacanza/holidays#2794
File: tests/calendars/test_julian.py:35-36
Timestamp: 2025-08-12T17:16:54.497Z
Learning: In the vacanza/holidays project calendar tests (Thai, Ethiopian, Julian, etc.), the established testing pattern for validation methods is to use simple for loops like `for year in known_data_dict:` followed by `self.assertEqual(expected, actual)` without using unittest's subTest feature. This pattern is consistently maintained across all calendar test files.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-07-09T21:16:35.145Z
Learnt from: KJhellico
PR: vacanza/holidays#2623
File: tests/countries/test_christmas_island.py:136-146
Timestamp: 2025-07-09T21:16:35.145Z
Learning: In Christmas Island's holiday implementation, the test_christmas_day method cannot use assertNoNonObservedHoliday because in some years observed Christmas Day overlaps with Boxing Day when both holidays are moved due to weekend conflicts, causing the standard non-observed holiday check to fail inappropriately.
Applied to files:
tests/countries/test_myanmar.py
📚 Learning: 2025-09-10T21:12:39.614Z
Learnt from: KJhellico
PR: vacanza/holidays#2854
File: tests/countries/test_sudan.py:21-25
Timestamp: 2025-09-10T21:12:39.614Z
Learning: Sudan holidays implementation does not include observed holiday logic (holidays that shift when falling on weekends), so test files for Sudan should not use years_non_observed parameter in the setUpClass method.
Applied to files:
tests/countries/test_myanmar.py
🧬 Code graph analysis (1)
tests/countries/test_myanmar.py (2)
tests/common.py (10)
TestCase
(31-370)WorkingDayTests
(480-499)assertAliases
(124-133)assertNoHolidays
(324-326)assertHoliday
(153-155)assertWorkingDay
(493-495)assertHolidayName
(198-202)assertHolidayNameCount
(258-260)assertHolidays
(231-233)assertLocalizedHolidays
(359-370)holidays/countries/myanmar.py (3)
Myanmar
(28-148)MM
(151-152)MMR
(155-156)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Test Python 3.13 on windows-latest
🔇 Additional comments (9)
tests/countries/test_myanmar.py (9)
13-19
: Solid test skeleton and import style.Direct module import and base class mixin pattern match repo conventions.
61-65
: New Year’s Day window looks correct.Matches implementation gated at year >= 2025.
75-82
: Armed Forces/Revolution Day split is spot on.Accurate name switch in 1955 with complementary negative checks.
92-104
: Good coverage of Islamic “estimated” label toggle.Validates both specific dates and global labeling via islamic_show_estimated=False.
105-113
: Chinese New Year start year assertions are consistent.Presence from 2025 and explicit absence before.
114-156
: Thingyan examples look comprehensive.Explicit 2021–2025 expansion aligns with policy branches.
205-228
: Thadingyut count invariant is clear.Uniform 3‑day block across the full range matches implementation.
317-352
: my locale strings verify the substitution phrasing.Date formatting (dd‑mm‑yyyy) in Burmese looks consistent with other tests.
354-390
: en_US localization set is thorough.Covers all 2025 entries, including “Day off” phrasing.
|
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.
Amazing work @KJhellico 👏
LGTM 👍
Proposed change
Add Myanmar holidays (with Burmese calendar support).
Closes #1228.
Type of change
holidays
functionality in general)Checklist
make check
locally; all checks and tests passed.