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

v0.38 #1581

Merged
merged 15 commits into from
Dec 4, 2023
Merged

v0.38 #1581

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 2 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ Your PR description goes here.
-->

- [ ] I've followed the [contributing guidelines][contributing-guidelines]
- [ ] I've added references to all holidays information sources used in this PR
- [ ] The code style looks good: `make pre-commit` command generates no changes
- [ ] All tests pass locally: `make test`, `make tox` (we strongly encourage adding tests to your code)
- [ ] I've run `make pre-commit`, it didn't generate any changes
- [ ] I've run `make test`, all tests passed locally

<!--
Thanks again for your contribution!
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
*.DS_Store
*.egg-info
*.mo
*.pot
*.pyc
build/*
coverage.lcov
dist/
docs/build
holidays/locale/pot
docs/source/_autosummary
holidays/locale/pot/*.pot
!holidays/locale/pot/UA.pot
MANIFEST
Pipfile
venv/
20 changes: 14 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ repos:
- id: check-builtin-literals
- id: check-yaml
- id: end-of-file-fixer
exclude_types:
- rst
- id: fix-encoding-pragma
args: [--remove]
args:
- --remove
- id: mixed-line-ending
args: [--fix=lf]
args:
- --fix=lf
- id: trailing-whitespace
exclude_types:
- rst

- repo: https://github.com/python/black
rev: 23.11.0
Expand All @@ -35,14 +41,14 @@ repos:
exclude: ^(docs)

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.0
rev: v1.7.1
hooks:
- id: mypy
additional_dependencies: [types-all]
args:
- --ignore-missing-imports
- --show-error-codes
- --implicit-optional
- --show-error-codes

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
Expand All @@ -53,10 +59,12 @@ repos:
rev: v6.2.0
hooks:
- id: rstcheck
additional_dependencies: [rstcheck, sphinx]
additional_dependencies:
- rstcheck
- sphinx

- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "1.3.1"
rev: '1.3.1'
hooks:
- id: tox-ini-fmt

Expand Down
17 changes: 17 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
Version 0.38
============

Released December 4, 2023

- Add categories and subdivisions support to special observed holidays (#1561 by @KJhellico)
- Add categories and subdivisions support to substituted holidays (#1558 by @KJhellico)
- Update Czechia holidays: add sk localization (#1568 by @jose1711, @arkid15r)
- Update PR template and contributing guidelines (#1574 by @arkid15r)
- Update documentation: add supported entities section (#1564 by @arkid15r)
- Update snapshot generator: group holidays by subdiv (#1578 by @KJhellico)
- Update test coverage to 100% (#1573 by @arkid15r)
- Add supported categories validation (#1576 by @arkid15r)
- Merge substituted holidays with special holidays (#1580 by @KJhellico)
- Migrate South Korea holidays to ObservedHolidayBase (#1560 by @KJhellico)
- Prepare project for Weblate integration [UA] (#1565 by @arkid15r)

Version 0.37
============

Expand Down
11 changes: 6 additions & 5 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ Basics

When contributing with fixes and new features, please start forking/branching
from the `beta branch`_ to work on the latest code and reduce merging issues.

Contributed PRs_ are required to include valid test coverage **(the goal is
100% coverage)** in order to be merged. Please don't hesitate to ask for
help if you'read struggling with tests.
If you add/change holiday official dates or names you must include references to
all sources (government sites, archived web pages, wiki pages, etc) you've used
while working on this PR. Contributed PRs_ are required to include valid test
coverage in order to be merged. Please don't hesitate to ask for help if you
need one with the tests.

Thanks a lot for your support.

Expand Down Expand Up @@ -77,7 +78,7 @@ Use pytest directly if you need ``-s`` option:


Localization
--------------------------
------------
.. _ISO 639-1 codes: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

In order to add or update existing holiday names translation you'll need to
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ clean:
find . -name *.pyc -delete
rm -rf .mypy_cache/*
rm -rf .pytest_cache/*
rm -rf docs/build/*

coverage:
pytest --cov=. --cov-config=pyproject.toml --cov-report term-missing --dist loadscope --no-cov-on-fail --numprocesses auto
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ The list of supported countries, their subdivisions, supported languages and cat
* - Czechia
- CZ
-
- **cs**, en_US, uk
- **cs**, en_US, sk, uk
-
* - Denmark
- DK
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
"undoc-members": True,
# 'private-members': False, # default
# 'special-members': False, # default
"inherited-members": True,
"inherited-members": False, # Disabled due to performance concerns.
"show-inheritance": True,
# 'ignore-module-all': False, # default
# 'imported-members': False, # default
Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
examples
contributing
api
Supported Entities <modules>
changelog
genindex

Expand Down
9 changes: 9 additions & 0 deletions docs/source/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Supported Entities
==================

.. autosummary::
:toctree: _autosummary
:recursive:

holidays.countries
holidays.financial
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.37"
__version__ = "0.38"


EntityLoader.load("countries", globals())
Expand Down
6 changes: 3 additions & 3 deletions holidays/calendars/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

# flake8: noqa: F401

from holidays.calendars.buddhist import _CustomBuddhistHolidays, _BuddhistLunisolar
from holidays.calendars.chinese import _CustomChineseHolidays, _ChineseLunisolar
from holidays.calendars.buddhist import _BuddhistLunisolar, _CustomBuddhistHolidays
from holidays.calendars.chinese import _ChineseLunisolar, _CustomChineseHolidays
from holidays.calendars.custom import _CustomCalendar
from holidays.calendars.gregorian import GREGORIAN_CALENDAR
from holidays.calendars.hebrew import _HebrewLunisolar
from holidays.calendars.hindu import _HinduLunisolar, _CustomHinduHolidays
from holidays.calendars.hindu import _CustomHinduHolidays, _HinduLunisolar
from holidays.calendars.islamic import _CustomIslamicHolidays, _IslamicLunar
from holidays.calendars.julian import JULIAN_CALENDAR
from holidays.calendars.julian_revised import JULIAN_REVISED_CALENDAR
Expand Down
16 changes: 0 additions & 16 deletions holidays/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,3 @@
HEBREW = "hebrew"
HINDU = "hindu"
ISLAMIC = "islamic"

ALL_CATEGORIES = {
ARMED_FORCES,
BANK,
CHINESE,
CHRISTIAN,
GOVERNMENT,
HALF_DAY,
HEBREW,
HINDU,
ISLAMIC,
OPTIONAL,
PUBLIC,
SCHOOL,
WORKDAY,
}
2 changes: 1 addition & 1 deletion holidays/countries/algeria.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from gettext import gettext as tr

from holidays.groups import IslamicHolidays, InternationalHolidays
from holidays.groups import InternationalHolidays, IslamicHolidays
from holidays.holiday_base import HolidayBase


Expand Down
24 changes: 12 additions & 12 deletions holidays/countries/angola.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@
class Angola(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays):
"""
References:
- https://en.wikipedia.org/wiki/Public_holidays_in_Angola
- http://www.siac.gv.ao/downloads/181029-Lei-Feriados.pdf
- [Decree #5/75] https://www.lexlink.eu/FileGet.aspx?FileId=3023486
- [Decree #92/80] https://www.lexlink.eu/FileGet.aspx?FileId=3023473
- [Decree #7/92] https://www.lexlink.eu/FileGet.aspx?FileId=3023485
- [Law #16/96] https://www.lexlink.eu/FileGet.aspx?FileId=3037036
- [Law #1/01] https://www.lexlink.eu/FileGet.aspx?FileId=3029035
- [Law #7/03] https://www.lexlink.eu/FileGet.aspx?FileId=3002131
- [Law #10/11] https://equadros.gov.ao/documents/40468/0/lei_10_11-1+%281%29.pdf
- [Law #11/18] https://equadros.gov.ao/documents/40468/0/Lei_no_11-18+%281%29.pdf
- https://www.officeholidays.com/countries/angola/
- https://www.timeanddate.com/holidays/angola/
- https://en.wikipedia.org/wiki/Public_holidays_in_Angola
- http://www.siac.gv.ao/downloads/181029-Lei-Feriados.pdf
- `Decree #5/75 <https://www.lexlink.eu/FileGet.aspx?FileId=3023486>`_
- [Decree #92/80] https://www.lexlink.eu/FileGet.aspx?FileId=3023473
- [Decree #7/92] https://www.lexlink.eu/FileGet.aspx?FileId=3023485
- [Law #16/96] https://www.lexlink.eu/FileGet.aspx?FileId=3037036
- [Law #1/01] https://www.lexlink.eu/FileGet.aspx?FileId=3029035
- [Law #7/03] https://www.lexlink.eu/FileGet.aspx?FileId=3002131
- [Law #10/11] https://equadros.gov.ao/documents/40468/0/lei_10_11-1+%281%29.pdf
- [Law #11/18] https://equadros.gov.ao/documents/40468/0/Lei_no_11-18+%281%29.pdf
- https://www.officeholidays.com/countries/angola/
- https://www.timeanddate.com/holidays/angola/
"""

country = "AO"
Expand Down
8 changes: 4 additions & 4 deletions holidays/countries/aruba.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@

class Aruba(HolidayBase, ChristianHolidays, InternationalHolidays):
"""
https://www.government.aw/information-public-services/hiring-people_47940/item/holidays_43823.html # noqa: E501
https://www.overheid.aw/informatie-dienstverlening/ondernemen-en-werken-subthemas_46970/item/feestdagen_37375.html # noqa: E501
https://www.gobierno.aw/informacion-tocante-servicio/haci-negoshi-y-traha-sub-topics_47789/item/dia-di-fiesta_41242.html # noqa: E501
https://www.government.aw/information-public-services/hiring-people_47940/item/holidays_43823.html
https://www.overheid.aw/informatie-dienstverlening/ondernemen-en-werken-subthemas_46970/item/feestdagen_37375.html
https://www.gobierno.aw/informacion-tocante-servicio/haci-negoshi-y-traha-sub-topics_47789/item/dia-di-fiesta_41242.html
https://www.visitaruba.com/about-aruba/national-holidays-and-celebrations/
https://www.arubatoday.com/we-celebrate-our-national-hero-betico-croes/
https://www.caribbeannewsglobal.com/carnival-monday-remains-a-festive-day-in-aruba/ # noqa: E501
https://www.caribbeannewsglobal.com/carnival-monday-remains-a-festive-day-in-aruba/
https://www.aruba.com/us/calendar/national-anthem-and-flag-day
"""

Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/austria.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class Austria(HolidayBase, ChristianHolidays, InternationalHolidays):
country = "AT"
default_language = "de"
supported_categories = {BANK, PUBLIC}
supported_categories = (BANK, PUBLIC)
supported_languages = ("de", "en_US", "uk")
subdivisions = ("1", "2", "3", "4", "5", "6", "7", "8", "9")

Expand Down
5 changes: 3 additions & 2 deletions holidays/countries/bangladesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@

class Bangladesh(HolidayBase, InternationalHolidays):
"""
https://mopa.gov.bd/sites/default/files/files/mopa.gov.bd/public_holiday/61c35b73_e335_462a_9bcf_4695b23b6d82/reg4-2019-212.PDF
https://en.wikipedia.org/wiki/Public_holidays_in_Bangladesh
References:
- https://mopa.gov.bd/sites/default/files/files/mopa.gov.bd/public_holiday/61c35b73_e335_462a_9bcf_4695b23b6d82/reg4-2019-212.PDF # noqa: E501
- https://en.wikipedia.org/wiki/Public_holidays_in_Bangladesh
"""

country = "BD"
Expand Down
Loading