Skip to content

v.0.18

@dr-prodigy dr-prodigy tagged this 27 Dec 16:00
* Refactor weekdays/weekends logic.

  - Deprecate MON-SUN constants in favor of dateutil MO-SA.
  - Deprecate and move `WEEKENDS` from utils to HolidayBase
    (on per country basis as some countries have not usual SAT, SUN weekends).
  - Add `_is_weekend` method into `HolidayBase`.
  - Change isort multi-line import behavior to bracket-less.
  - Update flake8 settings in order to make it stricter.
  - Remove unused imports.
  - Remove unused/commented out code.

* Migrate special holidays for all countries.

Move logic from `_populate` to `special_holidays` for:
  - Botswana
  - Eswatini
  - Hongkong
  - Ireland
  - Japan
  - South Korea
  - Lesotho
  - Namibia
  - Poland
  - Singapore
  - Slovakia
  - South Africa
  - Zambia

* Rename Korea to South Korea.

Update tests and documentation.

* Fix pre-commit.

* Fix pre-comit and sphinx.

* Address review comments.

* Hong Kong:
- holidays establishing years specified
- historical holidays added
- Lunar New Year and Christmas calculation fix
- Ching Ming Festival and Easter Monday overlapping fix
- optimizations
- tests added

* Optimize `if var in iterable:` statements.

Replace a tuple/list with a set in order to achieve
O(n) -> ~O(1) complexity improvement.

* Change `weekend` data type to set.

* Fix pre-commit config.

* Update holidays/countries/israel.py

Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>

* Fix Israel holidays.

* Migrate Singapore polling days.

* v.0.18 beta init

