-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
153 lines (127 loc) · 3.71 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "fancy-dataclass"
dynamic = ["version"]
description = "Spiff up your dataclasses with extra features."
readme = "docs/README.md"
requires-python = ">=3.8"
license = "MIT"
keywords = ["dataclass", "cli", "config", "orm", "serialize", "json", "toml"]
authors = [
{ name = "Jeremy Silver", email = "[email protected]" }
]
classifiers = [
"Programming Language :: Python"
]
dependencies = [
"sqlalchemy >= 2.0",
"tomlkit >= 0.11",
"typing_extensions"
]
[project.urls]
# Documentation = "https://github.com/jeremander/fancy-dataclass#readme"
Documentation = "https://fancy-dataclass.readthedocs.io"
Issues = "https://github.com/jeremander/fancy-dataclass/issues"
Source = "https://github.com/jeremander/fancy-dataclass"
Changelog = "https://fancy-dataclass.readthedocs.io/en/stable/CHANGELOG"
[tool.hatch.build.targets.sdist]
exclude = ["TODO.txt"]
[tool.hatch.version]
path = "fancy_dataclass/__init__.py"
[tool.hatch.envs.doc]
dependencies = [
"mkdocs",
"mkdocs-material",
"mkdocstrings",
"mkdocs-gen-files",
"mkdocstrings-python",
"mkdocs-literate-nav",
]
[tool.hatch.envs.doc.scripts]
build = "mkdocs build --clean --strict"
serve = "mkdocs serve"
# deploy = "mkdocs gh-deploy"
deploy = "mkdocs build --site-dir $READTHEDOCS_OUTPUT/html"
[tool.hatch.envs.lint]
dependencies = [
"mypy>=1.0",
"numpy",
"pytest",
"radon",
"ruff>=0.3",
"vermin",
]
[tool.hatch.envs.lint.scripts]
run-ruff = "ruff check"
run-vermin = "vermin {args:-t=3.8- --eval-annotations --no-tips --violations --exclude enum.StrEnum --exclude types.UnionType .}"
run-mypy = "mypy --install-types --non-interactive {args:fancy_dataclass tests}"
run-loc-summary = "./scripts/summarize.sh"
all = ["run-ruff", "run-vermin", "run-mypy", "run-loc-summary"]
[tool.hatch.envs.test]
dependencies = [
"numpy",
"pytest",
"pytest-cov",
]
[tool.hatch.envs.test.scripts]
test = "pytest {args:tests}"
test-debug = "pytest --pdb {args:tests}"
cov-report = ["- coverage combine", "coverage report", "coverage html"]
cov = ["test", "cov-report"]
[[tool.hatch.envs.test.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[tool.hatch.envs.badge]
dependencies = [
"coverage",
"genbadge[tests,coverage]"
]
[tool.hatch.envs.badge.scripts]
badge-cov = ["coverage xml", "genbadge coverage -i coverage.xml"]
badges = ["badge-cov"]
[tool.hatch.publish.index]
disable = true
[tool.coverage.run]
source_pkgs = ["fancy_dataclass", "tests"]
branch = true
parallel = true
omit = ["venv/*"]
[tool.coverage.report]
skip_covered = true
show_missing = true
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.commitizen]
tag_format = "v$major.$minor.$patch"
[tool.mypy]
exclude = ["docs/", "site/", "tmp.*"]
warn_unused_configs = true
strict = true
[[tool.mypy.overrides]]
module = "tests.*"
strict = false
disable_error_code = ["arg-type", "attr-defined", "call-arg", "comparison-overlap", "no-redef", "no-untyped-call", "no-untyped-def", "type-arg"]
[[tool.mypy.overrides]]
module = "tests.test_cli"
disable_error_code = ["assignment"]
[[tool.mypy.overrides]]
module = "tests.test_config"
disable_error_code = ["misc", "union-attr"]
[[tool.mypy.overrides]]
module = "tests.test_inheritance"
disable_error_code = ["assignment", "misc"]
[[tool.mypy.overrides]]
module = "tests.test_mixin"
disable_error_code = ["assignment", "call-overload", "has-type", "misc", "union-attr"]
[[tool.mypy.overrides]]
module = "tests.test_serializable"
disable_error_code = ["assignment", "misc"]
[[tool.mypy.overrides]]
module = "tests.test_subprocess"
disable_error_code = ["assignment", "misc"]
[tool.pytest.ini_options]
addopts = "--verbose --cov=fancy_dataclass"