+
Skip to content

Add Mali holidays #2725

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Add Mali holidays #2725

wants to merge 1 commit into from

Conversation

kritibirda26
Copy link
Collaborator

@kritibirda26 kritibirda26 commented Jul 15, 2025

Proposed change

Add Mali holidays.
Resolves #1224.

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 Jul 15, 2025

Summary by CodeRabbit

  • New Features
    • Added support for Mali's national and religious holidays, including accurate date calculations and localization in French and English.
    • Mali is now listed as a supported country, with country codes ML and MLI.
  • Documentation
    • Updated documentation to include Mali in the list of supported countries and languages.
  • Tests
    • Introduced comprehensive tests to verify Mali holiday calculations and localization.

Walkthrough

Support for Mali's holidays has been added, including a new country module, localizations in French and English, registry updates, documentation, and a comprehensive test suite. The implementation defines Mali's public holidays, integrates Islamic holiday calculations, and ensures localization and alias support.

Changes

Files/Paths Change Summary
README.md Updated documentation to add Mali as a supported country with language details.
holidays/countries/init.py, holidays/registry.py Added Mali to country imports and registry.
holidays/countries/mali.py New module implementing Mali holiday logic, Islamic holiday mapping, and country aliases.
holidays/locale/en_US/LC_MESSAGES/ML.po New English localization file for Mali holiday names.
holidays/locale/fr/LC_MESSAGES/ML.po New French localization file for Mali holiday names.
tests/countries/test_mali.py New test suite verifying Mali holiday rules, localizations, and date coverage.

Suggested labels

l10n, test

Suggested reviewers

  • arkid15r
  • PPsyrius
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share
🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need 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)

  • @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 generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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

Copy link

codecov bot commented Jul 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (76d2171) to head (cdc01de).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2725   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          264       265    +1     
  Lines        15783     15824   +41     
  Branches      2133      2137    +4     
=========================================
+ Hits         15783     15824   +41     

☔ 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.

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.

Great research!

Comment on lines +17 to +21
from holidays.groups import (
ChristianHolidays,
InternationalHolidays,
IslamicHolidays,
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
from holidays.groups import (
ChristianHolidays,
InternationalHolidays,
IslamicHolidays,
)
from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays


def _populate_public_holidays(self):
# New Year's Day.
self._add_new_years_day(tr("Jour de l'an"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
self._add_new_years_day(tr("Jour de l'an"))
self._add_new_years_day(tr("Jour de l'An"))

self._add_easter_monday(tr("Lundi de Pâques"))

# Labor Day.
self._add_labor_day(tr("Fête du travail"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
self._add_labor_day(tr("Fête du travail"))
self._add_labor_day(tr("Fête du Travail"))


if self._year >= 1965:
# Africa Day.
self._add_holiday_may_25(tr("Journée de l'Afrique"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
self._add_holiday_may_25(tr("Journée de l'Afrique"))
self._add_africa_day(tr("Journée de l'Afrique"))

self._add_mawlid_day(tr("Journée du Mawloud"))

# Eid al-Fitr.
self._add_eid_al_fitr_day(tr("Journée de la fête du Ramadan"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
self._add_eid_al_fitr_day(tr("Journée de la fête du Ramadan"))
self._add_eid_al_fitr_day(tr("Journée de la Fête du Ramadan"))

All names - from Law No. 40.


# Prophet's Birthday.
self._add_mawlid_day(tr("Journée du Mawloud"))

Copy link
Collaborator

Choose a reason for hiding this comment

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

Law No. 40 estaablished also Prophet's Baptism:

Journées du Maouloud (Naissance et Baptême) ;

Copy link
Collaborator

Choose a reason for hiding this comment

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

AFAIK it's included in the original Ordinance no. 54 of 1960 as well:
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

There is only Prophet's Birthday itself (Journée, day).

Comment on lines +65 to +66
# March 26 Day.
self._add_holiday_mar_26(tr("Journée du 26 mars"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe "Martyrs' Day" as en_US translation?

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 Mali holidays
3 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载