Skip to content

Commit

Permalink
Merge pull request #1685 from vacanza/beta
Browse files Browse the repository at this point in the history
v0.42
  • Loading branch information
KJhellico committed Feb 5, 2024
2 parents decf58b + 3e9fc5a commit e66ce0c
Show file tree
Hide file tree
Showing 427 changed files with 25,609 additions and 27,371 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- uses: browniebroke/pre-commit-autoupdate-action@v1.0.0

- uses: peter-evans/create-pull-request@v5.0.2
- uses: peter-evans/create-pull-request@v6.0.0
with:
base: beta
body: Update pre-commit hooks to their latest versions.
Expand Down
36 changes: 13 additions & 23 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,19 @@ repos:
exclude_types:
- rst

- repo: https://github.com/python/black
rev: 23.12.1
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.0
hooks:
- id: black
exclude: ^(docs)
language_version: python3
- id: ruff
- id: ruff-format

- repo: https://github.com/pycqa/flake8
rev: 7.0.0
- repo: https://github.com/myint/rstcheck
rev: v6.2.0
hooks:
- id: flake8
- id: rstcheck
additional_dependencies:
- flake8-print
args: [--max-line-length=99]
exclude: ^(docs)

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
exclude: ^(docs)
- rstcheck
- sphinx

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
Expand All @@ -55,13 +47,11 @@ repos:
hooks:
- id: rst-backticks

- repo: https://github.com/myint/rstcheck
rev: v6.2.0
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: rstcheck
additional_dependencies:
- rstcheck
- sphinx
- id: isort
exclude: ^(docs)

- repo: https://github.com/tox-dev/tox-ini-fmt
rev: '1.3.1'
Expand Down
20 changes: 20 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
Version 0.42
============

Released February 5, 2024

