-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
130 lines (113 loc) · 3.51 KB
/
Copy pathpyproject.toml
File metadata and controls
130 lines (113 loc) · 3.51 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
[build-system]
requires = ["hatchling", "uv-dynamic-versioning"]
build-backend = "hatchling.build"
[project]
name = "pid4cat-model"
description = "Python model equivalent of LinkML datamodel for handle-based PIDs for resources in catalysis (pid4cat)"
authors = [
# Authors sorted by number of commits
{name = "David Linke", email = "david.linke@catalysis.de"},
]
maintainers = [
{name = "David Linke", email = "david.linke@catalysis.de"},
]
license = "MIT"
license-files = ["LICENSE"]
readme = "README_pypkg.md"
requires-python = ">=3.10"
dynamic = ["version"]
dependencies = [
"linkml-runtime>=1.9.4",
"httpx (>=0.28.1,<0.29.0)",
"click (>8.2.0)",
]
[dependency-groups]
dev = [
"linkml>=1.10.0",
"mike>=2.1.3",
"mkdocs-material>=8.2.8",
"mkdocs-mermaid2-plugin>=1.1.1",
"mkdocs-pymdownx-material-extras>=2.5.6",
"jupyter>=1.0.0",
"mknotebooks>= 0.8.0",
"pytest>=8.3.5",
"coverage>=7.8.0",
]
# See https://hatch.pypa.io/latest/config/build/#file-selection for how to
# explicitly include files other than default into the build distributions.
[tool.hatch.version]
source = "uv-dynamic-versioning"
# Setup injection of the version specifier into the schema file
# Ref.: https://hatch.pypa.io/latest/plugins/build-hook/version/#pyprojecttoml
# Backslashes in the regex pattern must be escaped for TOML.
[tool.hatch.build.hooks.version]
path = "src/pid4cat_model/schema/pid4cat_model.yaml"
pattern = """^(?:version:?\\s*\\")(?P<version>\\S*)(?:\\"\\s*# Managed by dynamic-versioning.).*$"""
# Ref.: https://github.com/ninoseki/uv-dynamic-versioning/
[tool.uv-dynamic-versioning]
vcs = "git"
style = "pep440"
fallback-version = "0.0.0"
# Ref.: https://docs.pytest.org/en/stable/reference/reference.html#configuration-options
[tool.pytest.ini_options]
testpaths = ["tests"]
# https://coverage.readthedocs.io/en/latest/config.html
[tool.coverage.paths]
# Specify where coverage schould look for source files.
source = [
"src",
# "**/site-packages", # for not using tox
# ".tox/**/site-packages",
]
[tool.coverage.report]
# Show in report which lines are not covered
show_missing = false
# Any line of the source code that matches one of these regexes is excluded
# from being reported as missing.
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
"return NotImplemented",
"if __name__ == .__main__.:",
]
[tool.coverage.html]
# Directory where to write the HTML report files.
directory = ".htmlcov"
# https://docs.astral.sh/ruff/configuration/
[tool.ruff]
exclude = [
"src/pid4cat_model/_version.py",
]
# Set oldest supported Python version
target-version = "py310"
# Ref.: https://github.com/codespell-project/codespell
[tool.codespell]
skip = [
"LICENSE",
"pyproject.toml",
"uv.lock",
"project/*",
"src/pid4cat_model/datamodel/pid4cat_model_pydantic.py",
"src/pid4cat_model/datamodel/pid4cat_model.py",
"src/pid4cat_model/schema/media_types.yaml",
]
# Reminder: words have to be lowercased for the ignore-words-list
ignore-words-list = "linke"
quiet-level = 3
# Ref.: https://github.com/crate-ci/typos (spell checker)
[tool.typos.default.extend-words]
linke = "linke"
[tool.typos.default.extend-identifiers]
GTINs = "GTINs"
[tool.typos.files]
extend-exclude = [
"LICENSE",
"uv.lock",
"pyproject.toml",
"project/*",
"src/pid4cat_model/datamodel/pid4cat_model_pydantic.py",
"src/pid4cat_model/datamodel/pid4cat_model.py",
]