Skip to content

Commit

Permalink
Merge pull request #1747 from vacanza/dev
Browse files Browse the repository at this point in the history
v0.46
  • Loading branch information
arkid15r committed Apr 1, 2024
2 parents b560805 + d4034af commit 6b5535b
Show file tree
Hide file tree
Showing 633 changed files with 8,264 additions and 4,956 deletions.
48 changes: 44 additions & 4 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5.1.0
with:
python-version: '3.12'
- name: Run pre-commit
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5.1.0
with:
cache: pip
cache-dependency-path: |
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5.1.0
with:
cache: pip
cache-dependency-path: requirements/runtime.txt
Expand Down Expand Up @@ -116,6 +116,46 @@ jobs:
with:
parallel-finished: true

test-build:
name: Test build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: build
strategy:
matrix:
os:
- macOS-latest
- ubuntu-latest
- windows-latest
steps:
- name: Check out Repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
cache: pip
cache-dependency-path: |
requirements/runtime.txt
requirements/tests.txt
python-version: '3.12'

- name: Get package artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Run tests
shell: bash
run: |
rm -rf holidays
python -m pip install --upgrade --requirement requirements/tests.txt
python -m pip install `ls dist/*.whl`
pytest --dist loadscope --numprocesses auto tests/countries tests/financial
python -m pip uninstall -y holidays python-dateutil six
python -m pip install `ls dist/*.tar.gz`
pytest --dist loadscope --numprocesses auto tests/countries tests/financial
publish-pypi-main:
name: Publish to PyPI
if: |
Expand All @@ -124,7 +164,7 @@ jobs:
startsWith(github.event.ref, 'refs/tags/v')
environment: main
needs:
- build
- test-build
permissions:
id-token: write
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5.0.0
- uses: actions/setup-python@v5.1.0
with:
python-version: '3.12'

Expand Down
11 changes: 10 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,20 @@ repos:
- rst

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.3
rev: v0.3.4
hooks:
- id: ruff
- id: ruff-format

- repo: https://github.com/lucas-c/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
files: \.(po|py)$
args:
- --license-filepath
- docs/file_header.txt

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
Expand Down
3 changes: 3 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Python Holidays Authors

Aaron Picht
Aart Goossens
Abdelkhalek Boukli Hacene
Akos Furton
Alejandro Antunes
Alexander Schulze
Expand Down Expand Up @@ -95,6 +96,7 @@ Ondřej Nový
Osayd Abdu
Oscar Romero
Pablo Merino
Panpakorn Siripanich
Patrick Nicholson
Paulo Orrock
Pavel Sofroniev
Expand All @@ -114,6 +116,7 @@ Sam Tregar
Santiago Feliu
Sergi Almacellas Abellana
Sergio Mayoral Martinez
Serhii Murza
Shaurya Uppal
Sho Hirose
Simon Gurcke
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.46
============

Released April 1, 2024

