openai-python

Форк
0
/
pyproject.toml 
182 строки · 3.8 Кб
1
[project]
2
name = "openai"
3
version = "1.13.3"
4
description = "The official Python library for the openai API"
5
readme = "README.md"
6
license = "Apache-2.0"
7
authors = [
8
{ name = "OpenAI", email = "support@openai.com" },
9
]
10
dependencies = [
11
    "httpx>=0.23.0, <1",
12
    "pydantic>=1.9.0, <3",
13
    "typing-extensions>=4.7, <5",
14
    "anyio>=3.5.0, <5",
15
    "distro>=1.7.0, <2",
16
    "sniffio",
17
    "cached-property; python_version < '3.8'",
18
    "tqdm > 4"
19
]
20
requires-python = ">= 3.7.1"
21
classifiers = [
22
  "Typing :: Typed",
23
  "Intended Audience :: Developers",
24
  "Programming Language :: Python :: 3.7",
25
  "Programming Language :: Python :: 3.8",
26
  "Programming Language :: Python :: 3.9",
27
  "Programming Language :: Python :: 3.10",
28
  "Programming Language :: Python :: 3.11",
29
  "Programming Language :: Python :: 3.12",
30
  "Operating System :: OS Independent",
31
  "Operating System :: POSIX",
32
  "Operating System :: MacOS",
33
  "Operating System :: POSIX :: Linux",
34
  "Operating System :: Microsoft :: Windows",
35
  "Topic :: Software Development :: Libraries :: Python Modules",
36
  "License :: OSI Approved :: Apache Software License"
37
]
38

39
[project.optional-dependencies]
40
datalib = ["numpy >= 1", "pandas >= 1.2.3", "pandas-stubs >= 1.1.0.11"]
41

42
[project.urls]
43
Homepage = "https://github.com/openai/openai-python"
44
Repository = "https://github.com/openai/openai-python"
45

46
[project.scripts]
47
openai = "openai.cli:main"
48

49
[tool.rye]
50
managed = true
51
# version pins are in requirements-dev.lock
52
dev-dependencies = [
53
    "pyright",
54
    "mypy",
55
    "respx",
56
    "pytest",
57
    "pytest-asyncio",
58
    "ruff",
59
    "time-machine",
60
    "nox",
61
    "dirty-equals>=0.6.0",
62
    "importlib-metadata>=6.7.0",
63
    "azure-identity >=1.14.1",
64
    "types-tqdm > 4",
65
    "types-pyaudio > 0"
66
]
67

68
[tool.rye.scripts]
69
format = { chain = [
70
  "format:ruff",
71
  "format:docs",
72
  "fix:ruff",
73
]}
74
"format:black" = "black ."
75
"format:docs" = "python bin/ruffen-docs.py README.md api.md"
76
"format:ruff" = "ruff format"
77
"format:isort" = "isort ."
78

79
"lint" = { chain = [
80
  "check:ruff",
81
  "typecheck",
82
]}
83
"check:ruff" = "ruff ."
84
"fix:ruff" = "ruff --fix ."
85

86
typecheck = { chain = [
87
  "typecheck:pyright",
88
  "typecheck:mypy"
89
]}
90
"typecheck:pyright" = "pyright"
91
"typecheck:verify-types" = "pyright --verifytypes openai --ignoreexternal"
92
"typecheck:mypy" = "mypy ."
93

94
[build-system]
95
requires = ["hatchling"]
96
build-backend = "hatchling.build"
97

98
[tool.hatch.build]
99
include = [
100
  "src/*"
101
]
102

103
[tool.hatch.build.targets.wheel]
104
packages = ["src/openai"]
105

106
[tool.black]
107
line-length = 120
108
target-version = ["py37"]
109

110
[tool.pytest.ini_options]
111
testpaths = ["tests"]
112
addopts = "--tb=short"
113
xfail_strict = true
114
asyncio_mode = "auto"
115
filterwarnings = [
116
  "error"
117
]
118

119
[tool.pyright]
120
# this enables practically every flag given by pyright.
121
# there are a couple of flags that are still disabled by
122
# default in strict mode as they are experimental and niche.
123
typeCheckingMode = "strict"
124
pythonVersion = "3.7"
125

126
exclude = [
127
    "_dev",
128
    ".venv",
129
    ".nox",
130
]
131

132
reportImplicitOverride = true
133

134
reportImportCycles = false
135
reportPrivateUsage = false
136

137
[tool.ruff]
138
line-length = 120
139
output-format = "grouped"
140
target-version = "py37"
141
select = [
142
  # isort
143
  "I",
144
  # bugbear rules
145
  "B",
146
  # remove unused imports
147
  "F401",
148
  # bare except statements
149
  "E722",
150
  # unused arguments
151
  "ARG",
152
  # print statements
153
  "T201",
154
  "T203",
155
  # misuse of typing.TYPE_CHECKING
156
  "TCH004"
157
]
158
ignore = [
159
  # mutable defaults
160
  "B006",
161
]
162
unfixable = [
163
  # disable auto fix for print statements
164
  "T201",
165
  "T203",
166
]
167
ignore-init-module-imports = true
168

169
[tool.ruff.format]
170
docstring-code-format = true
171

172
[tool.ruff.lint.isort]
173
length-sort = true
174
length-sort-straight = true
175
combine-as-imports = true
176
extra-standard-library = ["typing_extensions"]
177
known-first-party = ["openai", "tests"]
178

179
[tool.ruff.per-file-ignores]
180
"bin/**.py" = ["T201", "T203"]
181
"tests/**.py" = ["T201", "T203"]
182
"examples/**.py" = ["T201", "T203"]
183

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.