forked from ChelseaKR/oscal-validate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
95 lines (79 loc) · 2.41 KB
/
Copy pathpyproject.toml
File metadata and controls
95 lines (79 loc) · 2.41 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
[build-system]
requires = ["setuptools>=83.0.0"]
build-backend = "setuptools.build_meta"
[project]
name = "oscal-validate"
version = "0.2.0"
description = "Deterministic structural validator for OSCAL documents, run against NIST's published schema and constraint layer."
readme = "README.md"
requires-python = ">=3.12"
license = { text = "Apache-2.0" }
authors = [{ name = "Chelsea Kelly-Reif" }]
keywords = ["oscal", "nist", "fedramp", "compliance-as-code", "validation"]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Topic :: Security",
"Topic :: Software Development :: Quality Assurance",
]
dependencies = []
# The validator has no runtime dependency. The opt-in model-backed commands
# (ADR-0005) need the public SDK, which is imported lazily inside them.
[project.optional-dependencies]
ai = ["anthropic>=0.125"]
bedrock = ["anthropic[bedrock]>=0.125"]
[dependency-groups]
dev = [
"anthropic[bedrock]>=0.125",
"mypy>=1.18",
"pip-audit>=2.7",
"pytest>=8",
"pytest-cov>=5.0",
"ruff>=0.15",
]
[project.scripts]
oscal-validate = "oscal_validate.cli:entrypoint"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
oscal_validate = ["py.typed", "vendor/SOURCES.md", "vendor/oscal/*", "ai/corpus/*"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-q"
[tool.coverage.run]
branch = true
source = ["src"]
[tool.coverage.report]
fail_under = 90
show_missing = true
[tool.mypy]
strict = true
python_version = "3.12"
files = ["src", "tests", "tools", "evals"]
warn_unreachable = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = true
[[tool.mypy.overrides]]
module = "evals.*"
disallow_untyped_defs = true
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = ["E", "W", "F", "I", "UP", "B", "SIM", "RET", "C4", "C90", "PL", "S"]
ignore = [
"PLR0912", # too many branches: a schema walk is branchy by nature
"PLR0911", # too many returns
"PLR2004", # magic values
"PLR0913", # too many arguments: the walk carries its position explicitly
"PLR0917", # same reason, positional form
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["PLR0915", "S101", "S603", "PLC0415"]
"evals/*" = ["PLR0915", "S603", "S607", "PLC0415", "E402"]