Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
73 lines (62 loc) · 1.95 KB
/
Copy pathpyproject.toml
File metadata and controls
73 lines (62 loc) · 1.95 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "traust-contracts"
version = "0.57.0"
license = "Apache-2.0"
description = "Contract surface for the AI security ledger ecosystem: schemas and shared enums"
requires-python = ">=3.11"
# jsonschema's `format-nongpl` extra supplies the format assertors the schemas
# already declare. Without it `format: date-time` is a SILENT no-op: an
# unregistered format passes everything, so FormatChecker().conforms(
# 'TrueT00:00:00+00:00', 'date-time') returned True. `format-nongpl` rather
# than `format` because it pulls MIT rfc3339-validator instead of the GPL
# strict-rfc3339, which this Apache-2.0 repo cannot take.
dependencies = [
"jsonschema[format-nongpl]>=4.0",
"pydantic>=2.0",
"pyyaml>=6.0",
]
[project.optional-dependencies]
postgres = ["psycopg>=3"]
[dependency-groups]
dev = ["psycopg[binary]>=3", "pytest>=9.1.1", "ruff>=0.6", "vulture>=2.16"]
[tool.hatch.build.targets.wheel]
packages = ["src/traust_contracts"]
[tool.hatch.build.targets.sdist]
exclude = ["/.ci-venv", "/.venv", "/tests/fixtures/storage"]
[tool.hatch.build.targets.wheel.force-include]
"schemas/v1" = "traust_contracts/schemas/v1"
"config/v1" = "traust_contracts/config/v1"
"enums/v1" = "traust_contracts/enums/v1"
"storage/v1" = "traust_contracts/storage/v1"
"ledger/v1" = "traust_contracts/ledger/v1"
[tool.hatch.build]
artifacts = [
"schemas/v1/**",
"config/v1/**",
"enums/v1/**",
"storage/v1/**",
"ledger/v1/**",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
# Deliberately strict: this repo is small, public-bound, and human-reviewed.
select = [
"E",
"W", # pycodestyle
"F", # pyflakes
"I", # import sorting
"UP", # pyupgrade
"B", # bugbear
"SIM", # simplify
"PTH", # use pathlib
"RUF", # ruff-specific
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]