gpt_chat_bot/pyproject.toml
Dmitry Afanasyev 28895f3510
remove models update from migrations (#80)
* add bot models update script

* add last question at field

* update README.md
2024-01-08 21:33:35 +03:00

251 lines
5.7 KiB
TOML

[tool.poetry]
name = "chat_gpt_bot"
version = "1.5.1"
description = "Bot to integrated with Chat gpt"
authors = ["Dmitry Afanasyev <Balshbox@gmail.com>"]
[build-system]
requires = ["poetry-core>=1.7.1"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.dependencies]
python = "^3.12"
fastapi = "^0.108"
python-telegram-bot = {version = "^20.6", extras=["ext"]}
python-dotenv = "^1.0"
python-dateutil = "*"
httpx = "^0.25"
aiohttp = "^3.9"
loguru = "^0.7"
pydantic = "^2.5"
pydantic-settings = "^2.1"
gunicorn = "^21.2"
uvicorn = "^0.25"
wheel = "^0.42"
orjson = "^3.9"
sentry-sdk = "^1.39"
SpeechRecognition = "^3.8"
greenlet = "^3.0"
graypy = "^2.1.0"
aiosqlite = "^0.19.0"
yarl = "^1.9"
sqlalchemy = {version = "^2.0", extras=["mypy"]}
alembic = "^1.13"
sqladmin = {version = "^0.16", extras=["full"]}
pydub = {git = "https://github.com/jiaaro/pydub.git"}
types-pytz = "^2023.3.1.1"
[tool.poetry.dev-dependencies]
ipython = "^8.19"
factory-boy = "^3.3"
Faker = "^20"
safety = "^2.4.0b2"
pip-audit = "^2.6"
yamllint = "^1.33"
tomlkit = "^0.12"
bandit = "^1.7"
pyupgrade = "^3.10"
isort = "^5.12"
black = "^23.12"
mypy = "^1.8"
types-PyMySQL = "^1.0"
types-python-dateutil = "^2.8"
pytest = "^7.4"
pytest-asyncio = "^0.15.1"
pytest-deadfixtures = "^2.2"
pytest-repeat = "^0.9"
pytest-testmon = "^2.1"
pytest-mock = "^3.12"
pytest-cov = "^4.1"
pytest-timeout = "^2.1"
pytest-timeouts = "^1.2"
pytest-sugar = "^0.9"
pytest-clarity = "^1.0"
pytest-env = "^1.1"
nest-asyncio = "^1.5"
pytest-html = "^4.1"
pytest-randomly = "^3.15"
pytest-split = "^0.8"
pytest-freezegun = "^0.4"
pytest-socket = "^0.6"
assertpy = "^1.1"
respx = "^0.20"
coverage = "^7.4"
autoflake = "^2.2"
flake8-aaa = "^0.17.0"
flake8-variables-names = "^0.0.6"
flake8-deprecated = "^2.2.1"
flake8-annotations-complexity = "^0.0.8"
flake8-useless-assert = "^0.4.4"
flake8-newspaper-style = "^0.4.3"
flake8-comments = "^0.1.2"
flake8-logging-format = "^0.9"
flake8-comprehensions = "^3.14"
flake8-eradicate = "^1.5"
flake8-pytest-style = "^1.7"
flake8-bugbear = "^23.12"
flake8-warnings = "^0.4"
flake8-debugger = "^4.1"
flake8-fixme = "^1.1"
flake8-simplify = "^0.21"
flake8-bandit = "^4.1"
Flake8-pyproject = "^1.2.3"
ruff = "^0.1"
[tool.flake8]
inline-quotes = "double"
max-line-length = 120
max-expression-complexity = 10
max-complexity = 10
ban-relative-imports = true
nested-classes-whitelist = ["Config", "Meta"]
pytest-parametrize-names-type = "csv"
exclude = [
"chatgpt_microservice/*",
".cache/*",
".pytest_cache/*",
"*/__pycache__/*",
]
ignore = [
# use isort instead
"I",
# use black style
"E203", "W", "G004", "VNE003",
# user FastAPI Depends in function calls
"B008"
]
per-file-ignores = [
"bot_microservice/tests/*: S101",
"bot_microservice/tests/integration/conftest.py: NEW100",
"bot_microservice/settings/config.py: S104",
"bot_microservice/tests/unit/test_system_utils.py: S101, AAA01"
]
[tool.autoflake]
in-place = true
ignore-init-module-imports = true
remove-unused-variables = true
remove-all-unused-imports = true
remove-duplicate-keys = true
[tool.isort]
profile = "black"
multi_line_output = 3
src_paths = ["bot_microservice",]
combine_as_imports = true
[tool.mypy]
allow_redefinition = false
namespace_packages = true
check_untyped_defs = true
disallow_untyped_decorators = false
disallow_any_explicit = false
disallow_any_generics = true
disallow_untyped_calls = true
disallow_untyped_defs = true
ignore_errors = false
ignore_missing_imports = true
implicit_reexport = false
local_partial_types = true
strict_optional = true
strict_equality = true
show_error_codes = true
no_implicit_optional = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unreachable = true
warn_no_return = true
exclude = [
"chatgpt_microservice/*",
"bot_microservice/infra/database/migrations/versions/*"
]
plugins = [
"sqlalchemy.ext.mypy.plugin",
]
[tool.black]
line-length = 120
target-version = ['py311']
[tool.coverage.run]
relative_files = true
concurrency = ["greenlet", "thread"]
[tool.coverage.report]
sort = "cover"
skip_covered = true
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = "tests"
python_files = [
# tests declarations
"test_*.py",
# base test scenarios and helpers for tests
"support.py",
]
filterwarnings = [
"error",
"ignore::DeprecationWarning",
"ignore:_SixMetaPathImporter.*not found:ImportWarning",
"ignore::telegram.warnings.PTBUserWarning"
]
addopts = '''
--disable-socket
--allow-unix-socket
--allow-hosts=::1,127.0.0.1
--strict-markers
--tb=short
--cov=app
--cov=settings
--cov=tests
--cov-branch
--cov-fail-under=90
--cov-config=.coveragerc
--cov-context=test
--no-cov
'''
[tool.ruff]
extend-select = ["F", "I", "PL", "E", "W", "C4", "PT", "B", "T10", "SIM", "TID", "T20", "PGH", "S", "RET", "ERA", "PIE", "UP", "ASYNC", "ISC", "PERF", "DTZ", "TRY", "C90"]
ignore = ["S105", "S106", "PGH003", "TRY003", "TRY004", "PT001", "PT023", "I001"]
line-length = 120
output-format="grouped"
[tool.ruff.per-file-ignores]
"bot_microservice/tests/*" = ["S101", "PLR2004", "PLR0913"]
"bot_microservice/settings/config.py" = ["S104"]
[tool.ruff.pylint]
max-args = 15
[tool.ruff.flake8-bugbear]
# Allow default arguments like, e.g., `data: List[str] = fastapi.Query(None)`.
extend-immutable-calls = [
"fastapi.Depends", "fastapi.Query", "fastapi.Body", "fastapi.File", "fastapi.Cookie", "fastapi.HTTPBearer",
"fastapi.Header", "fastapi.Security", "fastapi.Path", "app.api.versioning.APIVersioning", "app.api.openapi.clean_doc",
"fastapi.Form"]
[tool.ruff.flake8-pytest-style]
parametrize-names-type = "csv"
[tool.ruff.mccabe]
max-complexity = 15
[tool.ruff.isort]
force-wrap-aliases = true
combine-as-imports = true
[tool.ruff.flake8-quotes]
inline-quotes = "double"