-
-
Notifications
You must be signed in to change notification settings - Fork 544
Add Micronesia holidays #2594
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 Micronesia holidays #2594
Conversation
Summary by CodeRabbit
Summary by CodeRabbit
WalkthroughMicronesia holiday support was added, including a new provider class, registry entry, and localization files. The README and countries module were updated to reflect the new country. Comprehensive tests were introduced for national and subdivision holidays, with localization coverage for English variants. Changes
Assessment against linked issues
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)holidays/countries/micronesia.py (3)
🪛 Pylint (3.3.7)holidays/countries/micronesia.py[convention] 24-24: Line too long (103/100) (C0301) [convention] 25-25: Line too long (123/100) (C0301) [convention] 26-26: Line too long (124/100) (C0301) [convention] 27-27: Line too long (132/100) (C0301) [convention] 28-28: Line too long (147/100) (C0301) [convention] 29-29: Line too long (148/100) (C0301) [convention] 30-30: Line too long (130/100) (C0301) [convention] 34-34: Line too long (141/100) (C0301) [convention] 35-35: Line too long (131/100) (C0301) [convention] 36-36: Line too long (144/100) (C0301) [convention] 38-38: Line too long (141/100) (C0301) [convention] 39-39: Line too long (134/100) (C0301) [convention] 40-40: Line too long (160/100) (C0301) [convention] 44-44: Line too long (169/100) (C0301) [convention] 46-46: Line too long (145/100) (C0301) [convention] 47-47: Line too long (118/100) (C0301) [convention] 48-48: Line too long (199/100) (C0301) [convention] 49-49: Line too long (107/100) (C0301) [convention] 1-1: Missing module docstring (C0114) [convention] 200-200: Missing class docstring (C0115) [convention] 204-204: Missing class docstring (C0115) 🔇 Additional comments (5)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Kosrae holidays have been added using the following logic: |
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
🔭 Outside diff range comments (1)
holidays/locale/en_FM/LC_MESSAGES/FM.po (1)
31-125
:⚠️ Potential issuePopulate en_FM
msgstr
fields.
Allmsgstr
entries are empty, resulting in missing translations for the default localeen_FM
. Please set eachmsgstr
equal to itsmsgid
or provide specificen_FM
variants to ensure holiday names display correctly.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (7)
README.md
(2 hunks)holidays/countries/__init__.py
(1 hunks)holidays/countries/micronesia.py
(1 hunks)holidays/locale/en_FM/LC_MESSAGES/FM.po
(1 hunks)holidays/locale/en_US/LC_MESSAGES/FM.po
(1 hunks)holidays/registry.py
(1 hunks)tests/countries/test_micronesia.py
(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
holidays/countries/__init__.py (1)
holidays/countries/micronesia.py (3)
Micronesia
(19-201)FM
(204-205)FSM
(208-209)
holidays/countries/micronesia.py (3)
holidays/groups/christian.py (3)
ChristianHolidays
(22-463)_add_christmas_day
(208-216)_add_good_friday
(308-317)holidays/groups/international.py (5)
InternationalHolidays
(18-220)_add_new_years_day
(126-134)_add_united_nations_day
(212-220)_add_remembrance_day
(166-174)_add_womens_day
(187-197)holidays/observed_holiday_base.py (1)
ObservedHolidayBase
(101-243)
🪛 Pylint (3.3.7)
holidays/countries/micronesia.py
[convention] 25-25: Line too long (108/100)
(C0301)
[convention] 26-26: Line too long (124/100)
(C0301)
[convention] 27-27: Line too long (132/100)
(C0301)
[convention] 28-28: Line too long (146/100)
(C0301)
[convention] 29-29: Line too long (152/100)
(C0301)
[convention] 30-30: Line too long (130/100)
(C0301)
[convention] 33-33: Line too long (108/100)
(C0301)
[convention] 34-34: Line too long (131/100)
(C0301)
[convention] 35-35: Line too long (144/100)
(C0301)
[convention] 38-38: Line too long (107/100)
(C0301)
[convention] 39-39: Line too long (134/100)
(C0301)
[convention] 40-40: Line too long (160/100)
(C0301)
[convention] 44-44: Line too long (169/100)
(C0301)
[convention] 47-47: Line too long (145/100)
(C0301)
[convention] 48-48: Line too long (118/100)
(C0301)
[convention] 49-49: Line too long (199/100)
(C0301)
[convention] 51-51: Line too long (107/100)
(C0301)
[convention] 54-54: Line too long (159/100)
(C0301)
[convention] 55-55: Line too long (110/100)
(C0301)
[convention] 1-1: Missing module docstring
(C0114)
[convention] 204-204: Missing class docstring
(C0115)
[convention] 208-208: Missing class docstring
(C0115)
tests/countries/test_micronesia.py
[convention] 1-1: Missing module docstring
(C0114)
[convention] 19-19: Missing class docstring
(C0115)
[warning] 21-21: Number of parameters was 4 in 'TestCase.setUpClass' and is now 1 in overriding 'TestMicronesia.setUpClass' method
(W0221)
[convention] 25-25: Missing function or method docstring
(C0116)
[convention] 28-28: Missing function or method docstring
(C0116)
[convention] 31-31: Missing function or method docstring
(C0116)
[convention] 43-43: Missing function or method docstring
(C0116)
[convention] 56-56: Missing function or method docstring
(C0116)
[convention] 71-71: Missing function or method docstring
(C0116)
[convention] 85-85: Missing function or method docstring
(C0116)
[convention] 101-101: Missing function or method docstring
(C0116)
[convention] 115-115: Missing function or method docstring
(C0116)
[convention] 125-125: Missing function or method docstring
(C0116)
[convention] 140-140: Missing function or method docstring
(C0116)
[convention] 171-171: Missing function or method docstring
(C0116)
[convention] 268-268: Missing function or method docstring
(C0116)
[convention] 333-333: Missing function or method docstring
(C0116)
[convention] 364-364: Missing function or method docstring
(C0116)
[convention] 395-395: Missing function or method docstring
(C0116)
[convention] 427-427: Missing function or method docstring
(C0116)
🔇 Additional comments (17)
holidays/registry.py (1)
133-133
: Add Micronesia entry looks correct.
The new country key is properly inserted in alphabetical order with the correct ISO codes.holidays/countries/__init__.py (1)
125-125
: Import Micronesia provider.
TheMicronesia, FM, FSM
import is correctly placed and aligns with the registry entry.README.md (2)
108-108
: Update supported countries count.
The total has been updated to 184 to include Micronesia.
920-925
: Add Micronesia to supported countries table.
The table row correctly lists states and supported locales, matching existing format and default language.holidays/locale/en_US/LC_MESSAGES/FM.po (1)
29-125
: Include en_US translations for Micronesia.
Allmsgstr
entries mirror theirmsgid
values, ensuring proper localization coverage for US English.tests/countries/test_micronesia.py (6)
19-24
: Solid test setup with appropriate year ranges.The test class properly extends CommonCountryTests and sets up years starting from 1987, which aligns with Micronesia's independence. The year range through 2050 provides good long-term coverage.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 19-19: Missing class docstring
(C0115)
[warning] 21-21: Number of parameters was 4 in 'TestCase.setUpClass' and is now 1 in overriding 'TestMicronesia.setUpClass' method
(W0221)
31-41
: Comprehensive New Year's Day testing with observed variants.Good coverage of both the base holiday and observed dates when New Year's falls on weekends. The test data correctly covers years where January 1st falls on Sunday, requiring observation on Monday.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 31-31: Missing function or method docstring
(C0116)
115-123
: Presidents Day implementation looks solid.The test correctly validates that Presidents Day starts in 2021 (year > 2020) and includes proper observed date testing for when November 23rd falls on weekends.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 115-115: Missing function or method docstring
(C0116)
140-169
: Thorough subdivision testing for Chuuk (TRK).The subdivision tests properly validate state-specific holidays with correct year constraints. The Chuuk State Constitution Day starting in 1990 aligns with historical records.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 140-140: Missing function or method docstring
(C0116)
364-393
: Excellent localization coverage.The localization tests validate holiday names in the default locale, ensuring proper translation support. The comprehensive list covers all national and subdivision holidays for 2025.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 364-364: Missing function or method docstring
(C0116)
427-441
: Smart cross-reference validation.Using Wikipedia as an external reference for 2025 holidays provides good validation of the implementation against real-world sources.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 427-427: Missing function or method docstring
(C0116)
holidays/countries/micronesia.py (6)
19-76
: Outstanding documentation with authoritative references.The class docstring is exceptionally comprehensive, providing legal references, archived sources, and clear explanations of observed holiday rules. This level of documentation sets a great example for holiday provider implementations.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 25-25: Line too long (108/100)
(C0301)
[convention] 26-26: Line too long (124/100)
(C0301)
[convention] 27-27: Line too long (132/100)
(C0301)
[convention] 28-28: Line too long (146/100)
(C0301)
[convention] 29-29: Line too long (152/100)
(C0301)
[convention] 30-30: Line too long (130/100)
(C0301)
[convention] 33-33: Line too long (108/100)
(C0301)
[convention] 34-34: Line too long (131/100)
(C0301)
[convention] 35-35: Line too long (144/100)
(C0301)
[convention] 38-38: Line too long (107/100)
(C0301)
[convention] 39-39: Line too long (134/100)
(C0301)
[convention] 40-40: Line too long (160/100)
(C0301)
[convention] 44-44: Line too long (169/100)
(C0301)
[convention] 47-47: Line too long (145/100)
(C0301)
[convention] 48-48: Line too long (118/100)
(C0301)
[convention] 49-49: Line too long (199/100)
(C0301)
[convention] 51-51: Line too long (107/100)
(C0301)
[convention] 54-54: Line too long (159/100)
(C0301)
[convention] 55-55: Line too long (110/100)
(C0301)
78-101
: Well-structured class configuration.The class attributes properly define country code, subdivisions, language support, and deprecation handling. The subdivision aliases provide good usability while maintaining the official state codes.
103-107
: Proper initialization with observed rules.The constructor correctly initializes parent classes and sets the observed rule to move Saturday holidays to Friday and Sunday holidays to Monday, matching the legal requirements documented in Section 602.
109-137
: Accurate implementation of national holidays.The holiday logic correctly implements year constraints for holidays that were established later (e.g., United Nations Day from 1991, Presidents Day from 2021). The use of observed holidays is consistent throughout.
132-134
: Verify the Presidents Day year constraint.The condition uses
self._year > 2020
but the test expects it to start in 2021. This is correct since "greater than 2020" includes 2021 onwards.
149-175
: Comprehensive Kosrae subdivision holidays.The Kosrae (KSA) subdivision method properly implements all state-specific holidays with correct year constraints. The variety of holidays including Good Friday, Gospel Day, and Thanksgiving Day reflects the state's unique cultural blend.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #2594 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 227 228 +1
Lines 14470 14533 +63
Branches 2027 2038 +11
=========================================
+ Hits 14470 14533 +63 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com> Signed-off-by: Nalin Gupta <nalinguptaofficial@gmail.com>
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 (10)
holidays/locale/en_US/LC_MESSAGES/FM.po (1)
17-17
: Version number needs updating.holidays/locale/en_FM/LC_MESSAGES/FM.po (1)
17-17
: Version number needs updating.tests/countries/test_micronesia.py (6)
24-26
: Use direct assignment for subdiv_holidays.The past review suggested a more direct approach without the intermediate assignment.
143-172
: Use pre-initialized subdivision holidays.Replace the local instance with the pre-initialized subdivision holidays from setUpClass.
- def test_trk_holidays(self): - trk_holidays = Micronesia(subdiv="TRK", years=range(1987, 2050)) + def test_trk_holidays(self): + trk_holidays = self.subdiv_holidays["TRK"]🧰 Tools
🪛 Pylint (3.3.7)
[convention] 143-143: Missing function or method docstring
(C0116)
430-444
: Reorder test method placement.Move this test method before the localization tests for better organization.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 430-430: Missing function or method docstring
(C0116)
174-270
: 🛠️ Refactor suggestionUse pre-initialized subdivision holidays.
Use the pre-initialized instance for better efficiency.
- def test_ksa_holidays(self): - ksa_holidays = Micronesia(subdiv="KSA", years=range(1987, 2050)) + def test_ksa_holidays(self): + ksa_holidays = self.subdiv_holidays["KSA"]🧰 Tools
🪛 Pylint (3.3.7)
[convention] 174-174: Missing function or method docstring
(C0116)
271-335
: 🛠️ Refactor suggestionUse pre-initialized subdivision holidays.
Maintain consistency with other test methods by using the pre-initialized instance.
- def test_pni_holidays(self): - pni_holidays = Micronesia(subdiv="PNI", years=range(1987, 2050)) + def test_pni_holidays(self): + pni_holidays = self.subdiv_holidays["PNI"]🧰 Tools
🪛 Pylint (3.3.7)
[convention] 271-271: Missing function or method docstring
(C0116)
336-366
: 🛠️ Refactor suggestionUse pre-initialized subdivision holidays.
Follow the same pattern for consistency and efficiency.
- def test_yap_holidays(self): - yap_holidays = Micronesia(subdiv="YAP", years=range(1987, 2050)) + def test_yap_holidays(self): + yap_holidays = self.subdiv_holidays["YAP"]🧰 Tools
🪛 Pylint (3.3.7)
[convention] 336-336: Missing function or method docstring
(C0116)
holidays/countries/micronesia.py (2)
28-28
: Fix duplicate reference link.The FSM Veterans of Foreign Wars Day link appears to be a duplicate of the United Nations Day link.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 28-28: Line too long (146/100)
(C0301)
151-154
: Use consistent year comparison operator.For consistency with other year checks in the codebase, use
>=
operator.- if self._year > 1990: + if self._year >= 1991:
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
holidays/countries/micronesia.py
(1 hunks)holidays/locale/en_FM/LC_MESSAGES/FM.po
(1 hunks)holidays/locale/en_US/LC_MESSAGES/FM.po
(1 hunks)tests/countries/test_micronesia.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
tests/countries/test_micronesia.py (1)
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:278-377
Timestamp: 2025-03-05T02:35:03.298Z
Learning: For Macau holiday implementations, it's preferable to maintain separate methods for different holiday categories (MANDATORY, GOVERNMENT, PUBLIC) as they are based on different sets of laws, making the code easier to maintain despite having multiple year-based conditionals.
holidays/countries/micronesia.py (2)
Learnt from: KJhellico
PR: vacanza/holidays#2571
File: holidays/countries/bermuda.py:108-110
Timestamp: 2025-05-31T15:11:42.143Z
Learning: In the holidays library project, alias classes (like BM, BMU) do not have docstrings. This is a project-specific convention.
Learnt from: PPsyrius
PR: vacanza/holidays#2594
File: holidays/countries/micronesia.py:25-30
Timestamp: 2025-06-04T11:06:21.143Z
Learning: In the holidays repository, line length formatting should defer to pre-commit formatting checks rather than manual suggestions. If pre-commit allows it, the formatting is acceptable per project policy.
🧬 Code Graph Analysis (1)
tests/countries/test_micronesia.py (2)
tests/common.py (8)
TestCase
(28-338)CommonCountryTests
(356-374)assertAliases
(121-130)assertNoHolidays
(292-294)assertHolidayName
(195-199)assertNoNonObservedHoliday
(248-250)assertLocalizedHolidays
(327-338)assertHolidays
(228-230)holidays/countries/micronesia.py (3)
Micronesia
(19-202)FM
(205-206)FSM
(209-210)
🪛 Pylint (3.3.7)
tests/countries/test_micronesia.py
[convention] 1-1: Missing module docstring
(C0114)
[convention] 19-19: Missing class docstring
(C0115)
[warning] 21-21: Number of parameters was 4 in 'TestCase.setUpClass' and is now 1 in overriding 'TestMicronesia.setUpClass' method
(W0221)
[convention] 28-28: Missing function or method docstring
(C0116)
[convention] 31-31: Missing function or method docstring
(C0116)
[convention] 34-34: Missing function or method docstring
(C0116)
[convention] 46-46: Missing function or method docstring
(C0116)
[convention] 59-59: Missing function or method docstring
(C0116)
[convention] 74-74: Missing function or method docstring
(C0116)
[convention] 88-88: Missing function or method docstring
(C0116)
[convention] 104-104: Missing function or method docstring
(C0116)
[convention] 118-118: Missing function or method docstring
(C0116)
[convention] 128-128: Missing function or method docstring
(C0116)
[convention] 143-143: Missing function or method docstring
(C0116)
[convention] 174-174: Missing function or method docstring
(C0116)
[convention] 271-271: Missing function or method docstring
(C0116)
[convention] 336-336: Missing function or method docstring
(C0116)
[convention] 367-367: Missing function or method docstring
(C0116)
[convention] 398-398: Missing function or method docstring
(C0116)
[convention] 430-430: Missing function or method docstring
(C0116)
holidays/countries/micronesia.py
[convention] 25-25: Line too long (108/100)
(C0301)
[convention] 26-26: Line too long (124/100)
(C0301)
[convention] 27-27: Line too long (132/100)
(C0301)
[convention] 28-28: Line too long (146/100)
(C0301)
[convention] 29-29: Line too long (152/100)
(C0301)
[convention] 30-30: Line too long (130/100)
(C0301)
[convention] 33-33: Line too long (108/100)
(C0301)
[convention] 34-34: Line too long (131/100)
(C0301)
[convention] 35-35: Line too long (144/100)
(C0301)
[convention] 38-38: Line too long (107/100)
(C0301)
[convention] 39-39: Line too long (134/100)
(C0301)
[convention] 40-40: Line too long (160/100)
(C0301)
[convention] 44-44: Line too long (169/100)
(C0301)
[convention] 47-47: Line too long (145/100)
(C0301)
[convention] 48-48: Line too long (118/100)
(C0301)
[convention] 49-49: Line too long (199/100)
(C0301)
[convention] 51-51: Line too long (107/100)
(C0301)
[convention] 54-54: Line too long (159/100)
(C0301)
[convention] 55-55: Line too long (110/100)
(C0301)
[convention] 1-1: Missing module docstring
(C0114)
[convention] 205-205: Missing class docstring
(C0115)
[convention] 209-209: Missing class docstring
(C0115)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
holidays/countries/micronesia.py
(1 hunks)tests/countries/test_micronesia.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
holidays/countries/micronesia.py (2)
Learnt from: KJhellico
PR: vacanza/holidays#2571
File: holidays/countries/bermuda.py:108-110
Timestamp: 2025-05-31T15:11:42.151Z
Learning: In the holidays library project, alias classes (like BM, BMU) do not have docstrings. This is a project-specific convention.
Learnt from: PPsyrius
PR: vacanza/holidays#2594
File: holidays/countries/micronesia.py:25-30
Timestamp: 2025-06-04T11:06:21.179Z
Learning: In the holidays repository, line length formatting should defer to pre-commit formatting checks rather than manual suggestions. If pre-commit allows it, the formatting is acceptable per project policy.
tests/countries/test_micronesia.py (2)
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:278-377
Timestamp: 2025-03-05T02:35:03.298Z
Learning: For Macau holiday implementations, it's preferable to maintain separate methods for different holiday categories (MANDATORY, GOVERNMENT, PUBLIC) as they are based on different sets of laws, making the code easier to maintain despite having multiple year-based conditionals.
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.
🧬 Code Graph Analysis (1)
holidays/countries/micronesia.py (3)
holidays/groups/christian.py (2)
_add_christmas_day
(208-216)_add_good_friday
(308-317)holidays/groups/international.py (4)
_add_new_years_day
(126-134)_add_united_nations_day
(212-220)_add_remembrance_day
(166-174)_add_womens_day
(187-197)holidays/observed_holiday_base.py (1)
ObservedHolidayBase
(101-243)
🪛 Pylint (3.3.7)
holidays/countries/micronesia.py
[convention] 24-24: Line too long (103/100)
(C0301)
[convention] 25-25: Line too long (108/100)
(C0301)
[convention] 26-26: Line too long (124/100)
(C0301)
[convention] 27-27: Line too long (132/100)
(C0301)
[convention] 28-28: Line too long (147/100)
(C0301)
[convention] 29-29: Line too long (148/100)
(C0301)
[convention] 30-30: Line too long (130/100)
(C0301)
[convention] 33-33: Line too long (108/100)
(C0301)
[convention] 34-34: Line too long (131/100)
(C0301)
[convention] 35-35: Line too long (144/100)
(C0301)
[convention] 38-38: Line too long (107/100)
(C0301)
[convention] 39-39: Line too long (134/100)
(C0301)
[convention] 40-40: Line too long (160/100)
(C0301)
[convention] 44-44: Line too long (169/100)
(C0301)
[convention] 47-47: Line too long (145/100)
(C0301)
[convention] 48-48: Line too long (118/100)
(C0301)
[convention] 49-49: Line too long (199/100)
(C0301)
[convention] 51-51: Line too long (107/100)
(C0301)
[convention] 1-1: Missing module docstring
(C0114)
[convention] 195-195: Missing class docstring
(C0115)
[convention] 199-199: Missing class docstring
(C0115)
tests/countries/test_micronesia.py
[convention] 1-1: Missing module docstring
(C0114)
[convention] 19-19: Missing class docstring
(C0115)
[warning] 21-21: Number of parameters was 4 in 'TestCase.setUpClass' and is now 1 in overriding 'TestMicronesia.setUpClass' method
(W0221)
[convention] 28-28: Missing function or method docstring
(C0116)
[convention] 31-31: Missing function or method docstring
(C0116)
[convention] 34-34: Missing function or method docstring
(C0116)
[convention] 46-46: Missing function or method docstring
(C0116)
[convention] 59-59: Missing function or method docstring
(C0116)
[convention] 74-74: Missing function or method docstring
(C0116)
[convention] 88-88: Missing function or method docstring
(C0116)
[convention] 104-104: Missing function or method docstring
(C0116)
[convention] 118-118: Missing function or method docstring
(C0116)
[convention] 128-128: Missing function or method docstring
(C0116)
[convention] 143-143: Missing function or method docstring
(C0116)
[convention] 164-164: Missing function or method docstring
(C0116)
[convention] 187-187: Missing function or method docstring
(C0116)
[convention] 209-209: Missing function or method docstring
(C0116)
[convention] 235-235: Missing function or method docstring
(C0116)
[convention] 257-257: Missing function or method docstring
(C0116)
[convention] 279-279: Missing function or method docstring
(C0116)
[convention] 301-301: Missing function or method docstring
(C0116)
[convention] 319-319: Missing function or method docstring
(C0116)
[convention] 336-336: Missing function or method docstring
(C0116)
[convention] 349-349: Missing function or method docstring
(C0116)
[convention] 371-371: Missing function or method docstring
(C0116)
[convention] 392-392: Missing function or method docstring
(C0116)
[convention] 413-413: Missing function or method docstring
(C0116)
[convention] 434-434: Missing function or method docstring
(C0116)
[convention] 455-455: Missing function or method docstring
(C0116)
[convention] 472-472: Missing function or method docstring
(C0116)
[convention] 503-503: Missing function or method docstring
(C0116)
[refactor] 19-19: Too many public methods (29/20)
(R0904)
🔇 Additional comments (2)
holidays/countries/micronesia.py (1)
1-201
: Solid implementation of Micronesia holidays!The provider follows established patterns with proper inheritance, observed holiday handling, and comprehensive documentation. All national and subdivision holidays are correctly implemented with appropriate year conditions.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 24-24: Line too long (103/100)
(C0301)
[convention] 25-25: Line too long (108/100)
(C0301)
[convention] 26-26: Line too long (124/100)
(C0301)
[convention] 27-27: Line too long (132/100)
(C0301)
[convention] 28-28: Line too long (147/100)
(C0301)
[convention] 29-29: Line too long (148/100)
(C0301)
[convention] 30-30: Line too long (130/100)
(C0301)
[convention] 33-33: Line too long (108/100)
(C0301)
[convention] 34-34: Line too long (131/100)
(C0301)
[convention] 35-35: Line too long (144/100)
(C0301)
[convention] 38-38: Line too long (107/100)
(C0301)
[convention] 39-39: Line too long (134/100)
(C0301)
[convention] 40-40: Line too long (160/100)
(C0301)
[convention] 44-44: Line too long (169/100)
(C0301)
[convention] 47-47: Line too long (145/100)
(C0301)
[convention] 48-48: Line too long (118/100)
(C0301)
[convention] 49-49: Line too long (199/100)
(C0301)
[convention] 51-51: Line too long (107/100)
(C0301)
[convention] 1-1: Missing module docstring
(C0114)
[convention] 195-195: Missing class docstring
(C0115)
[convention] 199-199: Missing class docstring
(C0115)
tests/countries/test_micronesia.py (1)
1-533
: Comprehensive test coverage!Tests thoroughly validate all national and subdivision holidays, observed rules, and localizations. Good use of generators for date ranges and proper subdivision scoping.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 1-1: Missing module docstring
(C0114)
[convention] 19-19: Missing class docstring
(C0115)
[warning] 21-21: Number of parameters was 4 in 'TestCase.setUpClass' and is now 1 in overriding 'TestMicronesia.setUpClass' method
(W0221)
[convention] 28-28: Missing function or method docstring
(C0116)
[convention] 31-31: Missing function or method docstring
(C0116)
[convention] 34-34: Missing function or method docstring
(C0116)
[convention] 46-46: Missing function or method docstring
(C0116)
[convention] 59-59: Missing function or method docstring
(C0116)
[convention] 74-74: Missing function or method docstring
(C0116)
[convention] 88-88: Missing function or method docstring
(C0116)
[convention] 104-104: Missing function or method docstring
(C0116)
[convention] 118-118: Missing function or method docstring
(C0116)
[convention] 128-128: Missing function or method docstring
(C0116)
[convention] 143-143: Missing function or method docstring
(C0116)
[convention] 164-164: Missing function or method docstring
(C0116)
[convention] 187-187: Missing function or method docstring
(C0116)
[convention] 209-209: Missing function or method docstring
(C0116)
[convention] 235-235: Missing function or method docstring
(C0116)
[convention] 257-257: Missing function or method docstring
(C0116)
[convention] 279-279: Missing function or method docstring
(C0116)
[convention] 301-301: Missing function or method docstring
(C0116)
[convention] 319-319: Missing function or method docstring
(C0116)
[convention] 336-336: Missing function or method docstring
(C0116)
[convention] 349-349: Missing function or method docstring
(C0116)
[convention] 371-371: Missing function or method docstring
(C0116)
[convention] 392-392: Missing function or method docstring
(C0116)
[convention] 413-413: Missing function or method docstring
(C0116)
[convention] 434-434: Missing function or method docstring
(C0116)
[convention] 455-455: Missing function or method docstring
(C0116)
[convention] 472-472: Missing function or method docstring
(C0116)
[convention] 503-503: Missing function or method docstring
(C0116)
[refactor] 19-19: Too many public methods (29/20)
(R0904)
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: 3
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
tests/countries/test_micronesia.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
tests/countries/test_micronesia.py (2)
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:278-377
Timestamp: 2025-03-05T02:35:03.298Z
Learning: For Macau holiday implementations, it's preferable to maintain separate methods for different holiday categories (MANDATORY, GOVERNMENT, PUBLIC) as they are based on different sets of laws, making the code easier to maintain despite having multiple year-based conditionals.
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.
🪛 Pylint (3.3.7)
tests/countries/test_micronesia.py
[convention] 1-1: Missing module docstring
(C0114)
[convention] 19-19: Missing class docstring
(C0115)
[warning] 21-21: Number of parameters was 4 in 'TestCase.setUpClass' and is now 1 in overriding 'TestMicronesia.setUpClass' method
(W0221)
[convention] 28-28: Missing function or method docstring
(C0116)
[convention] 31-31: Missing function or method docstring
(C0116)
[convention] 34-34: Missing function or method docstring
(C0116)
[convention] 46-46: Missing function or method docstring
(C0116)
[convention] 59-59: Missing function or method docstring
(C0116)
[convention] 74-74: Missing function or method docstring
(C0116)
[convention] 88-88: Missing function or method docstring
(C0116)
[convention] 104-104: Missing function or method docstring
(C0116)
[convention] 118-118: Missing function or method docstring
(C0116)
[convention] 128-128: Missing function or method docstring
(C0116)
[convention] 143-143: Missing function or method docstring
(C0116)
[convention] 164-164: Missing function or method docstring
(C0116)
[convention] 187-187: Missing function or method docstring
(C0116)
[convention] 209-209: Missing function or method docstring
(C0116)
[convention] 230-230: Missing function or method docstring
(C0116)
[convention] 252-252: Missing function or method docstring
(C0116)
[convention] 274-274: Missing function or method docstring
(C0116)
[convention] 296-296: Missing function or method docstring
(C0116)
[convention] 314-314: Missing function or method docstring
(C0116)
[convention] 331-331: Missing function or method docstring
(C0116)
[convention] 344-344: Missing function or method docstring
(C0116)
[convention] 366-366: Missing function or method docstring
(C0116)
[convention] 387-387: Missing function or method docstring
(C0116)
[convention] 408-408: Missing function or method docstring
(C0116)
[convention] 429-429: Missing function or method docstring
(C0116)
[convention] 450-450: Missing function or method docstring
(C0116)
[convention] 467-467: Missing function or method docstring
(C0116)
[convention] 498-498: Missing function or method docstring
(C0116)
[refactor] 19-19: Too many public methods (29/20)
(R0904)
🔇 Additional comments (3)
tests/countries/test_micronesia.py (3)
19-26
: Well-structured test setup following established patterns.The setup correctly establishes subdivision holidays for all states and follows the recommended testing approach from the retrieved learnings.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 19-19: Missing class docstring
(C0115)
[warning] 21-21: Number of parameters was 4 in 'TestCase.setUpClass' and is now 1 in overriding 'TestMicronesia.setUpClass' method
(W0221)
[refactor] 19-19: Too many public methods (29/20)
(R0904)
450-466
: Good year-specific test with external reference.The test includes a helpful reference to timeanddate.com for verification and properly tests the 2024 holiday calendar.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 450-450: Missing function or method docstring
(C0116)
467-528
: Comprehensive localization coverage.The localization tests properly cover both default and en_US locales, ensuring proper holiday name translations across all subdivisions.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 467-467: Missing function or method docstring
(C0116)
[convention] 498-498: Missing function or method docstring
(C0116)
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.
Except for the issues the bot raises that still needs to be remedied, the rest looks 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.
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.
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.
@nalin-28 nicely done, thanks fro another valuable contribution 👍
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 (1)
holidays/countries/micronesia.py (1)
200-205
: Alias classes follow project convention.Based on past review discussions, these alias classes correctly omit docstrings per project standards.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 200-200: Missing class docstring
(C0115)
[convention] 204-204: Missing class docstring
(C0115)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
README.md
(2 hunks)holidays/countries/__init__.py
(1 hunks)holidays/countries/micronesia.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
holidays/countries/micronesia.py (3)
Learnt from: KJhellico
PR: vacanza/holidays#2571
File: holidays/countries/bermuda.py:108-110
Timestamp: 2025-05-31T15:11:42.151Z
Learning: In the holidays library project, alias classes (like BM, BMU) do not have docstrings. This is a project-specific convention.
Learnt from: KJhellico
PR: vacanza/holidays#2606
File: holidays/countries/faroe_islands.py:0-0
Timestamp: 2025-06-06T13:23:16.206Z
Learning: Never suggest breaking long URLs in code comments or documentation. If something passes the pre-commit check, then it's allowed and should not be flagged for line length violations.
Learnt from: PPsyrius
PR: vacanza/holidays#2594
File: holidays/countries/micronesia.py:25-30
Timestamp: 2025-06-04T11:06:21.179Z
Learning: In the holidays repository, line length formatting should defer to pre-commit formatting checks rather than manual suggestions. If pre-commit allows it, the formatting is acceptable per project policy.
🧬 Code Graph Analysis (1)
holidays/countries/__init__.py (1)
holidays/countries/micronesia.py (3)
Micronesia
(19-197)FM
(200-201)FSM
(204-205)
🪛 Pylint (3.3.7)
holidays/countries/micronesia.py
[convention] 24-24: Line too long (103/100)
(C0301)
[convention] 25-25: Line too long (123/100)
(C0301)
[convention] 26-26: Line too long (124/100)
(C0301)
[convention] 27-27: Line too long (132/100)
(C0301)
[convention] 28-28: Line too long (147/100)
(C0301)
[convention] 29-29: Line too long (148/100)
(C0301)
[convention] 30-30: Line too long (130/100)
(C0301)
[convention] 34-34: Line too long (141/100)
(C0301)
[convention] 35-35: Line too long (131/100)
(C0301)
[convention] 36-36: Line too long (144/100)
(C0301)
[convention] 38-38: Line too long (141/100)
(C0301)
[convention] 39-39: Line too long (134/100)
(C0301)
[convention] 40-40: Line too long (160/100)
(C0301)
[convention] 44-44: Line too long (169/100)
(C0301)
[convention] 46-46: Line too long (145/100)
(C0301)
[convention] 47-47: Line too long (118/100)
(C0301)
[convention] 48-48: Line too long (199/100)
(C0301)
[convention] 49-49: Line too long (107/100)
(C0301)
[convention] 1-1: Missing module docstring
(C0114)
[convention] 200-200: Missing class docstring
(C0115)
[convention] 204-204: Missing class docstring
(C0115)
⏰ Context from checks skipped due to timeout of 300000ms (3)
- GitHub Check: Test build on macos-latest
- GitHub Check: Test build on windows-latest
- GitHub Check: Test build on ubuntu-latest
🔇 Additional comments (10)
holidays/countries/__init__.py (1)
130-130
: Clean integration of Micronesia module.The import is correctly placed alphabetically and follows the established pattern for country modules with their aliases.
README.md (2)
108-108
: Country count updated correctly.The total supported countries is now accurately reflected.
920-925
: Well-formatted Micronesia documentation entry.The table entry correctly lists the country code, subdivisions with their aliases, and supported languages. The format is consistent with other country entries.
holidays/countries/micronesia.py (7)
19-95
: Comprehensive class definition with excellent documentation.The class structure is well-designed with thorough documentation references, proper inheritance, and complete subdivision support including historical name aliases.
🧰 Tools
🪛 Pylint (3.3.7)
[convention] 24-24: Line too long (103/100)
(C0301)
[convention] 25-25: Line too long (123/100)
(C0301)
[convention] 26-26: Line too long (124/100)
(C0301)
[convention] 27-27: Line too long (132/100)
(C0301)
[convention] 28-28: Line too long (147/100)
(C0301)
[convention] 29-29: Line too long (148/100)
(C0301)
[convention] 30-30: Line too long (130/100)
(C0301)
[convention] 34-34: Line too long (141/100)
(C0301)
[convention] 35-35: Line too long (131/100)
(C0301)
[convention] 36-36: Line too long (144/100)
(C0301)
[convention] 38-38: Line too long (141/100)
(C0301)
[convention] 39-39: Line too long (134/100)
(C0301)
[convention] 40-40: Line too long (160/100)
(C0301)
[convention] 44-44: Line too long (169/100)
(C0301)
[convention] 46-46: Line too long (145/100)
(C0301)
[convention] 47-47: Line too long (118/100)
(C0301)
[convention] 48-48: Line too long (199/100)
(C0301)
[convention] 49-49: Line too long (107/100)
(C0301)
97-101
: Proper initialization with observed holiday rules.The constructor correctly initializes parent classes and sets the default observed rule for weekend holidays.
103-134
: Well-implemented national holidays with proper year handling.The national holidays are correctly implemented with appropriate year checks for when holidays were established. The observed rule application is consistent.
137-162
: Comprehensive Kosrae subdivision holidays.Good implementation of state-specific holidays with proper year checks reflecting when each holiday was established.
165-180
: Solid Pohnpei subdivision implementation.The Pohnpei holidays are properly implemented with appropriate year constraints and observed rule applications.
183-189
: Clean Chuuk subdivision holidays.Straightforward implementation of Chuuk state holidays with proper year check for the constitution day.
192-197
: Simple and correct Yap subdivision.Yap holidays are properly implemented for the two state-specific observances.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com>
|
Proposed change
Add Public Holidays for Federated States of Micronesia
Supported Languages:
en_US
,en_FM
Fixes #1226
Type of change
holidays
functionality in general)Checklist
make check
, all checks and tests are green