-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
136 lines (120 loc) · 3.32 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "cleanlab-tlm"
dynamic = ["version"]
description = 'Python client library for Cleanlab Trustworthy Language Model'
readme = "README.md"
requires-python = ">=3.9"
license = "MIT"
keywords = []
authors = [
{ name = "Cleanlab Inc", email = "[email protected]" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"aiohttp>=3.8.1",
"nest_asyncio>=1.5.0",
"pandas==2.*",
"requests>=2.27.1",
"tqdm>=4.64.0",
"semver>=2.13.0,<3.0.0",
"typing_extensions>=4.2.0",
]
[project.urls]
Documentation = "https://github.com/cleanlab/cleanlab-tlm#readme"
Issues = "https://github.com/cleanlab/cleanlab-tlm/issues"
Source = "https://github.com/cleanlab/cleanlab-tlm"
[tool.hatch.version]
path = "src/cleanlab_tlm/__about__.py"
[tool.hatch.envs.types]
extra-dependencies = [
"mypy>=1.0.0",
"pytest",
"pytest-asyncio",
"python-dotenv",
]
[tool.hatch.envs.types.scripts]
check = "mypy --strict --install-types --non-interactive {args:src/cleanlab_tlm tests}"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.envs.hatch-test]
extra-dependencies = [
"python-dotenv",
"pytest-asyncio",
]
[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.12" ] } ]
[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]
source_pkgs = ["cleanlab_tlm", "tests"]
branch = true
parallel = true
omit = [
"src/cleanlab_tlm/__about__.py",
"*/tests/*",
]
[tool.coverage.paths]
cleanlab_tlm = ["src/cleanlab_tlm", "*/cleanlab-tlm/src/cleanlab_tlm"]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.hatch.envs.coverage]
detached = true
dependencies = [
"coverage",
]
[tool.hatch.envs.coverage.scripts]
report = "coverage report --fail-under=60"
html = "coverage html"
xml = "coverage xml"
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
filterwarnings = [
"error",
"ignore:prompt.*failed.*:UserWarning", # Expected warnings from TLM error testing
"ignore:Please ensure that your SSL certificates are up to date.*:UserWarning", # SSL cert warning
"ignore:Exception ignored in:pytest.PytestUnraisableExceptionWarning", # Async cleanup warning
"ignore:There is no current event loop:DeprecationWarning", # Asyncio event loop warning
]
[tool.ruff.lint]
ignore = [
"FA100",
"UP007",
"UP006",
"T201",
"FBT001",
"FBT002",
"S101",
"TRY003",
"EM101",
"EM102",
"B904",
"B028",
"BLE001"
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"SLF001", # private member accessed
"S311", # random number generator
"DTZ005", # datetime timezone
]