Skip to content
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 Iran holidays #1409

Merged
merged 7 commits into from
Aug 21, 2023
Merged

Add Iran holidays #1409

merged 7 commits into from
Aug 21, 2023

Conversation

KJhellico
Copy link
Collaborator

@KJhellico KJhellico commented Aug 3, 2023

Proposed change

Closes #1202.

  • Add Iran holidays
  • Add Persian (Solar Hijri) calendar for 1901-2100 years
  • Add Islamic holidays (specific to Iran) to IslamicHolidays

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/upgrade)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (a code change causing existing functionality to break)
  • New feature (new python-holidays functionality in general)

Checklist

  • I've followed the contributing guidelines
  • This PR is filed against beta branch of the repository
  • This PR doesn't contain any merge conflicts and has clean commit history
  • The code style looks good: make pre-commit
  • All tests pass locally: make test, make tox (we strongly encourage adding tests to your code)
  • The related documentation has been added/updated (check off the box for free if no updates is required)

@KJhellico KJhellico requested a review from arkid15r August 3, 2023 16:22
@KJhellico
Copy link
Collaborator Author

@xmha97, please look at Farsi translation, if you can.

@coveralls
Copy link

coveralls commented Aug 8, 2023

Pull Request Test Coverage Report for Build 5834193808

  • 182 of 182 (100.0%) changed or added relevant lines in 8 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 5788118002: 0.0%
Covered Lines: 9291
Relevant Lines: 9291

💛 - Coveralls

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.

This is a huge contribution!

holidays/calendars/persian.py Outdated Show resolved Hide resolved
holidays/countries/iran.py Show resolved Hide resolved

def __init__(self, *args, **kwargs):
IslamicHolidays.__init__(self)
self.pcal = _Persian()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest using more descriptive names e.g., persian_calendar.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You mean persian_calendar instead of pcal? Then _add_holiday(... won't fit in one line 🙄

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, Persian holidays group would help with that.

holidays/locale/en_US/LC_MESSAGES/IR.po Outdated Show resolved Hide resolved
tests/calendars/test_persian.py Outdated Show resolved Hide resolved
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.

lgtm 👍

@xmha97 could you review the names when you have a chance?


def __init__(self, *args, **kwargs):
IslamicHolidays.__init__(self)
self.pcal = _Persian()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, Persian holidays group would help with that.

@arkid15r arkid15r added the ready for beta Ready to merge on beta branch label Aug 11, 2023
# Conflicts:
#	holidays/holiday_groups.py
@arkid15r arkid15r merged commit 51a466c into vacanza:beta Aug 21, 2023
@arkid15r arkid15r removed the ready for beta Ready to merge on beta branch label Aug 21, 2023
@KJhellico KJhellico deleted the add-iran-holidays branch August 21, 2023 16:22
This was referenced Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants