-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
148 lines (129 loc) · 3.88 KB
/
Copy pathpyproject.toml
File metadata and controls
148 lines (129 loc) · 3.88 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
[project]
name = "fundamend"
description = "XML basierte Formate und DatemModelle für die Energiewirtschaft in Deutschland"
license = { text = "MIT" }
requires-python = ">=3.11"
authors = [{ name = "Hochfrequenz Unternehmensberatung GmbH", email = "info+github@hochfrequenz.de" }]
keywords = ["BDEW", "XML", "AHB", "MIG", "Marktkommunikation"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"pydantic>=2",
"efoli>=2.2.0"
]
dynamic = ["readme", "version"]
[project.optional-dependencies]
sqlmodels = [
"sqlmodel>=0.0.22",
"sqlalchemy[mypy]>=2.0.37"
]
ahbicht = [
"ahbicht>=2.0.0"
]
cli = [
"typer" # if you install fundamend[cli], the cli commands are available via typer
]
[dependency-groups]
tests = [
"filelock==3.32.3",
"pytest==9.1.1",
"pytest-xdist==3.8.0",
"syrupy==5.5.3"
]
lint = [
"ruff==0.16.3"
]
type_check = [
"mypy==2.3.1",
{include-group = "tests"}
]
spell_check = [
"codespell==2.4.3"
]
coverage = [
"coverage==7.15.4",
"pytest-cov==7.1.0",
{include-group = "tests"}
]
dev = [
{include-group = "tests"},
{include-group = "lint"},
{include-group = "type_check"},
{include-group = "coverage"},
{include-group = "spell_check"},
"pre-commit"
]
[project.urls]
Changelog = "https://github.com/Hochfrequenz/xml-fundamend-python/releases"
Homepage = "https://github.com/Hochfrequenz/xml-fundamend-python"
[tool.ruff]
line-length = 120
target-version = "py311"
extend-exclude = ["*.md"]
[tool.ruff.lint]
select = ["E", "W", "F", "I", "UP", "B", "N", "PL", "RUF"]
ignore = [
"PLR0913", # too-many-arguments
"PLR0917", # too-many-positional-arguments
"PLR0912", # too-many-branches
"PLR0915", # too-many-statements
"PLR2004", # magic-value-comparison
"RUF001", # ambiguous-unicode-character-string
"RUF002", # ambiguous-unicode-character-docstring
"RUF003", # ambiguous-unicode-character-comment
]
[tool.ruff.lint.per-file-ignores]
# these files contain long XML example comments that were also exempted from pylint's line-too-long check
"src/fundamend/models/messageimplementationguide.py" = ["E501"]
"src/fundamend/sqlmodels/ahbview.py" = ["E501"]
[tool.pytest.ini_options]
markers = ["snapshot: mark a test as a snapshot test"]
# -n auto runs the suite across all CPU cores; --dist loadfile keeps every test in a
# module on the same worker so module-scoped DB fixtures are built once per module.
addopts = "-n auto --dist loadfile"
# keep the noisy ahbicht/lark expression parser from formatting DEBUG/INFO log lines during test capture
log_level = "WARNING"
[project.scripts]
xml2json = "fundamend.__main__:main"
# fundamend is the package in the src directory
# With no further specification, the entry point is fundamend.__main__ which is then called as main script
[mypy]
truethy-bool = true
[tool.mypy]
disable_error_code = []
[tool.uv]
default-groups = []
[build-system]
requires = ["hatchling>=1.8.0", "hatch-vcs", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"
[tool.hatch.envs.default]
python="3.12"
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"
fragments = [{ path = "README.md" }]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "src/_fundamend_version.py"
template = '''
version = "{version}"
'''
[tool.hatch.build.targets.sdist]
exclude = ["/unittests"]
[tool.hatch.build.targets.wheel]
only-include = ["src"]
sources = ["src"]
include = [
"src/fundamend/sqlmodels/*.sql",
]