+
Skip to content

Add Guinea holidays #2398

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

Merged
merged 57 commits into from
Apr 4, 2025
Merged

Add Guinea holidays #2398

merged 57 commits into from
Apr 4, 2025

Conversation

nalin-28
Copy link
Contributor

@nalin-28 nalin-28 commented Mar 31, 2025

Proposed change

Add Public Holidays for Guinea (Republic of Guinea)
Supported Languages: en_US, fr
Fixes #1194

Type of change

  • New country/market holidays support (thank you!)
  • Supported country/market holidays update (calendar discrepancy fix, localization)
  • Existing code/documentation/test/process quality improvement (best practice, cleanup, refactoring, optimization)
  • Dependency update (version deprecation/pin/upgrade)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (a code change causing existing functionality to break)
  • New feature (new holidays functionality in general)

Checklist

Copy link
Contributor

coderabbitai bot commented Mar 31, 2025

Summary by CodeRabbit

  • New Features
    • Introduced support for Guinea in the holiday calendar with localized holiday details in multiple languages.
    • Added the celebrated Islamic holiday “Laylat al-Qadr,” enriching the holiday observance options.
  • Documentation
    • Updated the contributors list and revised the total count of supported country codes in the documentation.

Walkthrough

This pull request adds support for Guinea within the holiday framework, updating the AUTHORS.md to include a new contributor and the README.md to reflect an increase in the total count of supported country codes. It introduces the Islamic holiday "LAYLAT_AL_QADR," complete with date mappings and retrieval methods. Additionally, localization files for Guinea in both English and French are created, and new tests are added to ensure the accuracy of the holiday definitions.

Changes

File(s) Change Summary
AUTHORS.md Added new author entry: "Nalin Gupta".
README.md Updated supported country codes (from 163 to 164) and added Guinea entry with code GN and supported languages en_US, fr.
holidays/calendars/islamic.py, holidays/groups/islamic.py, scripts/calendar/islamic_generator.py Introduced holiday LAYLAT_AL_QADR by adding a constant, a date dictionary, retrieval methods for the Islamic calendar, a new group helper method, and an entry in the generator tuple.
holidays/countries/init.py, holidays/countries/guinea.py, holidays/registry.py, tests/countries/test_guinea.py Integrated Guinea into the library by adding a new Guinea holiday class (with aliases GN and GIN), updating the import and registry, and introducing comprehensive tests for Guinea holidays.
holidays/locale/.../GN.po Added new localization files for Guinea holidays in English and French.

Assessment against linked issues

