openai/chatkit-python

Public

mirrored fromhttps://github.com/openai/chatkit-pythonAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
main

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

pyproject.toml

98lines · modecode

1[project]
2name = "openai-chatkit"
3version = "1.6.5"
4description = "A ChatKit backend SDK."
5readme = "README.md"
6requires-python = ">=3.10"
7dependencies = ["pydantic", "uvicorn", "openai", "openai-agents>=0.3.2", "jinja2>=3.1,<4"]
8
9[dependency-groups]
10dev = [
11 "griffe==1.14.0",
12 "pytest", "pytest-asyncio", "debugpy", "fastapi", "python-multipart", "psycopg2-binary", "flask", "pyright",
13 "mypy", "ruff==0.9.2",
14 "mkdocs", "mkdocs-material", "mkdocstrings==0.30.1", "mkdocstrings-python==1.18.2", "mkdocs-gen-files"
15]
16lint = [
17 "ruff"
18]
19
20[tool.ruff]
21line-length = 88
22preview = true
23
24[tool.ruff.lint]
25# To customise ruff rules for your project, use the "extend", "extend-select" and "extend-ignore"
26# keys in your project configuration. This can let you inherit most of this configuration.
27select = [
28 "E", "F", "W", "B", "C4", "PIE", "NPY", "PLE", "I",
29 # grab bag of random things
30 "DTZ003", "DTZ004",
31 "G010",
32 "PLW0120", "PLW0129", "PLW0711", "PLW2101",
33 "SIM101", "SIM110", "SIM201", "SIM202", "SIM210", "SIM211", "SIM222", "SIM223", "SIM401",
34 "S506",
35 "RET501", "RET502", # RET503 is also nice, but there's currently some noise
36 "RUF006", "RUF007", "RUF008", "RUF013", "RUF016", "RUF017", "RUF200",
37 "COM818", "COM819",
38 "PYI016", "PYI018", "PYI025", "PYI030",
39 "PERF102",
40 "UP001", "UP003", "UP004", "UP006", "UP007", "UP028", "UP034", "UP045",
41 "FURB132", "FURB148", "FURB163", "FURB181",
42 # "ASYNC",
43 "ASYNC251",
44 "TID251",
45 "PT008", "PT012", "PT010", "PT014",
46 "TC005",
47 "ANN205", "ANN206",
48 # "ANN2", # Nice to have, but a lot of existing failures.
49
50 # Blocked due to https://github.com/astral-sh/ruff/issues/8322 and to a lesser degree https://github.com/numpy/numpy/issues/7242
51 # "PLR6201"
52]
53ignore = [
54 "B905", # TODO: a useful lint, but need ruff to release my autofix
55 "B028", # TODO: looks useful, disabled to minimize code change in ruff 0.8.2 upgrade
56
57 "E2", # leave it to black
58 "E3", # leave it to black
59 "E402", # a people usually know what they're doing
60 "E501", # line too long. black does a good enough job
61 "E701", # multiple statements on one line. black does a good enough job
62 "E711", # comparison to None is commonly used with SQLAlchemy
63 "E731", # lambda expression assignments. these are nice sometimes
64 "E741", # variable names like "l". this isn't a huge problem
65 "B011", # assert false. we don't use python -O
66 "B903", # nice, but doesn't really change anything, maybe worth it if it gains an autofix
67 "C408", # we often use dict with keyword args
68 "C409", # https://github.com/astral-sh/ruff/issues/12912
69 "C419", # https://github.com/astral-sh/ruff/issues/10838
70 "C420", # interesting, but i think reads a little worse to most folks. fromkeys predates dict comprehensions
71 "UP035", # not necessary
72 "UP038", # slows down code
73 "NPY002", # useful in theory, but way too many existing hits in practice
74 "PIE790", # there's nothing wrong with pass
75 "SIM108", # not convinced of the value
76 "ASYNC109", # not convinced of the value
77 "ASYNC230", # this is annoying, SSDs are fast
78]
79extend-safe-fixes = ["ALL"]
80preview = true
81
82[tool.pytest.ini_options]
83asyncio_mode = "auto"
84asyncio_default_fixture_loop_scope = "function"
85
86[tool.pyright]
87include = ["."]
88exclude = ["**/.venv", "**/.pytest_cache"]
89venvPath = "."
90venv = ".venv"
91pythonVersion = "3.10"
92typeCheckingMode = "standard"
93
94[tool.setuptools]
95packages = ["chatkit"]
96
97[tool.setuptools.package-data]
98"chatkit" = ["py.typed"]
99