Skip to content

Commit

Permalink
Merge pull request #2267 from vacanza/dev
Browse files Browse the repository at this point in the history
v0.66
  • Loading branch information
arkid15r authored Feb 3, 2025
2 parents 3b82ecf + 8be25ab commit f51eebf
Show file tree
Hide file tree
Showing 104 changed files with 10,578 additions and 4,074 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ concurrency:
jobs:
pre-commit:
name: Run pre-commit
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -52,7 +52,7 @@ jobs:
- pre-commit
permissions:
security-events: write
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
build:
name: Build distribution
needs: test
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -206,7 +206,7 @@ jobs:
test-docs:
name: Test docs build
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: test
steps:
- name: Check out repository
Expand Down Expand Up @@ -241,7 +241,7 @@ jobs:
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Download package artifacts
uses: actions/download-artifact@v4
Expand All @@ -254,7 +254,7 @@ jobs:

sign-artifacts:
name: Create SHA1 checksums and Sigstore signatures
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs:
- publish-main
permissions:
Expand Down Expand Up @@ -288,7 +288,7 @@ jobs:

update-github-release:
name: Update GitHub release with SBOM and signed artifacts
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs:
- sign-artifacts
permissions:
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 @@ -15,7 +15,7 @@ jobs:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prl-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/labeler@v5
8 changes: 3 additions & 5 deletions .github/workflows/update-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -24,17 +24,15 @@ jobs:
cache: pip
cache-dependency-path: |
requirements/build.txt
requirements/dev.txt
requirements/runtime.txt
check-latest: true
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements/build.txt
python -m pip install -r requirements/dev.txt
make package
python -m pip install dist/*.tar.gz
python -m pip install -r requirements/runtime.txt
- name: Generate snapshots
run: |
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ dist/
docs/build
docs/source/_autosummary
holidays/locale/pot/*.pot
!holidays/locale/pot/UA.pot
MANIFEST
Pipfile
sbom.json
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
- --py39-plus

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.2
rev: v0.9.4
hooks:
- id: ruff
- id: ruff-format
Expand All @@ -48,7 +48,7 @@ repos:
- --configfile=pyproject.toml

- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 6.0.0
hooks:
- id: isort
exclude: ^(docs)
Expand Down Expand Up @@ -80,7 +80,7 @@ repos:
- id: rst-backticks

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

Expand Down
25 changes: 25 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
Version 0.66
============

Released February 3, 2025

- Add Sri Lanka holidays (#2228 by @Prateekshit73, @arkid15r, @KJhellico, @PPsyrius)
- Fix typo in CONTRIBUTING.rst (#2264 by @KJhellico)
- Update Czechia holidays (#2248 by @KJhellico)
- Update Germany holidays: add Corpus Christi in CATHOLIC category (#2253 by @KJhellico)
- Update Iceland holidays: add HALF_DAY holidays (#2249 by @KJhellico)
- Update Iran holidays (#2234 by @KJhellico)
- Update PR exclusion logic (#2233 by @arkid15r)
- Update Slovakia holidays: Constitution Day is working day since 2024 (#2235 by @KJhellico, @arkid15r)
- Update Slovenia holidays (#2237 by @KJhellico)
- Update Sweden holidays: fix All Saints' Day (#2252 by @KJhellico)
- Update Thailand holidays: refactor Royal Ploughing Ceremony code (#2247 by @PPsyrius)
- Update United Arab Emirates holidays: add `th` l10n, exact 2017-2025 entries (#2263 by @PPsyrius)
- Update Vatican City holidays: add missing holidays, l10n support (#2250 by @PPsyrius)
- Update automatic snapshots update workflow (#2254 by @KJhellico)
- Update some holidays Ukrainian translations (#2265 by @KJhellico)
- Add Israel holidays localization: th (#2262 by @PPsyrius)
- Add West Frisian language (#2246 by @waarissyb, @arkid15r)
- Pin CI/CD Ubuntu version (#2245 by @arkid15r)
- Remove .po files from distribution bundles (#2243 by @KJhellico)

Version 0.65
============

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ If you want to retrieve uncovered lines too:
$ make coverage
You can specific tests using ``pytest`` command:
You can run specific tests using the ``pytest`` command:

.. code-block:: shell
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ include Makefile

recursive-include docs *
recursive-include holidays/locale *.mo
recursive-include holidays/locale *.po
recursive-include requirements *

prune docs/build
Expand Down
23 changes: 14 additions & 9 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 156 country codes. The standard way to refer to a country
We currently support 157 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 @@ -514,7 +514,7 @@ All other default values are highlighted with bold:
- IS
-
- en_US, **is**, uk
-
- HALF_DAY
* - India
- IN
- States: AN, AP, AR, AS, BR, CG, CH, DH, DL, GA, GJ, HP, HR, JH, JK, KA, KL, LA, LD, MH, ML, MN, MP, MZ, NL, OD, PB, PY, RJ, SK, TN, TR, TS, UK, UP, WB
Expand All @@ -528,7 +528,7 @@ All other default values are highlighted with bold:
* - Iran
- IR
-
- en_US, **fa**
- en_US, **fa_IR**
-
* - Ireland
- IE
Expand All @@ -543,7 +543,7 @@ All other default values are highlighted with bold:
* - Israel
- IL
-
- en_US, **he**, uk
- en_US, **he**, th, uk
- OPTIONAL, SCHOOL
* - Italy
- IT
Expand Down Expand Up @@ -693,7 +693,7 @@ All other default values are highlighted with bold:
* - Netherlands
- NL
-
- en_US, **nl**, uk
- en_US, fy, **nl**, uk
- OPTIONAL
* - New Zealand
- NZ
Expand Down Expand Up @@ -829,7 +829,7 @@ All other default values are highlighted with bold:
- SI
-
- en_US, **sl**, uk
-
- WORKDAY
* - South Africa
- ZA
-
Expand All @@ -845,6 +845,11 @@ All other default values are highlighted with bold:
- Autonomous communities: AN, AR, AS, CB, CE, CL, CM, CN, CT, EX, GA, IB, MC, MD, ML, NC, PV, RI, VC
- en_US, **es**, uk
-
* - Sri Lanka
- LK
-
- en_US, **si_LK**, ta_LK
- BANK, GOVERNMENT, WORKDAY
* - Sweden
- SE
-
Expand Down Expand Up @@ -898,8 +903,8 @@ All other default values are highlighted with bold:
* - United Arab Emirates
- AE
-
- **ar**, en_US
-
- **ar**, en_US, th
- GOVERNMENT, OPTIONAL
* - United Kingdom
- GB
- Subdivisions: ENG (England), NIR (Northern Ireland), SCT (Scotland), WLS (Wales)
Expand Down Expand Up @@ -938,7 +943,7 @@ All other default values are highlighted with bold:
* - Vatican City
- VA
-
-
- en_US, **it**, th
-
* - Venezuela
- VE
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

| Version | Supported |
| ------- | ------------------ |
| 0.65 | :white_check_mark: |
| < 0.65 | :x: |
| 0.66 | :white_check_mark: |
| < 0.66 | :x: |

## Reporting a Vulnerability

Expand Down
1 change: 1 addition & 0 deletions holidays/calendars/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@
from holidays.calendars.julian import JULIAN_CALENDAR
from holidays.calendars.julian_revised import JULIAN_REVISED_CALENDAR
from holidays.calendars.persian import _Persian
from holidays.calendars.sinhala import _SinhalaLunar, _CustomSinhalaHolidays
from holidays.calendars.thai import _ThaiLunisolar, KHMER_CALENDAR, THAI_CALENDAR
6 changes: 6 additions & 0 deletions holidays/calendars/persian.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ class _Persian:
START_YEAR = 1901
END_YEAR = 2100

def is_leap_year(self, year: int) -> bool:
"""
Is Persian year that begins in the specified Gregorian year a leap year.
"""
return (year % 33) in {3, 7, 11, 16, 20, 24, 28, 32}

def new_year_date(self, year: int) -> Optional[date]:
"""
Return Gregorian date of Persian new year (1 Farvardin) in a given Gregorian year.
Expand Down
Loading

0 comments on commit f51eebf

Please sign in to comment.