Objective Addressed Explanation
Add Guinea holidays (#1194)
Add localization for Guinea holidays in English and French (#1194)
Integrate Islamic holiday LAYLAT_AL_QADR (#1194)

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 747cca0 and 78ca45b.

📒 Files selected for processing (1)
  • scripts/calendar/islamic_generator.py (1 hunks)
⏰ Context from checks skipped due to timeout of 300000ms (1)
  • GitHub Check: Test build on windows-latest
🔇 Additional comments (1)
scripts/calendar/islamic_generator.py (1)

49-50: Nice addition of LAYLAT_AL_QADR holiday!

The addition of Laylat Al-Qadr (The Night of Power) for Guinea (GN) and Côte d'Ivoire (CI) is correctly implemented. The holiday is properly placed chronologically between Nuzul Al-Quran Day and Eid al-Fitr, as it occurs on the 27th day of Ramadan (9th month).

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8d45c14 and ed41783.

📒 Files selected for processing (11)
  • AUTHORS.md (1 hunks)
  • README.md (2 hunks)
  • holidays/calendars/islamic.py (3 hunks)
  • holidays/countries/__init__.py (1 hunks)
  • holidays/countries/guinea.py (1 hunks)
  • holidays/groups/islamic.py (1 hunks)
  • holidays/locale/en_US/LC_MESSAGES/GN.po (1 hunks)
  • holidays/locale/fr/LC_MESSAGES/GN.po (1 hunks)
  • holidays/registry.py (1 hunks)
  • scripts/calendar/islamic_generator.py (1 hunks)
  • tests/countries/test_guinea.py (1 hunks)
🧰 Additional context used
🧬 Code Definitions (2)
holidays/countries/__init__.py (1)
holidays/countries/guinea.py (3)
  • Guinea (21-97)
  • GN (100-101)
  • GIN (104-105)
tests/countries/test_guinea.py (1)
holidays/countries/guinea.py (3)
  • Guinea (21-97)
  • GN (100-101)
  • GIN (104-105)
🔇 Additional comments (24)
AUTHORS.md (1)

97-97: New contributor added correctly.

The name "Nalin Gupta" has been added to the AUTHORS.md file, maintaining proper alphabetical order. This correctly attributes the contributor who implemented the Guinea holidays support.

holidays/countries/__init__.py (1)

78-78: Guinea import added correctly.

The import statement from .guinea import Guinea, GN, GIN has been properly added, placing it alphabetically between Guernsey and Haiti. This allows the Guinea holiday class and its country code aliases to be accessible through the countries package.

scripts/calendar/islamic_generator.py (1)

71-71: Islamic holiday added appropriately.

The Laylat Al-Qadr (The Night of Power) holiday has been added to the ISLAMIC_HOLIDAYS tuple with the correct format (9, 27, "LAYLAT_AL_QADR"). This is an important Islamic observance that occurs on the 27th day of the 9th month in the Islamic calendar, which would be relevant for Guinea's holiday calendar.

README.md (2)

102-102: Country count updated correctly.

The number of supported country codes has been updated from 161 to 162, reflecting the addition of Guinea to the supported countries.


586-591: Guinea entry added properly to the country table.

The Guinea entry has been added to the table with the following details:

  • Country name: Guinea
  • Country code: GN
  • No subdivisions specified
  • Supported languages: en_US, fr (with fr as the default, indicated by the bold formatting)
  • No additional holiday categories

This properly documents Guinea's integration into the holidays library and matches the implementation details from the Guinea class.

holidays/registry.py (1)

87-87: Correctly added Guinea to the country registry.

The entry follows the proper pattern with country name, ISO 3166-1 alpha-2 code (GN), and alpha-3 code (GIN). The alphabetical placement between Guernsey and Haiti is correct.

holidays/groups/islamic.py (1)

298-306: Well-implemented Laylat al-Qadr holiday support.

The method follows the established pattern in the codebase with proper documentation, including the holiday description and Wikipedia reference. Implementation correctly calls the appropriate calendar date retrieval method.

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

1-84: Good addition of English translations for Guinea holidays.

The localization file includes all necessary metadata and properly translates holiday names from French to English. The translations are accurate and follow the established pattern for holiday names.

tests/countries/test_guinea.py (9)

19-23: Good test class setup

The class properly inherits from CommonCountryTests and TestCase, with correct initialization of the Guinea class in setUpClass.


24-26: Effective alias testing

Correctly verifies that GN and GIN are valid aliases for Guinea.


27-29: Good boundary condition check

Appropriate test to ensure no holidays are returned for years before Guinea's independence (1958).


30-34: Well-implemented date range testing

Test correctly verifies Second Republic Day is only observed from 1958 to 2021 and not afterward.


35-39: Proper holiday range verification

Test properly checks that All Saints' Day is only observed between 1958 and 2021.


48-64: Comprehensive Islamic holiday test

Good test coverage for Eid al-Fitr dates across multiple years, accounting for the lunar calendar shift.


65-80: Thorough Christian holiday testing

Appropriate verification of Easter Monday dates which follow the Christian calendar's movable feast calculation.


130-146: Good testing of Laylat al-Qadr dates

Comprehensive test coverage for the Night of Power holiday across multiple years with correct Islamic calendar dates.


147-162: Complete year test

Excellent comprehensive test that verifies all holidays for 2021, ensuring the holiday set is complete and accurate.

holidays/calendars/islamic.py (3)

34-34: New holiday constant added correctly.

The constant LAYLAT_AL_QADR follows the same naming pattern as existing holiday constants, maintaining consistency in the codebase.


2236-2390: Comprehensive date mapping for Laylat al-Qadr holiday.

The LAYLAT_AL_QADR_DATES dictionary provides date mappings spanning from 1925 to 2077, consistent with other holiday date dictionaries in this file. The format adheres to the established pattern using month constants and day numbers.


3850-3851: Method implementation follows established pattern.

The laylat_al_qadr_dates method correctly implements the holiday date retrieval using the same pattern as other holiday methods, leveraging the _get_holiday helper. This maintains consistency and reduces code duplication.

holidays/countries/guinea.py (4)

21-37: Class definition looks good with comprehensive documentation.

The class is correctly set up with proper inheritance structure and includes useful reference links in the documentation. The country code, language settings, and start year are all properly defined.


41-54: Constructor implementation is solid.

The constructor properly initializes all parent classes and handles the optional parameter for Islamic holiday estimation. The code follows the project patterns well.


100-106: Alias classes look good.

The GN and GIN classes provide useful country code aliases for the Guinea class.


108-163: Islamic holidays dates implementation looks correct.

The implementation provides specific dates for Islamic holidays from 2015 to 2025, which is particularly useful for these lunar calendar-based holidays. The use of tuples for years with multiple dates is handled properly.

Copy link

codecov bot commented Mar 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (79e2d2f) to head (78ca45b).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2398   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          208       209    +1     
  Lines        13244     13301   +57     
  Branches      1899      1906    +7     
=========================================
+ Hits         13244     13301   +57     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KJhellico KJhellico changed the title Add Guinea Holidays Add Guinea holidays Mar 31, 2025
nalin-28 added 2 commits April 1, 2025 18:06
Signed-off-by: nalin-28 <nalinguptaofficial@gmail.com>
Make changes to Assumption day and Tabaski

Signed-off-by: nalin-28 <nalinguptaofficial@gmail.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ed41783 and 7b20fba.

📒 Files selected for processing (5)
  • AUTHORS.md (1 hunks)
  • README.md (1 hunks)
  • holidays/countries/__init__.py (1 hunks)
  • holidays/groups/islamic.py (1 hunks)
  • holidays/registry.py (1 hunks)
🧰 Additional context used
🧬 Code Definitions (2)
holidays/countries/__init__.py (1)
holidays/countries/guinea.py (3)
  • Guinea (21-97)
  • GN (100-101)
  • GIN (104-105)
holidays/groups/islamic.py (1)
holidays/calendars/islamic.py (1)
  • laylat_al_qadr_dates (3850-3851)
🪛 Ruff (0.8.2)
holidays/groups/islamic.py

301-301: Blank line contains whitespace

Remove whitespace from blank line

(W293)

🔇 Additional comments (5)
AUTHORS.md (1)

99-99: Author addition looks good!

Welcome to the project, Nalin Gupta. The addition maintains proper alphabetical ordering in the authors list.

holidays/countries/__init__.py (1)

78-78: Import statement correctly follows project conventions

The import for Guinea maintains proper alphabetical ordering between Ghana and Haiti, and follows the standard pattern of importing the country class along with its ISO code aliases.

README.md (1)

585-591: Guinea entry correctly added to README

The Guinea entry follows the established format and includes proper language support information. The table formatting is maintained consistently with English (en_US) and French (fr) as supported languages, with French marked as the default.

holidays/registry.py (1)

87-87: Registry entry properly formatted

The Guinea entry in the COUNTRIES dictionary follows the project's conventions with proper ISO codes (GN and GIN) and maintains alphabetical ordering between Guernsey and Haiti.

holidays/groups/islamic.py (1)

305-307: Implementation improved for Laylat al-Qadr calculation.

The code now uses a dedicated method laylat_al_qadr_dates() instead of deriving the date from Ramadan's start date. This is a better approach as it encapsulates the specific calculation logic for this holiday.

Fix Independence spelling

Signed-off-by: nalin-28 <nalinguptaofficial@gmail.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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/guinea.py (1)

65-72: 🧹 Nitpick (assertive)

Add an explanatory comment for the date range condition

The implementation correctly restricts these holidays to years 1958-2021, but add a comment explaining why they stopped being recognized after 2021.

 if self._year <= 2021 and self._year >= 1958:
+    # Guinea stopped recognizing Second Republic Day as a public holiday from 2021 onwards
     # Second Republic Day.
     self._add_holiday_apr_3(tr("Jour de la Deuxième République"))

 if self._year <= 2021 and self._year >= 1958:
+    # Guinea stopped recognizing All Saint's Day as a public holiday from 2021 onwards
     # All Saint's Day.
     self._add_all_saints_day(tr("La Toussaint"))
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7b20fba and 552afed.

📒 Files selected for processing (2)
  • holidays/countries/guinea.py (1 hunks)
  • tests/countries/test_guinea.py (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
holidays/countries/guinea.py (1)
Learnt from: nalin-28
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:65-72
Timestamp: 2025-04-01T06:13:19.221Z
Learning: Guinea stopped recognizing "Second Republic Day" and "All Saint's Day" as public holidays from 2021 onwards.
🧬 Code Definitions (2)
tests/countries/test_guinea.py (1)
holidays/countries/guinea.py (3)
  • Guinea (21-95)
  • GN (98-99)
  • GIN (102-103)
holidays/countries/guinea.py (2)
holidays/calendars/islamic.py (1)
  • _CustomIslamicHolidays (3881-3882)
holidays/groups/islamic.py (5)
  • IslamicHolidays (20-416)
  • _add_eid_al_fitr_day (152-163)
  • _add_eid_al_adha_day (109-120)
  • _add_mawlid_day (319-329)
  • _add_laylat_al_qadr_day (298-307)
🔇 Additional comments (24)
tests/countries/test_guinea.py (18)

1-17: LGTM! Well-structured imports and setup.

The imports are appropriate and follow the project's conventions.


19-23: Test class correctly inherits from CommonCountryTests

The test class follows the project's standard pattern by inheriting from the CommonCountryTests class and setting up the Guinea class.


24-26: Proper validation of country aliases

Good practice to verify that all aliases (GN, GIN) correctly map to the main Guinea class.


27-29: Correct check for no holidays before independence

Good test to verify that no holidays exist before Guinea's independence in 1958.


30-34: Good test for Second Republic Day with appropriate date range

The test correctly verifies this holiday exists from 1958 to 2021 and is absent from 2022 onwards, matching the implementation.


35-39: Good test for All Saints' Day with appropriate date range

The test correctly verifies this holiday exists from 1958 to 2021 and is absent from 2022 onwards, matching the implementation.


40-42: New Year's Day test is properly implemented

The test correctly verifies this holiday for the appropriate years.


43-47: Africa Day test is properly implemented

The test correctly verifies this holiday for the appropriate years.


48-64: Comprehensive test for Eid al-Fitr with specific dates

Good test that verifies this Islamic holiday's specific dates for each year.


65-80: Comprehensive test for Easter Monday with specific dates

Good test that verifies this Christian holiday's specific dates for each year.


81-83: Labor Day test is properly implemented

The test correctly verifies this holiday for the appropriate years.


84-87: Assumption of Mary test is properly implemented

The test correctly verifies this holiday for the appropriate years.


88-92: Independence Day test is properly implemented

The test correctly verifies this holiday for the appropriate years.


93-95: Christmas Day test is properly implemented

The test correctly verifies this holiday for the appropriate years.


96-112: Comprehensive test for Mawlid Day with specific dates

Good test that verifies this Islamic holiday's specific dates for each year.


113-129: Comprehensive test for Eid al-Adha Day with specific dates

Good test that verifies this Islamic holiday's specific dates for each year.


130-146: Comprehensive test for Laylat al-Qadr Day with specific dates

Good test that verifies this Islamic holiday's specific dates for each year.


147-163: Good comprehensive test for 2021 holidays

This test verifies all holidays for 2021, which is a good integration test to ensure everything works together properly.

holidays/countries/guinea.py (6)

13-19: LGTM! Appropriate imports for holidays implementation.

The imports cover all necessary components for defining Guinea holidays.


21-37: Well-structured Guinea class with proper documentation

Good job defining the country code, supported languages, and providing reference documentation.


41-54: LGTM! Constructor correctly initializes parent classes

The constructor properly initializes all parent classes and passes the custom Islamic holidays implementation.


94-96: LGTM! Good implementation of Laylat al-Qadr holiday

This Islamic holiday is properly implemented using the custom Islamic calendar dates.


98-103: LGTM! Country code aliases correctly defined

The GN and GIN aliases are properly implemented as subclasses of Guinea.


106-161: LGTM! Comprehensive Islamic holiday dates implementation

The custom Islamic holiday dates are well-defined for years 2015-2025, providing accurate holiday dates for Guinea.

nalin-28 added 4 commits April 1, 2025 18:16
Fix Spelling

Signed-off-by: nalin-28 <nalinguptaofficial@gmail.com>
Fix Spelling Errors

Signed-off-by: nalin-28 <nalinguptaofficial@gmail.com>
Fix Spelling Mistake

Signed-off-by: nalin-28 <nalinguptaofficial@gmail.com>
Fix Trailing Whitespace

Signed-off-by: nalin-28 <nalinguptaofficial@gmail.com>
Copy link
Collaborator

@PPsyrius PPsyrius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work so far ❤️

Co-authored-by: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
Signed-off-by: nalin-28 <nalinguptaofficial@gmail.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

♻️ Duplicate comments (2)
tests/countries/test_guinea.py (1)

148-149: 🧹 Nitpick (assertive)

Add source reference for test data.

As suggested in a past review comment, consider adding a link to the source you used for the 2021 test case.

-    def test_2021(self):
+    def test_2021(self):
+        # Source: https://www.timeanddate.com/holidays/guinea/2021
holidays/countries/guinea.py (1)

56-94: 🧹 Nitpick (assertive)

Consider ordering holidays chronologically.

As suggested in a past review comment, consider ordering the holidays chronologically, with Gregorian calendar holidays first and Islamic holidays afterward. This would improve readability and maintenance.

    def _populate_public_holidays(self):
        # New Year's Day.
        self._add_new_years_day(tr("Nouvel an"))

-        # Eid al-Fitr.
-        self._add_eid_al_fitr_day(tr("Korité"))
-
        # Easter Monday.
        self._add_easter_monday(tr("Le lundi de Pâques"))

        if self._year <= 2021:
            # Second Republic Day.
            self._add_holiday_apr_3(tr("Jour de la Deuxième République"))

-            # All Saint's Day.
-            self._add_all_saints_day(tr("La Toussaint"))
-
        # Labor Day.
        self._add_labor_day(tr("Fête du Travail"))

        # Africa Day.
        self._add_africa_day(tr("Anniversaire de l'OUA"))

-        # Eid al-Adha.
-        self._add_eid_al_adha_day(tr("Tabaski"))
-
        # Assumption Day.
        self._add_assumption_of_mary_day(tr("Assomption de Marie"))

        # Independence Day.
        self._add_holiday_oct_2(tr("Fête de l'indépendance de la Guinée"))

+        if self._year <= 2021:
+            # All Saint's Day.
+            self._add_all_saints_day(tr("La Toussaint"))
+
        # Christmas Day.
        self._add_christmas_day(tr("Noël"))

+        # Eid al-Fitr.
+        self._add_eid_al_fitr_day(tr("Korité"))
+
+        # Eid al-Adha.
+        self._add_eid_al_adha_day(tr("Tabaski"))
+
        # Prophet's Birthday.
        self._add_mawlid_day(tr("Maouloud"))

        # Night of Power.
        self._add_laylat_al_qadr_day(tr("Lailatoul Qadr"))
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 10d696e and 29c7bfe.

📒 Files selected for processing (5)
  • holidays/countries/guinea.py (1 hunks)
  • holidays/locale/en_US/LC_MESSAGES/GN.po (1 hunks)
  • holidays/locale/fr/LC_MESSAGES/GN.po (1 hunks)
  • scripts/calendar/islamic_generator.py (1 hunks)
  • tests/countries/test_guinea.py (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
holidays/locale/en_US/LC_MESSAGES/GN.po (1)
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: holidays/locale/fr/LC_MESSAGES/GN.po:31-83
Timestamp: 2025-03-31T20:25:12.808Z
Learning: In the holidays library, French (fr) is the default language for Guinea. This means that message IDs (msgid) in the PO files are already in French, and message strings (msgstr) in the French locale files can remain empty, as no translation is needed.
holidays/locale/fr/LC_MESSAGES/GN.po (1)
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: holidays/locale/fr/LC_MESSAGES/GN.po:31-83
Timestamp: 2025-03-31T20:25:12.808Z
Learning: In the holidays library, French (fr) is the default language for Guinea. This means that message IDs (msgid) in the PO files are already in French, and message strings (msgstr) in the French locale files can remain empty, as no translation is needed.
holidays/countries/guinea.py (1)
Learnt from: nalin-28
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:65-72
Timestamp: 2025-04-01T06:13:19.221Z
Learning: Guinea stopped recognizing "Second Republic Day" and "All Saint's Day" as public holidays from 2021 onwards.
🧬 Code Definitions (1)
tests/countries/test_guinea.py (1)
holidays/countries/guinea.py (3)
  • Guinea (21-94)
  • GN (97-98)
  • GIN (101-102)
🔇 Additional comments (7)
scripts/calendar/islamic_generator.py (1)

71-72: Good addition of LAYLAT_AL_QADR holiday for Guinea (GN) and Côte d'Ivoire (CI).

The addition of this Islamic holiday follows the established pattern and is properly positioned chronologically - it appears after other 9th month entries and before the 10th month entries. The formatting and comment style match the existing conventions.

holidays/locale/en_US/LC_MESSAGES/GN.po (2)

33-35: Translations look good and follow proper structure.

The translation for "Nouvel an" to "New Year's Day" is correct and follows the standard format.


81-83: Good translation of Islamic holiday.

The translation of "Lailatoul Qadr" to "The Night of Power" correctly captures the meaning of this important Islamic observance.

holidays/locale/fr/LC_MESSAGES/GN.po (1)

31-83: Empty message strings are correct for default language.

Based on the retrieved learning, French is the default language for Guinea in this library, so the empty message strings are intentional and correct. The msgid values are already in French, making translation unnecessary.

holidays/countries/guinea.py (3)

21-40: Class definition looks good with proper documentation.

The Guinea class is well defined with appropriate documentation, references, and metadata settings. The start year of 1959 correctly represents the year after Guinea gained independence from France.


97-102: Country code aliases properly defined.

The aliases GN and GIN are correctly implemented as subclasses of Guinea.


105-160: Islamic holiday definitions look good.

The GuineaIslamicHolidays class correctly defines specific dates for Islamic holidays from 2015 to 2025, which is important for accurate holiday calculations due to the lunar Islamic calendar.

nalin-28 added 2 commits April 1, 2025 22:19
Signed-off-by: nalin-28 <nalinguptaofficial@gmail.com>
Fix WhiteSpace

Signed-off-by: nalin-28 <nalinguptaofficial@gmail.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
Signed-off-by: Nalin Gupta <nalinguptaofficial@gmail.com>
@nalin-28 nalin-28 requested a review from KJhellico April 4, 2025 06:12
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
Signed-off-by: Nalin Gupta <nalinguptaofficial@gmail.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

♻️ Duplicate comments (1)
holidays/countries/guinea.py (1)

72-75: 🧹 Nitpick (assertive)

Add a brief historical/legal reference above this conditional.

A short comment explaining why “Second Republic Day” is limited to 1985–2021 would help future readers, as suggested in previous comments.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1be7a49 and 747cca0.

📒 Files selected for processing (1)
  • holidays/countries/guinea.py (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
holidays/countries/guinea.py (5)
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:101-106
Timestamp: 2025-04-03T13:03:16.558Z
Learning: For Islamic holidays in Guinea like "Lendemain de la nuit Lailatoul Qadr" (Day after Night of Power) and "Lendemain de la nuit du Maoloud" (Day after Prophet's Birthday), the naming refers to the daylight hours following the night when these Islamic observances occur. Since in the Islamic calendar days begin at sunset rather than midnight, methods like `_add_laylat_al_qadr_day` and `_add_mawlid_day` correctly calculate these dates without requiring an additional day offset in the implementation, following the same pattern as in the Ivory Coast implementation.
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:101-106
Timestamp: 2025-04-03T13:03:16.558Z
Learning: For Islamic holidays in Guinea like "Lendemain de la nuit Lailatoul Qadr" (Day after Night of Power) and "Lendemain de la nuit du Maoloud" (Day after Prophet's Birthday), the naming refers to the daylight hours following the night when these Islamic observances occur. Since in the Islamic calendar days begin at sunset rather than midnight, methods like `_add_laylat_al_qadr_day` and `_add_mawlid_day` correctly calculate these dates without requiring an additional day offset in the implementation.
Learnt from: nalin-28
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:65-72
Timestamp: 2025-04-02T17:22:27.207Z
Learning: Guinea stopped recognizing "Second Republic Day" and "All Saint's Day" as public holidays from 2021 onwards.
Learnt from: PPsyrius
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:73-77
Timestamp: 2025-04-03T12:36:41.201Z
Learning: In the Holidays library, comments explaining year restrictions for holidays should be placed above the year check conditional statement, not inside it. Example format:
```python
# reason why goes here
if start_year <= self._year <= end_year:
    # Holiday name
    self._add_holiday_function(tr("Holiday Name"))

Learnt from: KJhellico
PR: #2388
File: holidays/countries/ivory_coast.py:98-107
Timestamp: 2025-04-02T17:22:27.207Z
Learning: In the Islamic calendar, days begin at sunset rather than midnight. For holidays like "Lendemain de la Nuit du Destin" (Day after Night of Destiny) in Ivory Coast, the name refers to the daylight hours following the night of Laylat al-Qadr (27th of Ramadan). The implementation uses _add_laylat_al_qadr_day which correctly calculates this as the 27th day of Ramadan in the Gregorian calendar.


</details>

</details><details>
<summary>🧬 Code Definitions (1)</summary>

<details>
<summary>holidays/countries/guinea.py (2)</summary><blockquote>

<details>
<summary>holidays/calendars/islamic.py (1)</summary>

* `_CustomIslamicHolidays` (3881-3882)

</details>
<details>
<summary>holidays/groups/islamic.py (6)</summary>

* `IslamicHolidays` (20-416)
* `_add_mawlid_day` (319-329)
* `_add_laylat_al_qadr_day` (298-307)
* `_add_eid_al_fitr_day` (152-163)
* `_add_eid_al_adha_day` (109-120)
* `_add_eid_al_adha_day_two` (122-130)

</details>

</blockquote></details>

</details>

</details>

<details>
<summary>🔇 Additional comments (1)</summary><blockquote>

<details>
<summary>holidays/countries/guinea.py (1)</summary>

`100-102`: **This implementation for Day after Prophet's Birthday is correctly aligned with local convention.**

The approach matches the Ivory Coast pattern where “day after” naming reflects the daylight hours following the night observance.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@nalin-28 nalin-28 requested a review from KJhellico April 4, 2025 10:08
KJhellico
KJhellico previously approved these changes Apr 4, 2025
Copy link
Collaborator

@KJhellico KJhellico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 👍

PPsyrius
PPsyrius previously approved these changes Apr 4, 2025
Copy link
Collaborator

@PPsyrius PPsyrius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🇬🇳

@arkid15r arkid15r dismissed stale reviews from PPsyrius and KJhellico via 78ca45b April 4, 2025 19:30
Copy link

sonarqubecloud bot commented Apr 4, 2025

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this @nalin-28 !

@arkid15r arkid15r added this pull request to the merge queue Apr 4, 2025
Merged via the queue into vacanza:dev with commit 00eb04c Apr 4, 2025
33 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Apr 6, 2025
9 tasks
This was referenced Apr 7, 2025
@KJhellico KJhellico mentioned this pull request Apr 8, 2025
9 tasks
@coderabbitai coderabbitai bot mentioned this pull request Apr 14, 2025
9 tasks
@coderabbitai coderabbitai bot mentioned this pull request May 27, 2025
9 tasks
@coderabbitai coderabbitai bot mentioned this pull request Jun 8, 2025
9 tasks
@coderabbitai coderabbitai bot mentioned this pull request Jul 9, 2025
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Guinea holidays
4 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载