- Fix Romanian language strings: replace U+015F with proper U+0219 (#1739 by @KJhellico)
- Update (c) in file headers and LICENSE (#1672 by @dr-prodigy)
- Update Australia holidays (#1736 by @KJhellico)
- Update Makefile clean action (#1738 by @arkid15r)
- Update US tests: Day After Thanksgiving (#1742 by @arkid15r)
- Update United Kingdom holidays: fix observed New Year's Day in Scotland (#1735 by @KJhellico)
- Update tests: use assertIsInstance (#1737 by @arkid15r)
- Fix README layout (attempt 1) (#1745 by @arkid15r)
- Add file header pre-commit check (#1744 by @arkid15r)
- Add package build tests (#1733 by @KJhellico)
- Unify file headers after recent update (#1743 by @KJhellico)

Version 0.45
============

Expand Down
7 changes: 5 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Copyright (c) 2017-2023 <dr.prodigy.github@gmail.com>
Copyright (c) 2014-2017 <ryanssdev@icloud.com>
Copyright (c) Vacanza Team and individual contributors (see AUTHORS file)
Copyright (c) dr-prodigy <dr.prodigy.github@gmail.com>, 2017-2023
Copyright (c) ryanss <ryanssdev@icloud.com>, 2014-2017

All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
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 dist/*
rm -rf docs/build/*
rm -rf docs/source/_autosummary/*

Expand Down
106 changes: 55 additions & 51 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,69 +1,73 @@
===============
python-holidays
===============
========
holidays
========

A fast, efficient Python library for generating country- and subdivision- (e.g.
state or province) specific sets of government-designated holidays on the fly.
It aims to make determining whether a specific date is a holiday as fast and
flexible as possible.

:PyPI:
.. image:: https://img.shields.io/pypi/dm/holidays?color=%2341B5BE&style=flat
:target: https://pypi.org/project/holidays
:alt: Downloads
.. |downloads| image:: https://img.shields.io/pypi/dm/holidays?color=%2341B5BE&style=flat
:target: https://pypi.org/project/holidays
:alt: PyPI downloads

.. image:: https://img.shields.io/pypi/v/holidays?color=%2341B5BE&label=version&style=flat
:target: https://pypi.org/project/holidays
:alt: PyPI version
.. |version| image:: https://img.shields.io/pypi/v/holidays?color=%2341B5BE&label=version&style=flat
:target: https://pypi.org/project/holidays
:alt: PyPI version

.. image:: https://img.shields.io/github/release-date/vacanza/python-holidays?color=%2341B5BE&style=flat
:target: https://github.com/vacanza/python-holidays/releases
:alt: Release date
.. |release date| image:: https://img.shields.io/github/release-date/vacanza/python-holidays?color=%2341B5BE&style=flat
:target: https://github.com/vacanza/python-holidays/releases
:alt: PyPI release date

:CI/CD:
.. image:: https://img.shields.io/github/actions/workflow/status/vacanza/python-holidays/ci-cd.yml?color=%2341BE4A&style=flat
:target: https://github.com/vacanza/python-holidays/actions
:alt: CI/CD status
.. |status| image:: https://img.shields.io/github/actions/workflow/status/vacanza/python-holidays/ci-cd.yml?color=%2341BE4A&style=flat
:target: https://github.com/vacanza/python-holidays/actions
:alt: CI/CD status

.. image:: https://img.shields.io/readthedocs/python-holidays?color=%2341BE4A&style=flat
:target: https://python-holidays.readthedocs.io/en/latest/?badge=latest
:alt: Documentation status
.. |documentation| image:: https://img.shields.io/readthedocs/python-holidays?color=%2341BE4A&style=flat
:target: https://python-holidays.readthedocs.io/en/latest/?badge=latest
:alt: Documentation status

:Code:
.. image:: https://img.shields.io/github/license/vacanza/python-holidays?color=%2341B5BE&style=flat
:target: LICENSE
:alt: License
.. |license| image:: https://img.shields.io/github/license/vacanza/python-holidays?color=%2341B5BE&style=flat
:target: https://github.com/vacanza/python-holidays/blob/dev/LICENSE
:alt: License

.. image:: https://img.shields.io/pypi/pyversions/holidays?label=python&color=%2341B5BE&style=flat
:target: https://pypi.org/project/holidays
:alt: Python supported versions
.. |python versions| image:: https://img.shields.io/pypi/pyversions/holidays?label=python&color=%2341B5BE&style=flat
:target: https://pypi.org/project/holidays
:alt: Python supported versions

.. image:: https://img.shields.io/badge/code%20style-black-%252333F93C0?label=style&color=%2341B5BE&style=flat
:target: https://github.com/psf/black
:alt: Code style
.. |style| image:: https://img.shields.io/badge/code%20style-black-%252333F93C0?label=style&color=%2341B5BE&style=flat
:target: https://github.com/psf/black
:alt: Code style

.. image:: https://img.shields.io/coverallsCoverage/github/vacanza/python-holidays?branch=main&color=%2341B5BE&style=flat
:target: https://coveralls.io/r/vacanza/python-holidays
:alt: Code coverage
.. |coverage| image:: https://img.shields.io/coverallsCoverage/github/vacanza/python-holidays?branch=main&color=%2341B5BE&style=flat
:target: https://coveralls.io/r/vacanza/python-holidays
:alt: Code coverage

.. |stars| image:: https://img.shields.io/github/stars/vacanza/python-holidays?color=%2341BE4A&style=flat
:target: https://github.com/vacanza/python-holidays/stargazers
:alt: GitHub stars

:GitHub:
.. image:: https://img.shields.io/github/stars/vacanza/python-holidays?color=%2341BE4A&style=flat
:target: https://github.com/vacanza/python-holidays/stargazers
:alt: GitHub stars
.. |forks| image:: https://img.shields.io/github/forks/vacanza/python-holidays?color=%2341BE4A&style=flat
:target: https://github.com/vacanza/python-holidays/forks
:alt: GitHub forks

.. image:: https://img.shields.io/github/forks/vacanza/python-holidays?color=%2341BE4A&style=flat
:target: https://github.com/vacanza/python-holidays/forks
:alt: GitHub forks
.. |contributors| image:: https://img.shields.io/github/contributors/vacanza/python-holidays?color=%2341BE4A&style=flat
:target: https://github.com/vacanza/python-holidays/graphs/contributors
:alt: GitHub contributors

.. image:: https://img.shields.io/github/contributors/vacanza/python-holidays?color=%2341BE4A&style=flat
:target: https://github.com/vacanza/python-holidays/graphs/contributors
:alt: GitHub contributors

.. image:: https://img.shields.io/github/last-commit/vacanza/python-holidays/dev?color=%2341BE4A&style=flat
:target: https://github.com/vacanza/python-holidays/commits/dev
:alt: GitHub last commit
.. |last commit| image:: https://img.shields.io/github/last-commit/vacanza/python-holidays/dev?color=%2341BE4A&style=flat
:target: https://github.com/vacanza/python-holidays/commits/dev
:alt: GitHub last commit

+--------+------------------------------------------------+
| PyPI | |downloads| |version| |release date| |
+--------+------------------------------------------------+
| CI/CD | |status| |documentation| |
+--------+------------------------------------------------+
| Code | |license| |python versions| |style| |coverage| |
+--------+------------------------------------------------+
| GitHub | |stars| |forks| |contributors| |last commit| |
+--------+------------------------------------------------+

Install
-------
Expand Down Expand Up @@ -218,9 +222,9 @@ All other default values are highlighted with bold:
-
* - Australia
- AU
- States and territories: **ACT**, NSW, NT, QLD, SA, TAS, VIC, WA
-
- States and territories: ACT (Australian Capital Territory), NSW (New South Wales), NT (Northern Territory), QLD (Queensland), SA (South Australia), TAS (Tasmania), VIC (Victoria), WA (Western Australia)
-
- BANK, HALF_DAY
* - Austria
- AT
- States: 1 (Burgenland, Bgld, B), 2 (Kärnten, Ktn, K), 3 (Niederösterreich, NÖ, N), 4 (Oberösterreich, OÖ, O), 5 (Salzburg, Sbg, S), 6 (Steiermark, Stmk, St), 7 (Tirol, T), 8 (Vorarlberg, Vbg, V), 9 (Wien, W)
Expand Down Expand Up @@ -938,15 +942,15 @@ Contributions

.. _Issues: https://github.com/vacanza/python-holidays/issues
.. _pull requests: https://github.com/vacanza/python-holidays/pulls
.. _here: CONTRIBUTING.rst
.. _here: https://github.com/vacanza/python-holidays/blob/dev/CONTRIBUTING.rst

Issues_ and `pull requests`_ are always welcome. Please see
`here`_ for more information.

License
-------

.. __: LICENSE
.. __: https://github.com/vacanza/python-holidays/blob/dev/LICENSE

Code and documentation are available according to the MIT License
(see LICENSE__).
11 changes: 11 additions & 0 deletions docs/file_header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
holidays
--------
A fast, efficient Python library for generating country, province and state
specific sets of holidays on the fly. It aims to make determining whether a
specific date is a holiday as fast and flexible as possible.

Authors: Vacanza Team and individual contributors (see AUTHORS file)
dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
ryanss <ryanssdev@icloud.com> (c) 2014-2017
Website: https://github.com/vacanza/python-holidays
License: MIT (see LICENSE file)
12 changes: 12 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# holidays
# --------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: Vacanza Team and individual contributors (see AUTHORS file)
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
# Website: https://github.com/vacanza/python-holidays
# License: MIT (see LICENSE file)

# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
Expand Down
11 changes: 6 additions & 5 deletions holidays/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# python-holidays
# ---------------
# holidays
# --------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
# Authors: Vacanza Team and individual contributors (see AUTHORS file)
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
# Website: https://github.com/dr-prodigy/python-holidays
# Website: https://github.com/vacanza/python-holidays
# License: MIT (see LICENSE file)

# flake8: noqa: F403
Expand All @@ -16,7 +17,7 @@
from holidays.registry import EntityLoader
from holidays.utils import *

__version__ = "0.45"
__version__ = "0.46"


EntityLoader.load("countries", globals())
Expand Down
Loading

0 comments on commit 6b5535b

Please sign in to comment.