Skip to content

Update Iran holidays: add special holidays support#3304

Merged
KJhellico merged 1 commit intovacanza:devfrom
PPsyrius:iran_special
Mar 2, 2026
Merged

Update Iran holidays: add special holidays support#3304
KJhellico merged 1 commit intovacanza:devfrom
PPsyrius:iran_special

Conversation

@PPsyrius
Copy link
Copy Markdown
Collaborator

@PPsyrius PPsyrius commented Mar 2, 2026

Proposed change

  • Add Iran's national-level special holidays (2026 Mar 1-7, 2023 Aug 1-2).
  • Fix "Death of Imam Khomeini" - this should no longer appears prior to 1989.

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 39f2dce and c5eb949.

📒 Files selected for processing (5)
  • holidays/countries/iran.py
  • holidays/locale/en_US/LC_MESSAGES/IR.po
  • holidays/locale/fa_IR/LC_MESSAGES/IR.po
  • snapshots/countries/IR_COMMON.json
  • tests/countries/test_iran.py

Summary by CodeRabbit

  • New Features

    • Added new public holidays for Iran in 2023 (August 1-2) and 2026 (March 1-7).
  • Bug Fixes

    • Corrected Death of Imam Khomeini holiday to apply only from 1989 onwards.
  • Documentation

    • Updated localization and translations for Iran holidays across supported languages.

Walkthrough

This PR integrates StaticHolidays into the Iran holiday system by adding a new IranStaticHolidays class with special holidays for 2023 and 2026, making Death of Imam Khomeini conditional on 1989 or later, and updating locale translations and test cases.

Changes

Cohort / File(s) Summary
Core Implementation
holidays/countries/iran.py
Added StaticHolidays integration to Iran class inheritance, introduced new IranStaticHolidays class with special_public_holidays mapping for 2023 and 2026, made Death of Imam Khomeini conditional (1989 or later).
Localization
holidays/locale/en_US/LC_MESSAGES/IR.po, holidays/locale/fa_IR/LC_MESSAGES/IR.po
Updated metadata (version, revision date, translator) and added new translation entry for "Public Holiday".
Test & Snapshots
tests/countries/test_iran.py, snapshots/countries/IR_COMMON.json
Updated test expectations for Death of Imam Khomeini (1989+), added test_special_holidays, expanded localization test data, removed pre-1989 "Death of Imam Khomeini" entries from snapshot and added new 2023 and 2026 "Public Holiday" entries.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

l10n, snapshot, test

Suggested reviewers

  • arkid15r
  • KJhellico
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding special holidays support to Iran's holiday calculations.
Description check ✅ Passed The description is directly related to the changeset, explaining the two key changes: adding special holidays for 2026 and 2023, and fixing the Death of Imam Khomeini date range.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • 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

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Mar 2, 2026

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (39f2dce) to head (c5eb949).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3304   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          307       307           
  Lines        18455     18460    +5     
  Branches      2368      2369    +1     
=========================================
+ Hits         18455     18460    +5     

☔ 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
Copy Markdown
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!

@KJhellico KJhellico added this pull request to the merge queue Mar 2, 2026
Merged via the queue into vacanza:dev with commit 5d69cd1 Mar 2, 2026
32 checks passed
@KJhellico KJhellico mentioned this pull request Mar 2, 2026
@PPsyrius PPsyrius deleted the iran_special branch March 4, 2026 02:45
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.

2 participants