-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
168 lines (154 loc) · 4.1 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
[project]
name = "typed-prompt"
version = "0.1.2"
description = "A simple type-safe, validated prompt management system for LLMs"
readme = "README.md"
authors = [
{ name = "SamBroomy", email = "[email protected]" },
]
requires-python = ">=3.10"
keywords = [
"llm",
"prompt-engineering",
"type-safety",
"templating",
"pydantic",
"jinja2",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = ["jinja2>=3.0.1", "pydantic>=2.0.0"]
[project.urls]
Homepage = "https://github.com/SamBroomy/typed-prompt"
Documentation = "https://github.com/SamBroomy/typed-prompt#readme"
Repository = "https://github.com/SamBroomy/typed-prompt.git"
Changelog = "https://github.com/SamBroomy/typed-prompt/blob/main/CHANGELOG.md"
[dependency-groups]
dev = [
"bumpversion>=0.6.0",
"pre-commit>=4.0.1",
"pytest>=8.3.4",
"pytest-cov>=6.0.0",
"ruff>=0.8.2",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = """
-v
--doctest-modules
--cov=typed_prompt
--cov-report=term-missing
--cov-report=html
"""
[tool.coverage.run]
source = ["typed_prompt"]
branch = true
omit = ["tests/*", "examples/user.py"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if __name__ == .__main__.:",
"raise NotImplementedError",
"pass",
"raise ImportError",
]
show_missing = true
fail_under = 80
[tool.coverage.html]
directory = "htmlcov_report"
[tool.ruff]
line-length = 120
src = ["src", "tests"]
show-fixes = true
[tool.ruff.lint]
select = [
"F", # Pyflakes
"E", # Pycodestyle errors
"C90", # McCabe complexity
"I", # isort
"N", # pep8-naming
"UP", # Pyupgrade
"ANN", # Flake8-annotations
"ASYNC", # Flake8-async
"BLE", # Flake8-blind-except
"FBT", # Flake8-boolean-trap
"B", # Flake8-bugbear
"A", # Flake8-builtins
#"COM", # Flake9-commas
"C4", # Flake8-comprehensions
"EM", # Flake8-errmsgs
"FA", # Flake8-future-annotations
"ISC", # Flake8-implicit-str-concat
"LOG", # Flake8-logging
"G", # Flake8-logging-format
"INP", # Flake8-no-pep420
"PIE", # Flake8-pie
"T20", # Flake8-print
"PT", # Flake8-pytest
"Q", # Flake8-quotes
"RSE", # Flake8-raise
"RET", # Flake8-return
#SLF", # Flake8-self
"SIM", # Flake8-simplify
"TID", # Flake8-tidy-imports
"TC", # Flake8-type-checking
"INT", # Flake8-gettext
"ARG", # Flake8-unused-arguments
"PTH", # Flake8-pathlib
"TD", # Flake8-todo
"ERA", # Flake8-eradicate
"PLC", # Pylint-convention
"PLE", # Pylint-error
"PLW", # Pylint-warning
#"PLR", # Pylint-refactor
"TRY", # Flake8-tryceratops
"FLY", # Flint
"NPY", # Numpy
"FAST", # Fast-Api
"PERF", # Perflint
"FURB", # Refurb
"RUF", # Ruff
]
preview = true
# Allow fix for all enabled rules
fixable = ["ALL"]
ignore = ["ANN401", "ANN003", "PLC2701", "N804"]
[tool.ruff.lint.per-file-ignores]
"examples/user.py" = ["T201", "INP001"]
"tests/**.py" = ["ANN201", "PT011"]
[tool.ruff.format]
skip-magic-trailing-comma = true
preview = true
docstring-code-format = true
docstring-code-line-length = "dynamic"
[tool.bumpversion]
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "^version = \"{current_version}\"$"
replace = "version = \"{new_version}\""
regex = true
ignore_missing_version = false
ignore_missing_files = false
tag = false
sign_tags = false
tag_name = "{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = true
commit = false
message = "Bump version: {current_version} → {new_version}"
commit_args = ""
setup_hooks = []
pre_commit_hooks = []
post_commit_hooks = []