-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
172 lines (157 loc) · 4.26 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "pydantic-pint"
description = "Pydantic validation for Pint Quantities."
authors = [
{name = "Tyler Hughes", email = "tylerxh111+git@proton.me"},
]
readme = "README.md"
license = { file = "LICENSE.md" }
requires-python = ">=3.8"
keywords = [
"pydantic-pint",
"pydantic",
"pint",
]
classifiers = [
"Development Status :: 1 - Planning",
"Framework :: Pydantic",
"Framework :: Pydantic :: 2",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"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",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = [
"pint>=0.20",
"pydantic>=2.0",
]
dynamic = [
"version",
]
[project.optional-dependencies]
build = [
"build",
"bumpver",
"setuptools>=61",
"setuptools-scm",
"towncrier",
"twine",
]
dev = [
"nox",
"setuptools-scm",
"pydantic-pint[build,docs,lint,tests]"
]
docs = [
"mike",
"mkdocs",
"mkdocs-exclude",
"mkdocs-material",
"mkdocs-material-extensions",
"mkdocs-minify-plugin",
"mkdocs-redirects",
"mkdocstrings",
"mkdocstrings-python",
"pygments",
"pymdown-extensions",
]
lint = [
"ruff",
]
tests = [
"pytest",
"pytest-cov",
]
[project.urls]
source = "https://github.com/tylerh111/pydantic-pint"
issues = "https://github.com/tylerh111/pydantic-pint/issues"
changes = "https://github.com/tylerh111/pydantic-pint/blob/main/CHANGES.md"
documentation = "https://pydantic-pint.readthedocs.io"
[tool.bumpver]
current_version = "0.1"
version_pattern = "MAJOR.MINOR[.PATCH][-TAG]"
commit_message = "release version {new_version}"
commit = true
tag = true
push = false
[tool.bumpver.file_patterns]
"LICENSE.md" = [
'Copyright (c) YYYY',
]
"pyproject.toml" = [
'current_version = "{version}"',
'fallback_version = "{version}"',
]
"src/pydantic_pint/__init__.py" = [
'__version__ = "{version}"',
]
[tool.coverage.run]
branch = true
[tool.coverage.report]
ignore_errors = true
exclude_also = [
"def __repr__",
"if self\\.debug",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__:",
"@(abc\\.)?abstractmethod",
]
[tool.pytest.ini_options]
addopts = ["--import-mode=importlib"]
pythonpath = "src"
[tool.ruff]
line-length = 88
indent-width = 4
target-version = "py38"
[tool.ruff.lint]
# see rules at https://docs.astral.sh/ruff/rules
extend-select = ["RUF", "C90", "UP", "I", "D"]
extend-ignore = ["D105", "D107", "F541", ]
unfixable = ["B"]
# isort = { known-first-party = ["pydantic-pint"] }
mccabe = { max-complexity = 14 }
pydocstyle = { convention = "google" }
[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401"]
"**/{docs,tests,tools}/*" = ["E402", "D"]
"**/notebooks/**/*.ipynb" = ["E402"]
"*.pyi" = ["I002"]
"noxfile.py" = ["D"]
[tool.ruff.format]
quote-style = "double"
[tool.towncrier]
version = "0.0"
directory = "changes"
filename = "CHANGES.md"
start_string = "<!-- release notes -->\n"
underlines = ["", "", ""]
title_format = "## [{version}](https://github.com/tylerh111/pydantic-pint/releases/tag/{version}) - {project_date}"
issue_format = "[{issue}](https://github.com/tylerh111/pydantic-pint/issues/{issues})"
type = [
{ name = "Features", directory = "feature", showcontent = true },
{ name = "Changes", directory = "changes", showcontent = true },
{ name = "Fixes", directory = "fix", showcontent = true },
{ name = "Documentation", directory = "docs", showcontent = true },
{ name = "Misc", directory = "misc", showcontent = false },
]
[tool.setuptools_scm]
version_scheme = "no-guess-dev"
write_to = "src/pydantic_pint/_version.py"
fallback_version = "0.1"