-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
170 lines (154 loc) · 4.86 KB
/
Copy pathpyproject.toml
File metadata and controls
170 lines (154 loc) · 4.86 KB
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
[build-system]
requires = ["hatchling>=1.8.0", "hatch-vcs", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"
[project]
name = "bo4e"
description = "Python Library that implements the BO4E Standard."
license = { text = "MIT" }
requires-python = ">=3.9"
authors = [
{ name = "Kevin Krechan", email = "kevin.krechan@hochfrequenz.de" },
{ name = "Leon Haffmans", email = "leon.haffmans@hochfrequenz.de" },
{ name = "Annika Schlögl", email = "annika.schloegl@hochfrequenz.de" },
{ name = "Franziska Vesely", email = "franziska.vesely@hochfrequenz.de" },
{ name = "Konstantin Klein", email = "konstantin.klein@hochfrequenz.de" },
]
keywords = ["bo4e", "bdew", "edi@energy"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
# This list must be in synq with the ./requirements.in file!
dependencies = ["iso3166", "pydantic>=2.0.0", "pyhumps"]
dynamic = ["readme", "version"]
# PEP 735 dependency groups — replace what used to live under
# dev_requirements/. tox-uv (see tox.ini) reads these directly; uv reads
# them via `uv sync --group <name>`. Includes propagate transitively, so
# the `dev` group pulls in everything a contributor needs locally.
[dependency-groups]
tests = [
"pytest",
"pytest-datafiles",
"dictdiffer",
# tests/test_version_helper.py imports generate_or_validate_json_schemas,
# which is a click CLI.
"click",
]
coverage = [
{include-group = "tests"},
"coverage",
]
type_check = [
"mypy",
"types-requests",
"networkx-stubs",
"pytest",
{include-group = "docs"},
{include-group = "json_schemas"},
]
linting = [
# Pylint 4 dropped `suggestion-mode` from .pylintrc and tightened
# naming-style enforcement (rejects PARSABLE_CLASS_TYPE). The cap keeps
# the old behavior; bumping it is a separate migration.
"pylint<4",
{include-group = "docs"},
{include-group = "json_schemas"},
]
formatting = [
"black",
"isort",
]
packaging = [
"build",
"twine",
]
json_schemas = [
"click",
]
docs = [
# Sphinx + theme + requests are docs-only; runtime deps come from
# [project.dependencies] via uv.lock. docs/requirements.in/txt is
# retained because sphinx-notes/pages@v2 in docs_latest.yml needs a
# standalone requirements file at a known path.
"requests",
"Sphinx",
"sphinx_rtd_theme",
{include-group = "json_schemas"},
]
dev = [
{include-group = "tests"},
{include-group = "coverage"},
{include-group = "type_check"},
{include-group = "linting"},
{include-group = "formatting"},
{include-group = "docs"},
"pre-commit",
"pip-tools",
]
[project.urls]
Changelog = "https://github.com/bo4e/bo4e-python/releases"
Homepage = "https://github.com/bo4e/bo4e-python"
Documentation = "https://bo4e-python.readthedocs.io/en/latest/"
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/x-rst"
fragments = [{ path = "README.rst" }]
[tool.hatch.version]
source = "vcs"
[tool.hatch.version.raw-options]
# version_scheme = "no-guess-dev"
version_scheme = "only-version"
local_scheme = "node-and-date"
# See https://setuptools-scm.readthedocs.io/en/latest/extending/#version-number-construction
# for details of how the version number is constructed.
# Note that the BO4E CLI which is used in the CI expects the version to be in the format how it currently is.
# If you which to change the version format, you will also have to change the CLI code.
[tool.hatch.build.hooks.vcs]
version-file = "src/_bo4e_python_version.py"
template = '''
version = "{version}"
'''
[tool.hatch.build.targets.sdist]
exclude = ["/unittests"]
[tool.hatch.build.targets.wheel]
only-include = ["src"]
sources = ["src"]
[tool.black]
line-length = 120
target_version = ["py38", "py39", "py310", "py311", "py312"]
[tool.setuptools_scm]
[tool.pytest.ini_options]
testpaths = "tests"
markers = ["datafiles: load datafiles"]
[tool.pylint.'MESSAGES CONTROL']
max-line-length = 120
[tool.isort]
line_length = 120
profile = "black"
[tool.mypy]
plugins = ["pydantic.mypy"]
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
# for strict mypy: (this is the tricky one :-))
disallow_untyped_defs = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[tool.coverage.report]
exclude_also = [
# This covers both typing.TYPE_CHECKING and plain TYPE_CHECKING, with any amount of whitespace
"if\\s+(typing\\.)?TYPE_CHECKING:"
]