* Added Indonesian holidays (#787)

* CHANGES sync

* Korea: fixed holidays relevance period (#791)

* CHANGES sync

* Korea quicker tests

* CHANGES sync

* Clean up unused imports. (#792)

* Implement flake8 suggested fixes.
  - Fine tune flake8 setup.cfg config.
  - Remove unused imports.
  - Add __init__.py to test/financial
    Reconfigure flake8 to use per file ignores.
* Fix pre-commit.
* Add flake8-print.

* flake8 settings review

* flake8 settings, print removal

* Clean up .pre-commit-config.yaml. (#795)

* Clean up .pre-commit-config.yaml.
Re-enable rstcheck hook.
* Change flake8 source URL.
Co-authored-by: dr-prodigy <dr-prodigy@github.com>

* CHANGES sync

* Hong Kong fix

* CHANGES sync

* Zambia: optimizations, added special holidays (#798)

Co-authored-by: dr-prodigy <28216945+dr-prodigy@users.noreply.github.com>

* CHANGES sync

* Vietnam: optimizations, observed holidays calculation (#799)

* CHANGES sync

* CHANGES sync

* Uruguay: update holiday names (#809)

* Easter related holidays refactoring and unification (#803)

* Canada: make observed New Year's Day fall on or after the holiday (#811)

* CHANGES sync

* Bump pypa/gh-action-pypi-publish from 1.5.1 to 1.5.2 (#816)

* Address comments (use `self._is_weekend()`).

* Refactor tests. Introduce `common.TestCase`. (#800)

* Refactor tests. Introduce `common.TestCase`.

The `TestCase` class simplifies country holiday tests by providing
ready to use testing methods. It also reduces code clutter, improves
tests readability.

* Add instance eq. assertion.

Merged by: dr-prodigy <28216945+dr-prodigy@users.noreply.github.com>

* CHANGES sync

* Malaysia: (#802)

- fixed dates of some islamic and lunisolar calendar holidays
- rewritten observed calculation (by states)
- huge refactoring
- rewritten tests

* CHANGES sync

* Nigeria holiday updates (#823)

* Financial holiday - Day of Mourning for President George H.W. Bush (#817)

* Madagascar: added holidays with tests (#818)

* Paraguay updates (#819)

- added special holidays
- fixed observance calculation

* South Africa: optimizations (#820)

* Switzerland: optimizations, Näfelser Fahrt fix (#821)

* Angola: optimizations, observance calculation fix (#822)

* India: Diwali and Holi holidays update (#825)

* Hungary: removed double holiday Dec 31 (#826)

* Observed holidays calc optimizations (#824)

* Address review comments.
Add isort first-parties.

* Remove deprecation warnings.
Fix minor issues.

* Bump actions/setup-python from 4.3.0 to 4.3.1 (#831)

* Bump pypa/gh-action-pypi-publish from 1.5.1 to 1.6.4 (#832)

Co-authored-by: dr-prodigy <28216945+dr-prodigy@users.noreply.github.com>

* chile: Día Nacional de los Pueblos Indígenas (#828)

Fix the holiday day when year > 2021 according to the calculated
solstice datetime adjusted to Chile timezone UTC-3
Added necessary util Class _AstroMeeusAlgorithms

Issue: 666

* Kazakhstan: (#829)

- observed holidays
- holidays relevance period

* Improve `common.TestCase` (#830)

* Adding financial holidays - Hurricane Gloria and Sandy (#833)

Co-authored-by: Arkadii Yakovets <ark@cho.red>

* Angola small refactoring (#835)

* New Zealand: optimizations (#836)

* UK King’s Coronation holiday in 2023 (#840)

* CHANGES sync

* Revert "Kazakhstan: (#829)" (#842)

This reverts commit bfde36d1c9f4e6d766fe56798248e13d45a88050.

* Fix `TestCase::parse_arguments` instance determining logic. (#844)

* Chile:
- holidays relevance period fixes
- historical holidays added
- special holidays added
- tests for all holidays

* Revert "Revert "Kazakhstan: (#829)" (#842)" (#845)

This reverts commit 4008a7e3497d53fcb0dfa88a53998c1e3ff9dea9.

* CHANGES sync

* Fix conflict solving errors

* South Africa: added 27 Dec 2002 public holiday (#848)

* CHANGES sync

* Add Pakistan holidays (#847)

* CHANGES

* Added tests for _AstroMeeusAlgorithms (#851)

* Pin `coverage` version. (#862)

Add a temporary version pin in order to fix GH CI/CD.

* japan: refactor japanese equinox holidays

Refactored japanese holidays to make use of Meeus algorithms
Include pymeeus in requirements_dev.txt which was already a
transitive dependency associated with convertdate
Sort dependencies alphabetically in requirements_dev.txt

* NYSE: fix Election Day holiday (#853)

* Fix South Korea deprecation warnings. (#854)

* United States: (#857)

* Malaysia multi-day Islamic holidays fixed (#858)

* Bump actions/setup-python from 4.3.0 to 4.4.0 (#871)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.3.0 to 4.4.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4.3.0...v4.4.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Maurizio Montel <28216945+dr-prodigy@users.noreply.github.com>

* Kazakhstan: (#867)

- update holidays relevance period
- update holidays names

* New Zealand: observed holidays calc optimizations (#872)

* Refactor imports (#870)

* Reconfigure holidays imports.
  * Unify top level imports style
  * Limit imports for holiday_base and utils
  * Reorder country imports
  * Add Moldova alpha-3 code
  * Add tests

* Redesign holidays imports tests.

* Added Armenia holidays (#875)

* Added Armenia holidays

* Update test/countries/test_armenia.py

Co-authored-by: Arkadii Yakovets <ark@cho.red>

Co-authored-by: Maurizio Montel <28216945+dr-prodigy@users.noreply.github.com>
Co-authored-by: Arkadii Yakovets <ark@cho.red>

* Azerbaijan: full refactoring #859

* CHANGES sync

* Chile: refactor equinox holiday to use pymeeus (#863)

* Add PyMeeus explicit dependency #863

* setup-cfg-fmt update

* v.0.18

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Arkadii Yakovets <ark@cho.red>
Co-authored-by: ~Jhellico <jhellico@gmail.com>
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com>
Co-authored-by: Maurizio Montel <28216945+dr-prodigy@users.noreply.github.com>
Co-authored-by: Jason Jensen <jason.o.jensen@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: SnowX65 <39384983+SnowX65@users.noreply.github.com>
Co-authored-by: Pedro Baptista <32106544+Nalguedo@users.noreply.github.com>
Co-authored-by: Nalguedo <pedro.miguel.baptista@gmail.com>
Assets 2