diff --git a/.github/workflows/check-lint.yml b/.github/workflows/check-lint.yml index f360d10..225d50f 100644 --- a/.github/workflows/check-lint.yml +++ b/.github/workflows/check-lint.yml @@ -29,7 +29,7 @@ jobs: #---------------------------------------------- - name: Install poetry env: # Keep in sync with `POETRY_VERSION` in `Dockerfile` - POETRY_VERSION: "1.6.1" + POETRY_VERSION: "1.7.0" run: | curl -sSL "https://install.python-poetry.org" | python - # Adding `poetry` to `$PATH`: @@ -54,7 +54,7 @@ jobs: - name: Install dependencies run: | poetry config virtualenvs.in-project true - poetry install + poetry install --no-interaction --no-ansi --no-root poetry run pip install -U pip #---------------------------------------------- # run test suite diff --git a/.github/workflows/poetry-test.yml b/.github/workflows/poetry-test.yml index 83f9ebe..c0261f0 100644 --- a/.github/workflows/poetry-test.yml +++ b/.github/workflows/poetry-test.yml @@ -32,7 +32,7 @@ jobs: #---------------------------------------------- - name: Install poetry env: # Keep in sync with `POETRY_VERSION` in `Dockerfile` - POETRY_VERSION: "1.6.1" + POETRY_VERSION: "1.7.0" run: | curl -sSL "https://install.python-poetry.org" | python - # Adding `poetry` to `$PATH`: @@ -58,7 +58,7 @@ jobs: - name: Install dependencies run: | poetry config virtualenvs.in-project true - poetry install + poetry install --no-interaction --no-ansi --no-root poetry run pip install -U pip #---------------------------------------------- # run test suite diff --git a/README.md b/README.md index 5ba0635..4069db2 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Docs can be found at on local start can be found at http://localhost/gpt/api/docs -prod docs https://bot.mywistr.ru/gpt/api/docs/ +prod docs https://{DOMAIN}/{URL_PREFIX}/{API_PREFIX}/docs/ ## Create migrations diff --git a/bot_microservice/main.py b/bot_microservice/main.py index b1e0cb1..1d0acd6 100644 --- a/bot_microservice/main.py +++ b/bot_microservice/main.py @@ -25,6 +25,7 @@ class Application: docs_url="/" + "/".join([settings.api_prefix.strip("/"), "docs"]), redoc_url="/" + "/".join([settings.api_prefix.strip("/"), "redocs"]), openapi_url="/" + "/".join([settings.api_prefix.strip("/"), "openapi.json"]), + debug=settings.DEBUG, default_response_class=UJSONResponse, ) self.bot_app = bot_app diff --git a/deploy/Dockerfile b/deploy/Dockerfile index 42647a1..f55fc8d 100644 --- a/deploy/Dockerfile +++ b/deploy/Dockerfile @@ -6,7 +6,7 @@ ARG STAGE ENV PYTHONUNBUFFERED=1 \ PIP_DISABLE_PIP_VERSION_CHECK=on \ DOCKER_CONTAINER=1 \ - POETRY_VERSION=1.6.1 + POETRY_VERSION=1.7.0 RUN printf "================ Start build base service. with USER: ${USER}, STAGE: ${STAGE} ===============" \ && apt-get update \ @@ -40,7 +40,7 @@ COPY --chown=${USER}:${USER} ../poetry.lock ../pyproject.toml /app/ RUN pip install --upgrade pip && pip install poetry==$POETRY_VERSION RUN poetry config virtualenvs.in-project true && \ poetry config virtualenvs.create true && \ - poetry install $(if [ "$STAGE" = "production" ]; then echo "--only main"; fi) --no-interaction --no-ansi && \ + poetry install $(if [ "$STAGE" = "production" ]; then echo "--only main"; fi) --no-interaction --no-ansi --no-root && \ rm -rf $POETRY_CACHE_DIR diff --git a/poetry.lock b/poetry.lock index f714fe4..c867705 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.7.0 and should not be changed by hand. [[package]] name = "aiolimiter" @@ -2384,13 +2384,13 @@ pytest = ">=3.0.0" [[package]] name = "pytest-html" -version = "4.0.2" +version = "4.1.0" description = "pytest plugin for generating HTML reports" optional = false python-versions = ">=3.8" files = [ - {file = "pytest_html-4.0.2-py3-none-any.whl", hash = "sha256:907c3e68462df129d3ee96dee58bd63f70216b06421836b22fd3fd57ef314acb"}, - {file = "pytest_html-4.0.2.tar.gz", hash = "sha256:88682b9e8e51392472546a70a2139b27d6bc1834a4afd3e41da33c9d9f91e4a4"}, + {file = "pytest_html-4.1.0-py3-none-any.whl", hash = "sha256:69c1bdcbbfb18a39b4907c5a756ff371bf33ce77d2d95e9989ac7c7416167495"}, + {file = "pytest_html-4.1.0.tar.gz", hash = "sha256:1032cce620cf632679d51b3789f57e35d8eadde66d29cbbd481fae6359893230"}, ] [package.dependencies] @@ -3305,13 +3305,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "uvicorn" -version = "0.23.2" +version = "0.24.0.post1" description = "The lightning-fast ASGI server." optional = false python-versions = ">=3.8" files = [ - {file = "uvicorn-0.23.2-py3-none-any.whl", hash = "sha256:1f9be6558f01239d4fdf22ef8126c39cb1ad0addf76c40e760549d2c2f43ab53"}, - {file = "uvicorn-0.23.2.tar.gz", hash = "sha256:4d3cc12d7727ba72b64d12d3cc7743124074c0a69f7b201512fc50c3e3f1569a"}, + {file = "uvicorn-0.24.0.post1-py3-none-any.whl", hash = "sha256:7c84fea70c619d4a710153482c0d230929af7bcf76c7bfa6de151f0a3a80121e"}, + {file = "uvicorn-0.24.0.post1.tar.gz", hash = "sha256:09c8e5a79dc466bdf28dead50093957db184de356fcdc48697bad3bde4c2588e"}, ] [package.dependencies] @@ -3496,4 +3496,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "7e2915a1bf4454c80c9eb1f4afa3172ed605c86b3f7bc4bb9a6fa5fa3cb12a4e" +content-hash = "7ff73cf0c98eb99317efb7e140ae3a38698eb120ca2c94e255b63d810e0ae34c" diff --git a/pyproject.toml b/pyproject.toml index 2e6d078..12d316f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,11 @@ [tool.poetry] name = "chat_gpt_bot" -version = "1.2.5" +version = "1.3.0" description = "Bot to integrated with Chat gpt" authors = ["Dmitry Afanasyev "] [build-system] -requires = ["poetry-core>=1.6.1"] +requires = ["poetry-core>=1.7.0"] build-backend = "poetry.core.masonry.api" [tool.poetry.dependencies] @@ -20,7 +20,7 @@ loguru = "^0.7" pydantic = "^2.4" pydantic-settings = "^2.0.3" gunicorn = "^21.2" -uvicorn = "^0.23" +uvicorn = "^0.24" wheel = "^0.41" orjson = "^3.9" sentry-sdk = "^1.34" @@ -68,7 +68,7 @@ pytest-sugar = "^0.9" pytest-clarity = "^1.0" pytest-env = "^1.1" nest-asyncio = "^1.5" -pytest-html = "^4.0" +pytest-html = "^4.1" pytest-randomly = "^3.15" pytest-split = "^0.8" pytest-freezegun = "^0.4"