kopia lustrzana https://github.com/collective/icalendar
179 wiersze
6.2 KiB
TOML
179 wiersze
6.2 KiB
TOML
#
|
|
# We use the pyproject.toml package specification.
|
|
# See https://packaging.python.org/en/latest/guides/section-build-and-publish/
|
|
# See https://github.com/collective/icalendar/issues/686
|
|
# See https://packaging.python.org/en/latest/specifications/pyproject-toml/#license
|
|
#
|
|
|
|
[build-system]
|
|
requires = ["hatchling", "hatch-vcs"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "icalendar"
|
|
license = { file = "LICENSE.rst", name = "BSD-2-Clause" }
|
|
# name = "BSD-2-Clause", # TODO: is this the right short key
|
|
keywords = [
|
|
"calendar",
|
|
"calendaring",
|
|
"ical",
|
|
"icalendar",
|
|
"event",
|
|
"todo",
|
|
"journal",
|
|
"recurring",
|
|
"rfc5545",
|
|
]
|
|
authors = [
|
|
{ name="Plone Foundation", email="plone-developers@lists.sourceforge.net" },
|
|
]
|
|
maintainers = [
|
|
{ name="Nicco Kunzmann", email="niccokunzmann@rambler.ru" },
|
|
{ name="Christian Geier" },
|
|
{ name="Jaca", email="vitouejj@gmail.com" },
|
|
]
|
|
# These attributes are dynamically generated by hatch-vcs
|
|
dynamic = [
|
|
"urls",
|
|
"version"
|
|
]
|
|
description = "iCalendar parser/generator"
|
|
readme = { file = "README.rst", content-type = "text/x-rst" }
|
|
|
|
#
|
|
# When adjusting the Python Version, adjust also:
|
|
# - .github/workflows/tests.yml
|
|
# - the classifiers below
|
|
# - the documentation
|
|
# - the README file
|
|
# - dependencies for 3.8, Python 3.13 will come our October, too
|
|
# - tool.ruff.target-version
|
|
#
|
|
requires-python = ">=3.8"
|
|
|
|
# see https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
|
classifiers = [
|
|
"Development Status :: 3 - Alpha",
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: BSD License",
|
|
"Operating System :: OS Independent",
|
|
"Programming Language :: Python",
|
|
"Programming Language :: Python :: 3.8",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
]
|
|
|
|
dependencies = [
|
|
"python-dateutil",
|
|
# install requirements depending on python version, TODO: Remove with Python 3.8
|
|
# see https://www.python.org/dev/peps/pep-0508/#environment-markers
|
|
"backports.zoneinfo; python_version < '3.9'",
|
|
"tzdata"
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
test = [
|
|
"pytest",
|
|
"coverage",
|
|
"hypothesis",
|
|
"pytz",
|
|
]
|
|
|
|
[project.scripts]
|
|
icalendar = "icalendar.cli:main"
|
|
|
|
[tool.hatch.metadata.hooks.vcs.urls]
|
|
# This is a dynamic generation of [project.urls]
|
|
Homepage = "https://icalendar.readthedocs.io/"
|
|
Repository = "https://github.com/collective/icalendar/"
|
|
source_archive = "https://github.com/collective/icalendar/archive/{commit_hash}.zip"
|
|
Issues = "https://github.com/collective/icalendar/issues"
|
|
Documentation = "https://icalendar.readthedocs.io/"
|
|
Changelog = "https://icalendar.readthedocs.io/en/latest/changelog.html"
|
|
|
|
[tool.hatch.version]
|
|
# This configuration allows us to use the version from the tags and dynamically generate
|
|
# version files. This speeds up the release process.
|
|
source = "vcs"
|
|
|
|
[tool.hatch.version.raw-options]
|
|
# see https://github.com/ofek/hatch-vcs/issues/43#issuecomment-1553065222
|
|
local_scheme = "no-local-version"
|
|
|
|
[tool.hatch.build.hooks.vcs]
|
|
version-file = "src/icalendar/_version.py"
|
|
|
|
[tool.hatch.metadata]
|
|
allow-direct-references = true
|
|
|
|
[tool.ruff]
|
|
target-version = "py38"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["ALL"]
|
|
ignore = [
|
|
"ANN", # flake8-annotations
|
|
"B020", # Loop control variable {name} overrides iterable it iterates
|
|
"C401", # Unnecessary generator (rewrite as a set comprehension)
|
|
"C901", # {name} is too complex ({complexity} > {max_complexity})
|
|
"COM812", # Trailing comma missing
|
|
"D1", # Missing docstring
|
|
"D2", # docstrings stuffs
|
|
"D4", # docstrings stuffs
|
|
"EM10", # Exception string usage
|
|
"ERA001", # Found commented-out code
|
|
"FBT002", # Boolean default positional argument in function definition
|
|
"FIX", # TODO comments
|
|
"ISC001", # Implicitly concatenated string literals on one line (to avoid with formatter)
|
|
"N818", # Exception name {name} should be named with an Error suffix
|
|
"PLR091", # Too many things (complexity, arguments, branches, etc...)
|
|
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
|
|
"RUF012", # Mutable class attributes should be annotated with typing.ClassVar
|
|
"RUF015", # Prefer next({iterable}) over single element slice
|
|
"S101", # Use of assert detected
|
|
"TD", # TODO comments
|
|
"TRY003", # Avoid specifying long messages outside the exception class
|
|
"S104", # Possible binding to all interfaces
|
|
"E722", # Do not use bare `except`
|
|
"RUF005", # Consider iterable unpacking instead of concatenation
|
|
"DTZ005", # `datetime.datetime.now()` called without a `tz` argument
|
|
"PERF401", # Use a list comprehension to create a transformed list
|
|
"ARG002", # Unused method argument: ...
|
|
"ARG001", # Unused function argument: ...
|
|
]
|
|
extend-safe-fixes = [
|
|
"PT006", # Wrong type passed to first argument of @pytest.mark.parametrize; expected {expected_string}
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"src/icalendar/tests/*" = [
|
|
"B011", # Do not assert False (python -O removes these calls), raise AssertionError()
|
|
"DTZ001", # datetime.datetime() called without a tzinfo argument
|
|
"E501", # Indentation is not a multiple of {indent_size}
|
|
"N802", # Function name {name} should be lowercase
|
|
"PT011", # pytest.raises({exception}) is too broad, set the match parameter or use a more specific exception
|
|
"PT012", # pytest.raises() block should contain a single simple statement
|
|
"PT015", # Assertion always fails, replace with pytest.fail()
|
|
"T201", # print found
|
|
"T203", # `pprint` found
|
|
"RUF001", # String contains ambiguous character
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
# see https://docs.pytest.org/en/6.2.x/customize.html
|
|
minversion = "6.0"
|
|
# see https://docs.pytest.org/en/6.2.x/reference.html?highlight=testpaths#confval-testpaths
|
|
testpaths = [
|
|
"src/icalendar/tests",
|
|
]
|
|
# see https://docs.pytest.org/en/6.2.x/reference.html?highlight=testpaths#confval-norecursedirs
|
|
norecursedirs = [
|
|
"src/icalendar/tests/hypothesis",
|
|
"build",
|
|
]
|
|
|