Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
129 lines (112 loc) · 3.39 KB
/
Copy pathpyproject.toml
File metadata and controls
129 lines (112 loc) · 3.39 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
[build-system]
requires = ["setuptools>=80", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"
[project]
name = "endpoints-submission-cli"
dynamic = ["version"]
description = "CLI tool for managing MLPerf endpoint submissions"
readme = "README.md"
requires-python = ">=3.10"
license = "Apache-2.0"
authors = [{ name = "MLCommons", email = "arav@mlcommons.org" }]
dependencies = [
"click>=8.1",
"httpx>=0.25",
"pydantic>=2.0",
"rich>=13.0",
"pyyaml>=6.0",
]
[project.scripts]
endpoints-submission-cli = "endpoints_submission_cli.main:main"
endpoints-submission-mcp = "endpoints_submission_cli.mcp_server:main"
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"pytest-mock>=3.0",
"ruff>=0.4",
"mypy>=1.10",
"types-PyYAML",
# So CI type-checks and tests the MCP server; users get it from the mcp extra.
"mcp>=2.0,<3",
]
docs = [
"sphinx>=7.0",
"sphinx-autodoc-typehints>=2.0",
"furo>=2024.1",
]
# The MCP server (endpoints-submission-mcp). Written against mcp 2.x's MCPServer.
mcp = [
"mcp>=2.0,<3",
]
[tool.setuptools_scm]
[tool.setuptools]
packages = [
"endpoints_submission_cli",
"endpoints_submission_cli.commands",
"endpoints_submission_cli.commands.runs",
"endpoints_submission_cli.commands.submissions",
"endpoints_submission_cli.runs",
"endpoints_submission_cli.submissions",
"submission_checker",
"submission_checker.models",
"submission_checker.models.aggregate",
"submission_checker.models.file",
]
[tool.setuptools.package-dir]
"" = "src"
[tool.setuptools.package-data]
# The published seed sets (§4.6) ship as data so a newly published set can be
# supplied without a checker release; see submission_checker.seed_sets.
submission_checker = ["data/*.yaml"]
endpoints_submission_cli = ["skills/*/SKILL.md"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--cov=src --cov-report=term-missing -v"
markers = [
"unit: fast, isolated unit tests (no network, no subprocesses)",
"integration: tests that require a running API at http://localhost:8080",
]
[tool.coverage.run]
source = ["src"]
[tool.coverage.report]
show_missing = true
[tool.mypy]
python_version = "3.10"
strict = true
warn_unreachable = true
files = ["src"]
[[tool.mypy.overrides]]
module = ["yaml.*"]
ignore_missing_imports = true
[tool.ruff]
src = ["src"]
line-length = 100
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes (unused imports, undefined names)
"I", # isort
"UP", # pyupgrade (modern Python syntax)
"B", # flake8-bugbear (likely bugs / bad practices)
"C4", # flake8-comprehensions (unnecessary comprehension patterns)
"SIM", # flake8-simplify
"D", # pydocstyle (Google-style docstrings)
]
ignore = [
"SIM108", # ternary operator — sometimes less readable
"D105", # magic methods don't need docstrings
"D107", # __init__ docstrings belong on the class
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
known-first-party = ["submission_checker"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"TCH", # test files don't need TYPE_CHECKING optimisation
"E501", # long patch() target strings are unavoidable in test files
"SIM117", # deeply-nested with-patch blocks are intentional for clarity
"D", # docstrings not required in test files
]