Update India holidays: add missing Mizoram state holidays#3388
Update India holidays: add missing Mizoram state holidays#3388mengChengxi wants to merge 1 commit intovacanza:devfrom
Conversation
WalkthroughAdds four fixed-date Mizoram holidays (Missionary Day Jan 11, YMA Day Jun 15, Remna Ni Jun 30, MHIP Day Jul 6), updates India docstring reference, extends tests across multiple locales for 2018, and appends contributor Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@holidays/countries/india.py`:
- Around line 42-43: In the Mizoram entry in india.py, remove the accidental
suffix "_populate_subdiv_mz_public_holidays" that was appended to the archived
URL so the citation URL is valid, and reformat the Mizoram block to match other
states by placing the source as a bulleted line (prefix with the same "* "
bullet and keep the URL in angle brackets with the trailing underscore for the
Sphinx-style reference) under the "Mizoram:" key; locate the "Mizoram:" entry in
the file to make this change.
- Around line 421-430: The new MZ holidays were added via _add_holiday_jan_11,
_add_holiday_feb_20, _add_holiday_jun_15, _add_holiday_jun_30 and
_add_holiday_jul_6 but the corresponding country snapshot (IN_MZ snapshot) and
India locale catalogs were not regenerated; run the repo's snapshot and
localization generators (make snapshot and make l10n) to update the IN_MZ
snapshot and India locale files so the four holidays are present in snapshots
and translation catalogs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 4edb41c6-fb54-4e76-b145-467248beeebc
📒 Files selected for processing (3)
CONTRIBUTORSholidays/countries/india.pytests/countries/test_india.py
holidays/countries/india.py
Outdated
| Mizoram: | ||
| * <https://web.archive.org/web/20250114025233/https://dipr.mizoram.gov.in/page/government-holiday-2024>_populate_subdiv_mz_public_holidays |
There was a problem hiding this comment.
Fix the malformed Mizoram source reference.
Line 43 appends _populate_subdiv_mz_public_holidays to the URL, so the citation is malformed. Also keep Mizoram: aligned with the bullet style used for other states.
Suggested docstring fix
- Mizoram:
- * <https://web.archive.org/web/20250114025233/https://dipr.mizoram.gov.in/page/government-holiday-2024>_populate_subdiv_mz_public_holidays
+ * Mizoram:
+ * <https://web.archive.org/web/20250114025233/https://dipr.mizoram.gov.in/page/government-holiday-2024>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Mizoram: | |
| * <https://web.archive.org/web/20250114025233/https://dipr.mizoram.gov.in/page/government-holiday-2024>_populate_subdiv_mz_public_holidays | |
| * Mizoram: | |
| * <https://web.archive.org/web/20250114025233/https://dipr.mizoram.gov.in/page/government-holiday-2024> |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@holidays/countries/india.py` around lines 42 - 43, In the Mizoram entry in
india.py, remove the accidental suffix "_populate_subdiv_mz_public_holidays"
that was appended to the archived URL so the citation URL is valid, and reformat
the Mizoram block to match other states by placing the source as a bulleted line
(prefix with the same "* " bullet and keep the URL in angle brackets with the
trailing underscore for the Sphinx-style reference) under the "Mizoram:" key;
locate the "Mizoram:" entry in the file to make this change.
| # Missionary Day. | ||
| self._add_holiday_jan_11(tr("Missionary Day")) | ||
| # Mizoram State Day. | ||
| self._add_holiday_feb_20(tr("Mizoram State Day")) | ||
| # YMA Day. | ||
| self._add_holiday_jun_15(tr("YMA Day")) | ||
| # Remna Ni. | ||
| self._add_holiday_jun_30(tr("Remna Ni")) | ||
| # MHIP Day. | ||
| self._add_holiday_jul_6(tr("MHIP Day")) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
names=("Missionary Day" "YMA Day" "Remna Ni" "MHIP Day")
echo "== Snapshot check: snapshots/countries/IN_MZ.json =="
for n in "${names[@]}"; do
echo "-- $n"
rg -n --fixed-strings "$n" snapshots/countries/IN_MZ.json || true
done
echo
echo "== Locale catalog check: holidays/locale/*/LC_MESSAGES/IN.po =="
for n in "${names[@]}"; do
echo "-- msgid \"$n\""
rg -n --fixed-strings "msgid \"$n\"" holidays/locale/*/LC_MESSAGES/IN.po || true
doneRepository: vacanza/holidays
Length of output: 315
Sync snapshot and locale artifacts with the new MZ holidays.
The four holidays (Missionary Day, YMA Day, Remna Ni, MHIP Day) are missing from both snapshots/countries/IN_MZ.json and the India locale catalogs. Run make snapshot and make l10n to regenerate these artifacts so regression coverage is complete.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@holidays/countries/india.py` around lines 421 - 430, The new MZ holidays were
added via _add_holiday_jan_11, _add_holiday_feb_20, _add_holiday_jun_15,
_add_holiday_jun_30 and _add_holiday_jul_6 but the corresponding country
snapshot (IN_MZ snapshot) and India locale catalogs were not regenerated; run
the repo's snapshot and localization generators (make snapshot and make l10n) to
update the IN_MZ snapshot and India locale files so the four holidays are
present in snapshots and translation catalogs.
|
There was a problem hiding this comment.
♻️ Duplicate comments (1)
holidays/countries/india.py (1)
42-43:⚠️ Potential issue | 🟡 MinorFix malformed Mizoram reference URL.
Line 43 appends
_populate_subdiv_mz_public_holidaysto the archive URL, which breaks the citation format.🛠️ Proposed fix
- * Mizoram: - * <https://web.archive.org/web/20250114025233/https://dipr.mizoram.gov.in/page/government-holiday-2024>_populate_subdiv_mz_public_holidays> + * Mizoram: + * <https://web.archive.org/web/20250114025233/https://dipr.mizoram.gov.in/page/government-holiday-2024>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@holidays/countries/india.py` around lines 42 - 43, The Mizoram archive URL in holidays/countries/india.py is malformed because the trailing suffix "_populate_subdiv_mz_public_holidays" was appended directly to the URL; locate the line containing the fragment "_populate_subdiv_mz_public_holidays" and remove that suffix so the archive link ends at the .gov.in URL, and if you intended a reference label keep it as a separate footnote/reference (e.g., use the proper reST/Markdown reference syntax) rather than attaching it to the URL.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@holidays/countries/india.py`:
- Around line 42-43: The Mizoram archive URL in holidays/countries/india.py is
malformed because the trailing suffix "_populate_subdiv_mz_public_holidays" was
appended directly to the URL; locate the line containing the fragment
"_populate_subdiv_mz_public_holidays" and remove that suffix so the archive link
ends at the .gov.in URL, and if you intended a reference label keep it as a
separate footnote/reference (e.g., use the proper reST/Markdown reference
syntax) rather than attaching it to the URL.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: a93df287-e875-41b9-bc5d-5a9245ce9742
📒 Files selected for processing (3)
CONTRIBUTORSholidays/countries/india.pytests/countries/test_india.py
|
Hi @KJhellico @PPsyrius, I noticed the heads-up from CodeRabbitAI! I've successfully implemented and verified the holiday logic for Mizoram (MZ) in india.py and aligned the 2018 tests. However, I'm encountering some environment problems on my local mac (missing uv and l10n dependencies) which make me impossible to successfully run make l10n and regenerating the snapshot JSONs. Since the core logic and manual test cases are solid, would you mind helping me trigger the snapshot/l10n regeneration upon merge? Or if there's a specific command I can use to let GitHub Actions handle the artifact updates, please let me know. I'm eager to learn the project's standard workflow! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #3388 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 310 310
Lines 18585 18589 +4
Branches 2380 2380
=========================================
+ Hits 18585 18589 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
PPsyrius
left a comment
There was a problem hiding this comment.
Note that India holidays implementation might be a bit overwhelming for first-time contributors (Public vs Restricted (OPTIONAL) holidays list, non-fixed calendars, lots of existing l10n support, etc)
Given your background, you might find implementing SSE or HKSE financial market holidays more approachable. That said, it will still require some research - see #3270 and #3271 for implemented examples.
| * Gujarat: | ||
| * <https://web.archive.org/web/20260122052040/https://images-gujarati.indianexpress.com/2025/11/gujarat-government-Year-2026-holiday-list.pdf> | ||
| * Mizoram: | ||
| * <https://web.archive.org/web/20250114025233/https://dipr.mizoram.gov.in/page/government-holiday-2024>_populate_subdiv_mz_public_holidays> |
There was a problem hiding this comment.
The reference you provide seems to be inaccessible - so I've replaced with ones with archive records from 2004-2024
| * <https://web.archive.org/web/20250114025233/https://dipr.mizoram.gov.in/page/government-holiday-2024>_populate_subdiv_mz_public_holidays> | |
| * <https://web.archive.org/web/20260324051214/http://mizoram.nic.in/gov/hols.htm> |
| # Mizoram State Day. | ||
| self._add_holiday_feb_20(tr("Mizoram State Day")) |
There was a problem hiding this comment.
Chapchar Kut seems to be missing here
| # Mizoram State Day. | |
| self._add_holiday_feb_20(tr("Mizoram State Day")) | |
| # Mizoram State Day. | |
| self._add_holiday_feb_20(tr("Mizoram State Day")) | |
| # Chapchar Kut. | |
| name = tr("Chapchar Kut") | |
| if self._year >= 2011: | |
| self._add_holiday_1st_fri_of_mar(name) | |
| else: | |
| self._add_holiday_2nd_fri_of_mar(name) |
Hi @PPsyrius, thank you for the guidance! You are right—diving straight into the complex variants and l10n integrations of the India module might be to hard for my first PR. I really appreciate you pointing me towards the financial markets. Given my background, implementing the SSE (Shanghai Stock Exchange) calendar is a better starting point. I've already started reviewing the implementation patterns in #3270 and #3271. I will research the specific SSE closure rules and draft a PR. Once I get familiar with the codebase through this, I'd love to circle back to the broader l10n architectural discussion (#1658). Thanks again for the mentorship! |
@PPsyrius I'm actually doing some research on them right now and have a question: When adding a new stock market, is the library's standard to start from ~2016, or should we aim to include deep historical data? I ask because while cross-referencing the recent XETR addition with the official Deutsche Börse calendar, I noticed germany_exchange.py seems to be missing some historical dates, regional early-closes, and settlement-only days. I dropped a message in the Slack group regarding the financial calendars. If you get some free time, I'd really appreciate your thoughts over there so I can guide my further research. Thanks ! |
|
@pareshjoshij Ideally, we want to implement it as far as our reference sources are available - it's just that for our Germany Stock Exchange case, their per-year online record only went back that far, unlike the NYSE for example |



Proposed change
Closes #3380.
Added missing fixed-date public holidays for Mizoram (MZ) subdivision in India. These include Missionary Day (Jan 11), YMA Day (Jun 15), Remna Ni (Jun 30), and MHIP Day (Jul 6).
And, I also updated the 2018 snapshot tests and all localization test cases to ensure the project maintains 100% test coverage.
Your PR description goes here.
Type of change
holidaysfunctionality in general)Checklist
make checklocally; all checks and tests passed.