-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update package configuration: migrate to pyproject.toml (#1466)
- Loading branch information
Showing
9 changed files
with
121 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
include CHANGES | ||
include holidays/py.typed | ||
include CONTRIBUTING.rst | ||
include Makefile | ||
|
||
recursive-include docs * | ||
recursive-include holidays *.py | ||
recursive-include holidays/locale *.mo | ||
recursive-include holidays/locale *.po | ||
recursive-include scripts/l10n *.py | ||
recursive-include tests *.py | ||
recursive-include requirements * | ||
|
||
prune docs/build | ||
prune tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,67 @@ | ||
[project] | ||
name = "holidays" | ||
version = "0.34" | ||
description = "Generate and work with holidays in Python" | ||
license = { file = "LICENSE" } | ||
readme = "README.rst" | ||
requires-python = ">=3.8" | ||
|
||
authors = [{ email = "[email protected]", name = "Maurizio Montel" }] | ||
dependencies = ["python-dateutil"] | ||
classifiers = [ | ||
"Classifier: Development Status :: 4 - Beta", | ||
"Classifier: Intended Audience :: Developers", | ||
"Classifier: License :: OSI Approved :: MIT License", | ||
"Classifier: Operating System :: OS Independent", | ||
"Classifier: Programming Language :: Python", | ||
"Classifier: Programming Language :: Python :: 3", | ||
"Classifier: Programming Language :: Python :: 3 :: Only", | ||
"Classifier: Programming Language :: Python :: Implementation :: CPython", | ||
"Classifier: Programming Language :: Python :: Implementation :: PyPy", | ||
"Classifier: Topic :: Office/Business :: Scheduling", | ||
"Classifier: Topic :: Software Development :: Libraries :: Python Modules", | ||
"Classifier: Topic :: Software Development :: Localization", | ||
] | ||
keywords = ["holidays", "calendar", "l10n"] | ||
maintainers = [{ email = "[email protected]", name = "Arkadii Yakovets" }] | ||
|
||
[project.urls] | ||
Repository = "https://github.com/vacanza/python-holidays/" | ||
Documentation = "https://python-holidays.readthedocs.io/en/latest/" | ||
Changelog = "https://github.com/vacanza/python-holidays/releases" | ||
Downloads = "https://pypi.org/project/holidays/" | ||
|
||
[tool.black] | ||
line-length = 99 | ||
target-version = ['py38', 'py39', 'py310', 'py311'] | ||
target-version = ["py38", "py39", "py310", "py311"] | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
omit = ['scripts/*', 'setup.py', 'tests/*'] | ||
|
||
[tool.coverage.report] | ||
exclude_lines = ['def __repr__', 'pragma: no cover'] | ||
omit = ["scripts/*", "setup.py", "tests/*"] | ||
|
||
[tool.isort] | ||
known_first_party = ['holidays', 'tests'] | ||
known_first_party = ["holidays", "tests"] | ||
line_length = 99 | ||
multi_line_output = 3 | ||
no_inline_sort = true | ||
profile = 'black' | ||
skip = ['docs'] | ||
profile = "black" | ||
skip = ["docs"] | ||
|
||
|
||
[tool.mypy] | ||
strict = false | ||
|
||
[[tool.mypy.overrides]] | ||
module = "holidays.countries.*" | ||
disable_error_code = ["override"] | ||
|
||
[[tool.mypy.overrides]] | ||
module = "holidays.groups.*" | ||
disable_error_code = "attr-defined" | ||
|
||
[tool.rstcheck] | ||
ignore_directives = ["automodule"] | ||
ignore_languages = ["python"] | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["holidays*"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Test requirements. | ||
coverage | ||
importlib-metadata | ||
pytest | ||
pytest-cov | ||
pytest-xdist | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# python-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 <[email protected]> (c) 2017-2023 | ||
# ryanss <[email protected]> (c) 2014-2017 | ||
# Website: https://github.com/dr-prodigy/python-holidays | ||
# License: MIT (see LICENSE file) | ||
|
||
from unittest import TestCase | ||
|
||
from importlib_metadata import metadata | ||
|
||
import holidays | ||
|
||
|
||
class TestPackage(TestCase): | ||
def test_metadata(self): | ||
ph_metadata = metadata("holidays") | ||
|
||
for attr_name, attr_value in { | ||
"name": "holidays", | ||
"summary": "Generate and work with holidays in Python", | ||
"version": holidays.__version__, | ||
}.items(): | ||
self.assertIn(attr_name, ph_metadata) | ||
self.assertEqual(ph_metadata[attr_name], attr_value, attr_name) | ||
|
||
for attr_name in ( | ||
"author-email", | ||
"classifier", | ||
"description", | ||
"keywords", | ||
"license", | ||
"license-file", | ||
"maintainer-email", | ||
"project-url", | ||
"requires-python", | ||
): | ||
self.assertIn(attr_name, ph_metadata) | ||
self.assertTrue(ph_metadata[attr_name], attr_name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters