Skip to content

Commit

Permalink
Merge pull request #1899 from vacanza/dev
Browse files Browse the repository at this point in the history
v0.54
  • Loading branch information
KJhellico authored Aug 5, 2024
2 parents 0b81a14 + e7086fb commit d6cde9b
Show file tree
Hide file tree
Showing 33 changed files with 3,396 additions and 235 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Your PR description goes here.
- [ ] 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)
- [ ] 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 python-holidays functionality in general)
Expand Down
66 changes: 42 additions & 24 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
- v1
pull_request:
push:
branches-ignore:
- gh-readonly-queue/**
workflow_dispatch:

env:
Expand Down Expand Up @@ -50,22 +52,6 @@ jobs:
- '3.10'
- '3.11'
- '3.12'
- 'pypy-3.9'
- 'pypy-3.10'
exclude:
- os: 'macos-latest'
python-version: '3.8'
- os: 'macos-latest'
python-version: '3.9'
- os: 'macos-latest'
python-version: 'pypy-3.9'
include:
- os: 'macos-13'
python-version: '3.8'
- os: 'macos-13'
python-version: '3.9'
- os: 'macos-13'
python-version: 'pypy-3.9'
steps:
- uses: actions/checkout@v4

Expand All @@ -83,7 +69,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade --requirement requirements/tests.txt
python -m pip install --requirement requirements/tests.txt
python -m pip install .
- name: Run tests
Expand All @@ -106,15 +92,16 @@ jobs:
uses: actions/setup-python@v5
with:
cache: pip
cache-dependency-path: requirements/runtime.txt
cache-dependency-path: |
requirements/build.txt
check-latest: true
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build polib
pip install .
python -m pip install -r requirements/build.txt
python -m pip install .
- name: Build distribution
run: |
Expand Down Expand Up @@ -160,31 +147,62 @@ jobs:
shell: bash
run: |
rm -rf holidays
python -m pip install --upgrade --requirement requirements/tests.txt
python -m pip install --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
test-docs:
name: Test docs build
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set Up Python
uses: actions/setup-python@v5
with:
cache: pip
cache-dependency-path: requirements/docs.txt
python-version: '3.12'

- name: Install Dependencies
run: |
python -m pip install --requirement requirements/docs.txt
python -m pip install .
- name: Build docs
run: |
make doc
publish-main:
name: Publish generated artifacts
if: |
github.repository == 'vacanza/python-holidays' &&
github.event_name == 'push' &&
startsWith(github.event.ref, 'refs/tags/v')
environment: main
needs:
- test-build
- test-docs
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- name: Get package artifacts
- name: Download package artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

- name: Update Github release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.ref_name }} dist/*
22 changes: 20 additions & 2 deletions .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- cron: '0 0 * * *'
workflow_dispatch:

env:
FORCE_COLOR: 1

jobs:
auto-update:
name: Update pre-commit hooks
Expand All @@ -16,11 +19,26 @@ jobs:
steps:
- uses: actions/checkout@v4

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

- uses: browniebroke/[email protected]
- name: Install dependencies
run: |
python -m pip install pre-commit
- name: Use pre-commit environment cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
path: ~/.cache/pre-commit
restore-keys: ${{ runner.os }}-pre-commit-

- name: Run pre-commit automatic update
run: |
pre-commit autoupdate
pre-commit run --all-files
- uses: peter-evans/[email protected]
with:
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
- rst

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.2
rev: v0.5.6
hooks:
- id: ruff
- id: ruff-format
Expand All @@ -41,7 +41,7 @@ repos:
exclude: ^(docs)

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
rev: v1.11.1
hooks:
- id: mypy
additional_dependencies:
Expand Down
2 changes: 2 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ Aart Goossens
Abdelkhalek Boukli Hacene
Akos Furton
Alejandro Antunes
Aleksei Zhuchkov
Alexander Schulze
Alexandre Carvalho
Alexei Mikhailov
Anders Wenhaug
Andrei Klimenko
Andres Marrugo
Expand Down
19 changes: 19 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
Version 0.54
============

Released August 5, 2024

- Add Mauritania holidays (#1884 by @kasya)
- Fix Malawi tests (#1880 by @arkid15r)
- Update CI/CD pip caching (#1866 by @arkid15r)
- Update FI: add unofficial holidays (#1885 by @alexei-mobal, @arkid15r)
- Update Finland holidays l10n (#1883 by @KJhellico)
- Update PR template (#1894 by @arkid15r)
- Update RU: add 2025 substituted holidays (#1886 by @Alexeyzhu)
- Update docs requirements: revert sphinx to v7.4.7 (#1893 by @arkid15r)
- Update pre-commit automatic update (#1896 by @arkid15r)
- Update release process: upload artifacts to Github (#1898 by @arkid15r)
- Add documentation build test to CI/CD (#1895 by @KJhellico)
- Don't run tests on Github readonly queue push events (#1868 by @arkid15r)
- Drop PyPy support (#1878 by @arkid15r)

Version 0.53
============

Expand Down
13 changes: 9 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,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 148 country codes. The standard way to refer to a country
We currently support 149 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 countries have common or foreign
names or abbreviations as aliases for their subdivisions. These are defined in
Expand Down Expand Up @@ -423,8 +423,8 @@ All other default values are highlighted with bold:
* - Finland
- FI
-
- en_US, **fi**, sv, uk
-
- en_US, **fi**, sv_FI, uk
- UNOFFICIAL
* - France
- FR
- Départements: BL, GES, GP, GY, MF, MQ, NC, PF, RE, WF, YT
Expand Down Expand Up @@ -625,6 +625,11 @@ All other default values are highlighted with bold:
-
-
-
* - Mauritania
- MR
-
-
-
* - Mexico
- MX
-
Expand Down Expand Up @@ -947,7 +952,7 @@ following financial markets are available:
* - European Central Bank
- ECB
- Trans-European Automated Real-time Gross Settlement (TARGET2)
* - ICE Futures Europe
* - ICE Futures Europe
- IFEU
- A London-based Investment Exchange holidays
* - New York Stock Exchange
Expand Down
2 changes: 1 addition & 1 deletion holidays/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from holidays.registry import EntityLoader
from holidays.utils import *

__version__ = "0.53"
__version__ = "0.54"


EntityLoader.load("countries", globals())
Expand Down
1 change: 1 addition & 0 deletions holidays/countries/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
from .maldives import Maldives, MV, MDV
from .malta import Malta, MT, MLT
from .marshall_islands import MarshallIslands, MH, MHL, HolidaysMH
from .mauritania import Mauritania, MR, MRT
from .mexico import Mexico, MX, MEX
from .moldova import Moldova, MD, MDA
from .monaco import Monaco, MC, MCO
Expand Down
Loading

0 comments on commit d6cde9b

Please sign in to comment.