- Add Ghana holidays (#1639 by @JerryAgbesi, @arkid15r)
- Add Jersey holidays (#1664 by @PPsyrius)
- Update Costa Rica holidays (#1657 by @KJhellico)
- Update Croatia holidays (#1659 by @KJhellico)
- Update Greece holidays (#1663 by @KJhellico)
- Update Switzerland holidays (#1648 by @KJhellico)
- Update United Arab Emirates holidays (#1667 by @KJhellico)
- Update ruff config (#1684 by @KJhellico)
- 2020 China calendar discrepancies fix (#1645 by @PPsyrius)
- Add United Kingdom's Whit Monday holidays for pre-1971 years (#1668 by @PPsyrius)
- Ruff cleanup (#1680 by @PPsyrius, @arkid15r)
- Unify common holidays name translation (#1673 by @KJhellico)
- Use current version for release notes generation (#1661 by @arkid15r)
- Use ruff instead of black+flake8 (#1671 by @arkid15r)

Version 0.41
============

Expand Down
18 changes: 14 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Available Countries
.. _ISO 639-1 code: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
.. _ISO 639-2 code: https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes

We currently support 141 country codes. The standard way to refer to a country
We currently support 143 country codes. The standard way to refer to a country
is by using its `ISO 3166-1 alpha-2 code`_, the same used for domain names, and
for a subdivision its `ISO 3166-2 code`_. Some of the countries support more
than one language for holiday names output.
Expand Down Expand Up @@ -342,7 +342,7 @@ All other default values are highlighted with bold:
- CR
-
- en_US, **es**, uk
-
- OPTIONAL
* - Croatia
- HR
-
Expand Down Expand Up @@ -438,6 +438,11 @@ All other default values are highlighted with bold:
- States: BB, BE, BW, BY, BYP, HB, HE, HH, MV, NI, NW, RP, SH, SL, SN, ST, TH
- **de**, en_US, uk
-
* - Ghana
- GH
-
-
-
* - Greece
- GR
-
Expand Down Expand Up @@ -518,6 +523,11 @@ All other default values are highlighted with bold:
-
- en_US, **ja**, th
- BANK
* - Jersey
- JE
-
-
-
* - Kazakhstan
- KZ
-
Expand Down Expand Up @@ -770,9 +780,9 @@ All other default values are highlighted with bold:
-
* - Switzerland
- CH
- Cantons: AG, AR, AI, BL, BS, BE, FR, GE, GL, GR, JU, LU, NE, NW, OW, SG, SH, SZ, SO, TG, TI, UR, VD, VS, ZG, ZH
- Cantons: AG, AI, AR, BL, BS, BE, FR, GE, GL, GR, JU, LU, NE, NW, OW, SG, SH, SZ, SO, TG, TI, UR, VD, VS, ZG, ZH
- **de**, en_US, fr, it, uk
-
- HALF_DAY, OPTIONAL
* - Taiwan
- TW
-
Expand Down
3 changes: 1 addition & 2 deletions RELEASE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ How to release a new version of Python Holidays
- switch to ``beta`` branch and pull the most recent changes
from https://github.com/vacanza/python-holidays remote ``beta`` branch.
- generate release notes by running the following script
``scripts/generate_release_notes.py -t <version>``, where <version> is the
value of tag/version you're going to release, e.g. 0.39
``scripts/generate_release_notes.py``
- insert the script's output into the top of ``CHANGES`` file
(see previous release notes for consistent formatting)
- commit the updated ``CHANGES`` file to ``beta`` branch with the following
Expand Down
2 changes: 1 addition & 1 deletion holidays/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from holidays.registry import EntityLoader
from holidays.utils import *

__version__ = "0.41"
__version__ = "0.42"


EntityLoader.load("countries", globals())
Expand Down
2 changes: 2 additions & 0 deletions holidays/countries/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
from .gabon import Gabon, GA, GAB
from .georgia import Georgia, GE, GEO
from .germany import Germany, DE, DEU
from .ghana import Ghana, GH, GHA
from .greece import Greece, GR, GRC
from .guam import Guam, GU, GUM, HolidaysGU
from .guatemala import Guatemala, GT, GUA
Expand All @@ -80,6 +81,7 @@
from .italy import Italy, IT, ITA
from .jamaica import Jamaica, JM, JAM
from .japan import Japan, JP, JPN
from .jersey import Jersey, JE, JEY
from .kazakhstan import Kazakhstan, KZ, KAZ
from .kenya import Kenya, KE, KEN
from .kyrgyzstan import Kyrgyzstan, KG, KGZ
Expand Down
17 changes: 9 additions & 8 deletions holidays/countries/algeria.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ class Algeria(HolidayBase, InternationalHolidays, IslamicHolidays):
"""
References:
- https://en.wikipedia.org/wiki/Public_holidays_in_Algeria
As of April 30, 2023. Algeria has 3 days of Eid holidays
(https://www.horizons.dz/english/archives/amp/12021)
"""

country = "DZ"
default_language = "ar"
# Estimated label.
# %s (estimated).
estimated_label = tr("(تقدير) %s")
supported_languages = ("ar", "en_US", "fr")

Expand All @@ -38,7 +42,7 @@ def _populate_public_holidays(self):

# In January 2018, Algeria declared Yennayer a national holiday.
if self._year >= 2018:
# Amazigh New Year / Yennayer.
# Amazigh New Year.
self._add_holiday_jan_12(tr("رأس السنة الأمازيغية"))

# Labor Day.
Expand All @@ -58,20 +62,17 @@ def _populate_public_holidays(self):
# Ashura.
self._add_ashura_day(tr("عاشورة"))

# Mawlid / Prophet's Birthday.
# Prophet's Birthday.
self._add_mawlid_day(tr("عيد المولد النبوي"))

# As of April 30, 2023. Algeria has 3 days of Eid holidays
# (https://www.horizons.dz/english/archives/amp/12021)

# Eid al-Fitr - Feast Festive.
# Eid al-Fitr.
self._add_eid_al_fitr_day(tr("عيد الفطر"))
# Eid al-Fitr Holiday.
self._add_eid_al_fitr_day_two(tr("عطلة عيد الفطر"))
if self._year >= 2024:
self._add_eid_al_fitr_day_three(tr("عطلة عيد الفطر"))

# Eid al-Adha - Scarfice Festive.
# Eid al-Adha.
self._add_eid_al_adha_day(tr("عيد الأضحى"))
# Eid al-Adha Holiday.
self._add_eid_al_adha_day_two(tr("عطلة عيد الأضحى"))
Expand Down
6 changes: 2 additions & 4 deletions holidays/countries/angola.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,9 @@ def _populate_public_holidays(self):
tr("Dia de Natal e da Família")
if self._year >= 2011
else (
# Christmas Day.
tr("Dia do Natal")
tr("Dia do Natal") # Christmas Day.
if self._year >= 1996
# Family Day.
else tr("Dia da Família")
else tr("Dia da Família") # Family Day.
)
)
dt = self._add_christmas_day(name)
Expand Down
4 changes: 2 additions & 2 deletions holidays/countries/argentina.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def _populate_public_holidays(self):
# Restarted in 2011 via Decreto 1584/2010.

if 1956 <= self._year <= 1975 or self._year >= 2011:
# Carnival.
# Carnival Day.
name = tr("Día de Carnaval")
self._add_carnival_monday(name)
self._add_carnival_tuesday(name)
Expand Down Expand Up @@ -176,7 +176,7 @@ def _populate_public_holidays(self):
# Immaculate Conception.
self._add_immaculate_conception_day(tr("Inmaculada Concepción de María"))

# Christmas.
# Christmas Day.
self._add_christmas_day(tr("Navidad"))

# Movable Holidays
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/armenia.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def _populate_public_holidays(self):
# Motherhood and Beauty Day.
self._add_holiday_apr_7(tr("Մայրության և գեղեցկության տոն"))

# Armenian Genocide Remembrance Day,
# Armenian Genocide Remembrance Day.
self._add_holiday_apr_24(tr("Եղեռնի զոհերի հիշատակի օր"))

if self._year >= 2001:
Expand Down
6 changes: 2 additions & 4 deletions holidays/countries/aruba.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,9 @@ def _populate_public_holidays(self):
tr("Dia di Rey")
if self._year >= 2021
else (
# King's Day.
tr("Aña di Rey")
tr("Aña di Rey") # King's Day.
if self._year >= 2014
# Queen's Day.
else tr("Aña di La Reina")
else tr("Aña di La Reina") # Queen's Day.
)
)
if self._year >= 2014:
Expand Down
19 changes: 8 additions & 11 deletions holidays/countries/bahrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Bahrain(HolidayBase, InternationalHolidays, IslamicHolidays):

country = "BH"
default_language = "ar"
# Estimated label.
# %s (estimated).
estimated_label = tr("(تقدير) %s")
supported_languages = ("ar", "en_US")
weekend = {FRI, SAT}
Expand All @@ -42,7 +42,7 @@ def _populate_public_holidays(self):
# New Year's Day.
self._add_new_years_day(tr("رأس السنة الميلادية"))

# Labour day.
# Labor Day.
self._add_labor_day(tr("عيد العمال"))

# Eid Al Fitr.
Expand All @@ -53,23 +53,20 @@ def _populate_public_holidays(self):
self._add_eid_al_fitr_day_three(tr("عطلة عيد الفطر"))

# Eid Al Adha.
eid_al_adha = tr("عيد الأضحى")
self._add_eid_al_adha_day(eid_al_adha)
self._add_eid_al_adha_day(tr("عيد الأضحى"))
# Eid Al Adha Holiday.
self._add_eid_al_adha_day_two(tr("عطلة عيد الأضحى"))
self._add_eid_al_adha_day_three(tr("عطلة عيد الأضحى"))

# Al Hijra New Year.
hijri_new_year = tr("رأس السنة الهجرية")
self._add_islamic_new_year_day(hijri_new_year)
# Islamic New Year.
self._add_islamic_new_year_day(tr("رأس السنة الهجرية"))

# Ashura.
ashura = tr("عاشورة")
# Ashura Eve.
self._add_ashura_eve(tr("ليلة عاشورة"))
self._add_ashura_day(ashura)
# Ashura.
self._add_ashura_day(tr("عاشورة"))

# Prophets Birthday.
# Prophet's Birthday.
self._add_mawlid_day(tr("عيد المولد النبوي"))

# National Day.
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/belarus.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _populate_public_holidays(self):
# Radunitsa (Day of Rejoicing).
self._add_rejoicing_day(tr("Радаўніца"))

# Labour Day.
# Labor Day.
self._add_labor_day(tr("Свята працы"))

# Victory Day.
Expand Down
4 changes: 2 additions & 2 deletions holidays/countries/belgium.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _populate_public_holidays(self):
# New Year's Day.
self._add_new_years_day(tr("Nieuwjaar"))

# Easter.
# Easter Sunday.
self._add_easter_sunday(tr("Pasen"))

# Easter Monday.
Expand All @@ -60,7 +60,7 @@ def _populate_public_holidays(self):
# National Day.
self._add_holiday_jul_21(tr("Nationale feestdag"))

# Assumption of Mary.
# Assumption Day.
self._add_assumption_of_mary_day(tr("O. L. V. Hemelvaart"))

# All Saints' Day.
Expand Down

0 comments on commit e66ce0c

Please sign in to comment.