-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
128 lines (106 loc) · 2.83 KB
/
pyproject.toml
File metadata and controls
128 lines (106 loc) · 2.83 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "trustworthy-llm"
dynamic = ["version"]
description = "Core functionality for TLM"
readme = "README.md"
requires-python = ">=3.10"
license = "Apache-2.0"
license-files = ["LICENSE"]
dependencies = [
"jsonpath-ng>=1.7.0",
"litellm>=1.77.2",
"numpy>=2.1.3",
"openai>=2.0.0",
"pandas>=2.0.0",
"pandas-stubs>=2.0.0",
"pydantic>=2.9.2",
"pydantic-settings>=2.0.0",
]
[tool.hatch.version]
path = "tlm/__about__.py"
[project.optional-dependencies]
dev = [
"coverage>=7.6.4",
"pytest>=8.3.3",
"ruff>=0.7.2",
"pre-commit>=4.0.1",
"pytest-asyncio>=0.24.0",
"pytest-dotenv>=0.5.2",
"pytest-profiling>=1.7.0",
"pytest-recording>=0.13.2",
]
[tool.hatch.envs.default]
installer = "uv"
[tool.hatch.envs.types]
extra-dependencies = [
"mypy>=1.0.0",
"pytest>=8.3.3",
"pytest-recording>=0.13.2",
]
[[tool.hatch.envs.types.matrix]]
python = ["3.11", "3.12", "3.13", "3.14"]
[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args:tlm tests}" # TODO: add --strict flag
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
log_cli = true
log_cli_level = "INFO"
log_cli_format = "%(asctime)s [%(levelname)8s] %(name)s: %(message)s"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
log_level = "INFO"
[tool.hatch.envs.hatch-test]
extra-dependencies = [
"vcrpy>=8.0.0",
"pytest-asyncio>=1.3.0",
]
[tool.hatch.envs.hatch-test.env-vars]
COVERAGE_FAIL_UNDER = ""
[tool.hatch.envs.hatch-test.overrides]
matrix.python.env-vars = [ { key = "COVERAGE_FAIL_UNDER", value = "--fail-under=60", if = [ "3.13" ] } ]
[tool.hatch.envs.hatch-test.scripts]
run = "pytest{env:HATCH_TEST_ARGS:} {args}"
run-cov = "coverage run -m pytest{env:HATCH_TEST_ARGS:} {args}"
cov-combine = "coverage combine"
cov-report = "coverage report {env:COVERAGE_FAIL_UNDER}"
[tool.coverage.run]
omit = [
"tests/*",
]
[tool.coverage.report]
show_missing = true
fail_under = 60
[tool.hatch.envs.hatch-static-analysis]
config-path = "none"
[tool.ruff]
# The maximum line length that the formatter will allow.
line-length = 120
extend-exclude = ["notebooks"]
[tool.ruff.lint]
extend-select = ["INP"]
# Ignore F401 (unused imports) for conftest.py files
per-file-ignores = {"**/conftest.py" = ["F401"], "**/tests/**/*.py" = ["INP"]}
[tool.isort]
line_length = 120
profile = "black"
[tool.hatch.build.targets.wheel]
packages = ["tlm"]
[dependency-groups]
dev = [
"mypy>=1.19.1",
]
[tool.hatch.envs.docs]
extra-dependencies = [
"mkdocs-jupyter>=0.25.1,<0.26",
"mkdocs-llmstxt>=0.4,<0.5",
"mkdocs-material[imaging]>=9.6,<10",
"mkdocs>=1.6.1,<2",
"mkdocstrings[python]>=0.30,<0.31",
"ruff>=0.14,<0.15",
]
[tool.hatch.envs.docs.scripts]
build = "mkdocs build"
serve = "mkdocs serve"