forked from ibm-granite/granite-io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
155 lines (142 loc) · 3.78 KB
/
pyproject.toml
File metadata and controls
155 lines (142 loc) · 3.78 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
# SPDX-License-Identifier: Apache-2.0
[build-system]
requires = ["setuptools>=70.1.0", "setuptools_scm>=8", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "granite-io"
authors = [
{ name="Fred Reiss", email="frreiss@us.ibm.com" },
{ name="Gabe Goodhart", email="ghart@us.ibm.com" },
{ name="Mark Sturdevant", email="mark.sturdevant@ibm.com" },
{ name="Martin Hickey", email="martin.hickey@ie.ibm.com" },
]
description = "Input and output processing for IBM Granite models"
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"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 :: Implementation :: CPython",
]
dynamic = ["version"]
dependencies = [
"alchemy-config",
"jsonschema",
"pydantic >= 2.0.0, < 3.0", # LiteLLM requires >= 2
"rouge_score",
"aiohttp"
]
[project.optional-dependencies]
transformers = [
"transformers[torch]",
]
nltk = [
"nltk~=3.9.1",
]
openai = [
"openai >= 1.68.2, < 2.0",
]
litellm = [
"litellm >= 1.63.14, < 2.0",
"python-dotenv==1.1.0",
]
vllm = [
"vllm",
]
voting = [
"pandas",
]
retriever = [
"sentence-transformers",
"pyarrow",
]
dev = [
"isort==6.0.1",
"pre-commit>=3.0.4,<5.0",
"pylint>=2.16.2,<4.0",
"pylint-pydantic",
"pytest",
"pytest-asyncio",
"pytest-cov",
"pytest-html",
"pytest-recording~=0.13.2",
"pytest-retry~=1.7",
"ruff==0.11.13",
"tox",
"anywidget",
"ipywidgets",
"vcrpy==6.0.2", # pin to avoid flakey newer
"granite-io[transformers]",
"granite-io[nltk]",
"granite-io[openai]",
"granite-io[litellm]",
"granite-io[voting]",
"granite-io[vllm]",
"granite-io[retriever]",
]
# Dependencies needed for running notebooks. Update as required.
notebook = [
"notebook",
"aiohttp", # For AIO in notebooks
"granite-io[openai]",
"granite-io[voting]"
]
all = [
"granite-io[dev]",
"granite-io[notebook]",
]
[project.urls]
homepage = "https://github.com/ibm-granite/granite-io"
source = "https://github.com/ibm-granite/granite-io"
issues = "https://github.com/ibm-granite/granite-io/issues"
[tool.setuptools]
package-dir = { "" = "src" }
[tool.setuptools_scm]
version_file = "src/granite_io/_version.py"
# do not include +gREV local version, required for Test PyPI upload
local_scheme = "no-local-version"
[tool.setuptools.packages.find]
where = ["src"]
include = ["granite_io", "granite_io*"]
[tool.ruff]
target-version = "py310"
# same as Black's default line length
line-length = 88
[tool.ruff.lint]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# modern type annotations
extend-safe-fixes = ["UP006", "UP007"]
# Fixers will be enabled gradually.
select = [
"B", # flake8-bugbear
"E", # pycodestyle
"F", # Pyflakes
"Q", # flake8-quotes
# Ruff does not support isort's import_headings feature, yet.
# "I", # isort
# "UP", # pyupgrade
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
]
ignore = [
]
[tool.ruff.lint.isort]
# same as .isort.cfg except for settings that are commented out as that are not yet supported
# profile="black"
from-first=true
# import_heading_future="Future"
# import_heading_stdlib="Standard"
# import_heading_thirdparty="Third Party"
# import_heading_firstparty="First Party"
# import_heading_localfolder="Local"
known-local-folder=["src/granite_io","tests"]
# extend-skip="src/granite_io/_version.py"