-
-
Notifications
You must be signed in to change notification settings - Fork 170
/
pyproject.toml
192 lines (174 loc) · 6.57 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
#
# 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/
#
[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",
]
# This email is not in use any more. If you find a better one, go ahead!
# See https://github.com/collective/icalendar/pull/707#discussion_r1775275335
authors = [
{ name="Plone Foundation", email="[email protected]" },
]
maintainers = [
{ name="Nicco Kunzmann", email="[email protected]" },
{ name="Christian Geier" },
{ name="Jaca", email="[email protected]" },
]
# 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 :: 5 - Production/Stable",
"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 :: 3.13",
"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.build]
exclude = [
"/.*",
"/*.*",
"/src/icalendar/fuzzing",
"/dist",
"/build",
"/htmlcov",
]
[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: ...
"UP007", # Optional -> X | None remove when migrated to py39+
]
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",
]