-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
160 lines (142 loc) · 4.06 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
[tool.poetry]
name = "prompt-templates"
version = "0.0.12"
description = "A library for working with prompt templates locally or on the Hugging Face Hub."
authors = ["MoritzLaurer <[email protected]>"]
license = "Appache-2.0"
readme = "README.md"
homepage = "https://github.com/MoritzLaurer/prompt_templates"
[tool.poetry.dependencies]
python = "^3.10"
huggingface-hub = "^0.26.5"
python-dotenv = "^1.0.1"
jinja2 = "^3.1.4"
ruamel-yaml = "^0.18.6"
backports-tarfile = {markers = "python_version < \"3.12\"", version = "^1.2.0"}
openai = {version = "^1.57.2", optional = true}
anthropic = {version = "^0.40.0", optional = true}
boto3 = {version = "^1.35.78", optional = true}
datasets = {version = "^3.2.0", optional = true}
numpy = { version = "^1.26.0", optional = true }
langchainhub = { version = "^0.1.21", optional = true }
langchain-core = { version = "^0.3.12", optional = true }
langgraph = { version = "^0.2.38", optional = true }
langchain-openai = { version = "^0.2.2", optional = true }
langchain-anthropic = { version = "^0.2.3", optional = true }
transformers = {version = "^4.47.0", optional = true}
accelerate = {version = "^1.2.0", optional = true}
yfinance = {version = "^0.2.50", optional = true}
google-genai = {version = "^0.3.0", optional = true}
[tool.poetry.extras]
inference = [
"langchain-core", "langchainhub", "langgraph",
"langchain-openai", "langchain-anthropic",
"openai", "anthropic", "boto3",
"transformers", "accelerate",
"yfinance", "google-genai"
]
[tool.poetry.group.docs.dependencies]
mkdocs = "^1.6.1"
mkdocstrings = {extras = ["python"], version = "^0.24.0"}
mkdocs-material-extensions = "^1.3.1"
griffe = "^0.38.1"
mkdocs-material = {version = "^9.5.0", extras = ["imaging"]}
mkdocs-autorefs = "^1.2.0"
pytz = "^2024.2"
[tool.poetry.group.dev.dependencies]
ipykernel = "^6.29.5"
ipywidgets = "^8.1.5"
jupyter = "^1.1.1"
pytest = "^8.3.3"
pytest-cov = "^5.0.0"
pytest-mock = "^3.14.0"
ruff = "^0.7.1"
mypy = "^1.13.0"
types-pyyaml = "^6.0.12.20240917"
pre-commit = "^4.0.1"
types-setuptools = "^75.6.0.20241126"
black = "^24.10.0"
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests", "prompt_templates", "docs"]
python_files = ["test_*.py", "*.py", "*.md"]
pythonpath = [".","src"]
addopts = [
"--verbose",
"--cov=prompt_templates",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-branch",
"--cov-fail-under=50",
"--doctest-modules",
"--doctest-glob=*.md"
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::UserWarning",
]
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"IGNORE_EXCEPTION_DETAIL",
"ELLIPSIS"
]
[tool.coverage.run]
branch = true
source = ["prompt_templates"]
omit = [
"tests/*",
"**/__init__.py",
]
[tool.coverage.report]
show_missing = true
fail_under = 50
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if __name__ == .__main__.:",
"raise NotImplementedError",
"raise ImportError",
"except ImportError:",
]
[tool.ruff]
line-length = 119
indent-width = 4
target-version = "py310"
# Exclude files/folders
exclude = [
".git",
".venv",
"build",
"dist",
"scripts/testing.ipynb",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors (basic Python style)
"F", # pyflakes (detect logical errors)
"I", # isort (import sorting)
"W", # pycodestyle warnings
"B", # flake8-bugbear (detect bugs/design problems)
#"UP", # pyupgrade (modernize Python code)
"N", # pep8-naming (naming conventions)
"C4", # comprehensions (better list/dict comprehensions)
]
ignore = [
"E501", # line length violations
"B905", # strict parameter type checking
"N999", # invalid module name
]
[tool.ruff.lint.isort]
known-first-party = ["prompt_templates"]
lines-after-imports = 2
[tool.ruff.lint.pydocstyle]
convention = "google" # Use Google-style docstrings
[tool.mypy]
# Type checking
python_version = "3.10"
strict = true
ignore_missing_imports = true
exclude = ['tests/.*']
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"