-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
183 lines (162 loc) · 4.06 KB
/
Copy pathpyproject.toml
File metadata and controls
183 lines (162 loc) · 4.06 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
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# SPDX-License-Identifier: MIT
[build-system]
requires = ["setuptools>=70.1.0", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"
[project]
name = "langchain_replicate"
authors = [{ name = "The IBM Granite Community Team", email = "granite.cookbooks@ibm.com" }]
description = "Improved LangChain integration for Replicate."
readme = "README.md"
license = "MIT"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 4 - Beta",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"replicate>=1.0.7",
"langchain_core>=1.0.0",
]
dynamic = ["version"]
[project.urls]
homepage = "https://github.com/ibm-granite-community"
source = "https://github.com/ibm-granite-community/langchain_replicate"
issues = "https://github.com/ibm-granite-community/langchain_replicate/issues"
[dependency-groups]
test = [
"pytest",
"pytest_asyncio",
"assertpy",
"types-assertpy",
]
pytest = [
{include-group = "test"},
]
pylint = [
"pylint",
{include-group = "test"},
]
ruff = [
"ruff",
{include-group = "test"},
]
mypy = [
"mypy",
{include-group = "test"},
]
[tool.setuptools_scm]
version_file = "src/langchain_replicate/_version.py"
local_scheme = "no-local-version" # do not include +gREV local version, required for Test PyPI upload
[tool.tox]
# py3-unit runs unit tests with 'python3'
# py311-unit runs the same tests with 'python3.11'
env_list = [
"ruff",
"pylint",
"mypy",
"py3-unit",
]
requires = ["tox>=4.22"]
labels = { lint = ["ruff", "pylint", "mypy"] }
[tool.tox.env_run_base]
description = "Run tests with pytest"
package = "wheel"
wheel_build_env = "pkg"
pass_env = [ "REPLICATE_API_TOKEN" ]
dependency_groups = [
"pytest",
]
commands = [
["{envpython}", "-m", "pytest", { replace = "posargs", default = ["tests"], extend = true }],
]
[tool.tox.env.pylint]
description = "Lint with pylint"
dependency_groups = [
"pylint",
]
commands = [
["{envpython}", "-m", "pylint", { replace = "posargs", default = ["src", "tests"], extend = true }],
]
[tool.tox.env.ruff]
description = "Reformat and fix code with Ruff"
skip_install = true
skip_sdist = true
dependency_groups = [
"ruff",
]
commands = [
["ruff", "check", "--fix"],
["ruff", "format"],
]
[tool.tox.env.ruffcheck]
description = "Check code with Ruff"
skip_install = true
skip_sdist = true
dependency_groups = [
"ruff",
]
commands = [
["ruff", "check", "--diff"],
["ruff", "format", "--check"],
]
[tool.tox.env.mypy]
description = "Python type checking with mypy"
namespace_packages = true
explicit_package_bases = true
dependency_groups = [
"mypy",
]
commands = [
["{envpython}", "-m", "mypy", { replace = "posargs", default = ["src", "tests"], extend = true }],
]
[tool.tox.gh.python]
"3.13" = ["py313-unit"]
"3.12" = ["py312-unit"]
"3.11" = ["py311-unit"]
"3.10" = ["py310-unit"]
[tool.mypy]
python_version = "3.10"
exclude = ["^src/langchain_replicate/_version\\.py$"]
[tool.ruff]
target-version = "py310"
src = ["src", "tests"]
extend-exclude = ["src/langchain_replicate/_version.py"]
line-length = 180
[tool.ruff.lint]
select = [
"B", # flake8-bugbear
"E", # pycodestyle
"F", # Pyflakes
"Q", # flake8-quotes
"I", # isort
"UP", # pyupgrade
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
]
[tool.pylint.main]
py-version = "3.10"
source-roots = ["src", "tests"]
ignore = ["_version.py"]
[tool.pylint.design]
max-line-length = 180
[tool.pylint.similarities]
min-similarity-lines = 10
[tool.pylint."messages control"]
disable = [
"missing-class-docstring",
"missing-module-docstring",
"missing-function-docstring",
]
[tool.pylint.reports]
reports = true
score = true
[tool.pytest.ini_options]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]