-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
132 lines (120 loc) · 2.69 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
[project]
name = "narrative-llm-tools"
version = "0.1.2"
description = "A set of tools to use when calling Narrative I/O LLMs."
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
readme = "README.md"
requires-python = ">=3.10, <=3.12"
dependencies = [
"requests>=2.28.1",
"pydantic",
"jmespath>=1.0.1",
"lm-format-enforcer>=0.10.9",
"cachetools>=5.5.0",
"transformers>=4.47.0",
"jsonschema==4.23.0",
"tqdm>=4.66.4",
"torch==2.3.1",
]
[tool.uv]
fork-strategy = "requires-python"
[project.scripts]
narrative-validate-conversation = "narrative_llm_tools.cli.cli:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.pytest.ini_options]
addopts = "--cov=narrative_llm_tools --cov-report=term-missing"
[tool.coverage.run]
source = ["narrative_llm_tools"]
branch = true
omit = [
"narrative_llm_tools/utils/types.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"pass",
"raise ImportError",
]
[tool.hatch.build.targets.wheel.force-include]
"narrative_llm_tools/py.typed" = "narrative_llm_tools/py.typed"
"narrative_llm_tools/templates" = "narrative_llm_tools/templates"
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
exclude = [
'tests/', # Exclude test directory
'test_*.py' # Exclude test files
]
[tool.ruff]
line-length = 100
target-version = "py310"
exclude = [
"tests",
"test_*.py",
"__pycache__",
".venv",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
[tool.black]
line-length = 100
target-version = ['py310']
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs
| \.git
| \.venv
| build
| dist
| tests
)/
)
'''
[dependency-groups]
dev = [
"pytest-cov>=6.0.0",
"mypy>=1.9.0",
"types-requests>=2.28.1",
"types-cachetools>=5.3.0.7",
"ruff>=0.8.4",
"black>=24.2.0",
"pre-commit>=4.0.1",
"pytest>=8.3.4",
"requests-mock>=1.12.1",
"accelerate>=0.26.0",
"types-jsonschema>=4.23.0",
"types-jmespath>=1.0.1",
"types-tqdm>=4.66.4",
"tomli>=2.2.1",
"djlint>=1.36.4"
]