-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
212 lines (186 loc) · 5.3 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "fair-test"
description = "A library to define and publish FAIR metrics tests APIs complying with the FAIRMetrics working group specifications. Each API can expose multiple metric tests endpoint, each test assesses the compliance of a subject URL with a FAIR principle. Those APIs can be used by FAIR evaluation services, such as FAIR enough and the FAIR evaluator."
readme = "README.md"
requires-python = ">=3.7"
license = { file = "LICENSE.txt" }
authors = [
{ name = "Vincent Emonet", email = "[email protected]" },
]
keywords = [
"FAIR",
"test",
"evaluation",
"API",
]
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python",
"Topic :: Internet",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development",
"Typing :: Typed",
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Framework :: AsyncIO",
"Framework :: FastAPI",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
"Topic :: Internet :: WWW/HTTP",
]
dynamic = ["version"]
dependencies = [
"fastapi >=0.51.0",
"pydantic",
"python-dotenv",
"requests >=2.24.0",
"rdflib >=6.1.1",
"PyLD",
"extruct",
"PyYAML >=5.3.1",
"idutils",
]
[project.optional-dependencies]
test = [
"pytest >=7.1.3",
"pytest-cov >=2.12.0",
"ruff >=0.0.244",
"mypy ==0.971",
"black ==22.8.0",
"httpx",
"types-PyYAML",
"types-requests",
]
doc = [
"mkdocs >=1.1.2,<2.0.0",
"mkdocs-material >=8.1.4,<9.0.0",
"mkdocstrings[python]",
"mdx-include >=1.4.1,<2.0.0",
"mkdocs-markdownextradata-plugin >=0.1.7,<0.3.0",
]
dev = [
"uvicorn[standard] >=0.12.0",
"pre-commit >=2.17.0",
]
[project.urls]
Homepage = "https://github.com/MaastrichtU-IDS/fair-test"
Documentation = "https://maastrichtu-ids.github.io/fair-test"
History = "https://github.com/MaastrichtU-IDS/fair-test/releases"
Tracker = "https://github.com/MaastrichtU-IDS/fair-test/issues"
Source = "https://github.com/MaastrichtU-IDS/fair-test"
# HATCH ENVIRONMENTS AND SCRIPTS
# Envs from hatch https://hatch.pypa.io
[tool.hatch.envs.default]
features = [
"test",
"doc",
"dev",
]
post-install-commands = [
"pre-commit install",
]
# hatch run dev
[tool.hatch.envs.default.scripts]
dev = "./scripts/dev.sh"
fmt = "./scripts/format.sh"
check = "./scripts/check.sh"
docs = "./scripts/docs-serve.sh"
test = "./scripts/test.sh {args}"
# hatch run test:all
[tool.hatch.envs.test]
features = [
"test",
]
[tool.hatch.envs.test.scripts]
all = "./scripts/test.sh"
[[tool.hatch.envs.test.matrix]]
python = ["37", "38", "39", "310", "311"]
# TOOLS
[tool.hatch.build.targets.wheel]
packages = ["src/fair_test"]
[tool.hatch.version]
path = "src/fair_test/__init__.py"
[tool.coverage.run]
branch = true
parallel = true
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.mypy]
strict = false
disallow_untyped_defs = false
follow_imports = "normal"
ignore_missing_imports = true
pretty = true
show_column_numbers = true
warn_no_return = false
warn_unused_ignores = true
[tool.pytest.ini_options]
filterwarnings = [
"ignore:the imp module is deprecated in favour of importlib.*:DeprecationWarning:pyRdfa",
"ignore:It looks like you're parsing an XML document using an HTML parser.*:bs4.XMLParsedAsHTMLWarning:bs4"
]
[tool.black]
color = true
line-length = 120
target-version = ['py37']
# skip-string-normalization = true
# https://github.com/charliermarsh/ruff#supported-rules
[tool.ruff]
src = ["src", "tests", "example"]
target-version = "py37"
line-length = 120
select = [
"A",
"B", # flake8-bugbear
"C", # flake8-comprehensions
"E", # pycodestyle errors
"F", # pyflakes
# "FBT", # flake8-boolean-trap
"I", # isort
"ICN",
"N",
"PLC",
"PLE",
# "PLR", # Magic value used in comparison, consider replacing 200 with a constant variable
"PLW",
"Q",
"RUF",
"S",
# "SIM", # Use `contextlib.suppress(Exception)` instead of try-except-pass
"T",
"TID",
"UP",
"W", # pycodestyle warnings
"YTT",
]
ignore = [
"E501", # line too long
"B008", # do not perform function calls in argument defaults
"B006", # do not use mutable data structures for argument defaults
"C901", # too complex
"S101", # Use of `assert` detected
"T201", "T203", # remove print and pprint
"A001", "A002", "A003", # Argument and class is shadowing a python builtin
]
[tool.ruff.per-file-ignores]
"__init__.py" = ["I", "F401"] # module imported but unused