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