-
Notifications
You must be signed in to change notification settings - Fork 19
/
pyproject.toml
147 lines (133 loc) · 3.47 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
[project]
name = "edtf"
version = "5.0.0"
dependencies = [
"python-dateutil",
"pyparsing",
]
description = "Python implementation of Library of Congress EDTF (Extended Date Time Format) specification"
requires-python = ">=3.8"
readme = {file = "README.md", content-type = "text/markdown"}
authors = [
{ name = "The Interaction Consortium", email = "studio@interaction.net.au"},
{ name = "Alastair Weakley"},
{ name = "Greg Turner"},
{ name = "James Murty"},
{ name = "Mark Finger" },
{ name = "Sabine Müller" },
{ name = "Cole Crawford" },
{ name = "Klaus Rettinghaus" }
]
maintainers = [
{ name = "The Interaction Consortium", email = "studio@interaction.net.au" }
]
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"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",
]
[project.optional-dependencies]
test = [
"django>=4.2,<5.0",
"pytest",
"pytest-django",
"pytest-benchmark",
"ruff",
"pre-commit",
"coverage",
"pytest-cov",
"junitparser",
]
[project.urls]
homepage = "https://github.com/ixc/python-edtf"
issues = "https://github.com/ixc/python-edtf/issues"
repository = "https://github.com/ixc/python-edtf.git"
changelog = "https://github.com/ixc/python-edtf/blob/main/changelog.rst"
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
packages.find = { where = ["."], exclude = ["edtf_django_tests", "edtf_django_tests.*"] }
[tool.wheel]
universal = false
[tool.tox]
legacy_tox_ini = """
[tox]
min_version = 4.0
env_list = py{38,39,310,311,312}
isolated_build = true
skip_missing_interpreters = True
[testenv]
deps =
pytest
django
commands = pytest
"""
[tool.pytest.ini_options]
python_files = ["tests.py", "test_*.py", "*_test.py", "*_tests.py"]
python_classes = ["Test*", "*Tests"]
python_functions = ["test_*"]
markers = [
"benchmark: mark a test as a benchmark",
]
addopts = "--ignore=edtf_django_tests/ --cov=edtf -m 'not benchmark'"
plugins = ["pytest_cov", "pytest_benchmark"]
[tool.coverage.run]
# we run the edtf_integration tests but only care about them testing fields.py in the main package
omit = [
"edtf_django_tests/*"
]
[tool.coverage.report]
exclude_lines = [
# Don't complain about missing debug-only code:
"if __name__ == .__main__.:",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
"raise NotImplemented",
"raise NotImplemented"
]
[tool.ruff]
# Python 3.8
target-version = "py38"
extend-exclude = [
'**/migrations/*',
]
[tool.ruff.lint]
select = [
# pycodestyle
"E",
# pycodestyle warnings
"W",
# Pyflakes
"F",
# pyupgrade
## Flake8 plugins
"UP",
# flake8-bugbear
"B",
# flake8-comprehensions
"C",
# flake8-django
"DJ",
# flake8-bandit
"S",
# flake8-simplify
"SIM",
# isort
"I",
]
ignore = [
# Ignore Pycodestyle line-length warnings, (mainly long comments).
"E501",
# Ignore McCabe complexity (for now).
"C901",
]