Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
139 lines (124 loc) · 3.65 KB
/
Copy pathpyproject.toml
File metadata and controls
139 lines (124 loc) · 3.65 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
[project]
name = "borm"
description = "A ORM tool to map between SQL databases and bo4e data model"
license = { text = "MIT" }
requires-python = ">=3.11"
authors = [{ name = "Hochfrequenz Unternehmensberatung GmbH", email = "info@hochfrequenz.de" }]
keywords = ["bo4e", "orm", "sql"]
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"
]
dependencies = [
"alembic>=1.19.0",
"colorlog",
"greenlet>=3.0.0",
"psycopg>=3.1",
"pydantic>=2.0.0",
"pyhumps",
"python-dotenv==1.0.1",
"SQLAlchemy>=2.0.22",
"pymysql",
"cryptography",
"sqlmodel==0.0.39"
]
dynamic = ["readme", "version"]
[project.urls]
Changelog = "https://github.com/Hochfrequenz/bo4e-python-orm/releases"
Homepage = "https://github.com/Hochfrequenz/bo4e-python-orm"
[tool.ruff]
line-length = 120
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
"RUF001", # ambiguous-unicode-character-string
"RUF002", # ambiguous-unicode-character-docstring
"RUF003", # ambiguous-unicode-character-comment
]
[tool.ruff.lint.isort]
# src/borm/models is only generated by some CI jobs' "Generate BO4E models" step, so whether
# "borm.models" resolves on disk - and thus whether ruff's isort classifies it as first-party -
# depends on which job runs. Pinning it here keeps import-sort order consistent across jobs.
known-first-party = ["borm"]
[tool.ruff.lint.per-file-ignores]
# src/borm/models is autogenerated from the BO4E schemas at CI time (not present in this checkout);
# mirrors the old .pylintrc_autogen_code disables (unused-import, line-too-long).
"src/borm/models/**" = ["F401", "E501"]
[build-system]
requires = ["hatchling>=1.31.0", "hatch-vcs", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"
[dependency-groups]
tests = [
"pytest==9.1.1"
]
coverage = [
"coverage==7.15.2"
]
init_bo4e = [
"bo4e-python-generator==0.0.13",
"bo4e-schema-tool==0.0.9",
"datamodel-code-generator==0.25.9"
]
linting = [
"ruff==0.16.2",
]
spell_check = [
"codespell==2.4.3"
]
type_check = [
"mypy==2.3.0",
{include-group = "tests"}
]
dev = [
"pre-commit",
{include-group = "tests"},
{include-group = "coverage"},
{include-group = "init_bo4e"},
{include-group = "linting"},
{include-group = "spell_check"},
{include-group = "type_check"}
]
[tool.uv]
default-groups = []
[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/_borm_version.py"
template = '''
version = "{version}"
'''
[tool.hatch.build.targets.sdist]
exclude = ["/unittests"]
[tool.hatch.build.targets.wheel]
only-include = ["src"]
sources = ["src"]
[tool.mypy]
plugins = ["sqlalchemy.ext.mypy.plugin", "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