Skip to content

Commit 9c58249

Browse files
Feature/bump pybotx version to 0.73.4
1 parent 738967d commit 9c58249

File tree

13 files changed

+284
-305
lines changed

13 files changed

+284
-305
lines changed

.github/scripts/test_image

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
set -ex
44

55
PROJECT_NAME=bot-example
6-
7-
python -m copier --defaults . $PROJECT_NAME
6+
python -m copier copy --force --trust . $PROJECT_NAME
87
cd $PROJECT_NAME
98

10-
docker-compose up -d
9+
docker compose up -d
1110
sleep 10
1211

13-
curl --silent --fail http://localhost:8000/healthcheck || exit 1
12+
curl --show-error --fail http://localhost:8000/healthcheck || exit 1

.github/workflows/tests.yml

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,16 @@ env:
1414
jobs:
1515
test-image:
1616
name: Test app start
17-
runs-on: ubuntu-20.04
17+
runs-on: ubuntu-22.04
1818

1919
steps:
2020
- name: Checkout
2121
uses: actions/checkout@v2
2222

2323
- name: Install copier
2424
run: |
25-
pip install copier==7.1.0
26-
pip install copier-templates-extensions
27-
pip install pyyaml-include==1.4.1
28-
# hardcode pydantic version to avoid dependency conflict with copier
29-
pip install pydantic==1.10.2
25+
pip install copier==9.4.0
26+
pip install copier-templates-extensions==0.3.1
3027
3128
- name: Test image
3229
env:
@@ -37,10 +34,10 @@ jobs:
3734

3835
test-template:
3936
name: Test template
40-
runs-on: ubuntu-20.04
37+
runs-on: ubuntu-22.04
4138
strategy:
4239
matrix:
43-
python-version: [ "3.8", "3.9", "3.10"]
40+
python-version: [ "3.8", "3.9", "3.10", "3.11"]
4441

4542
services:
4643
postgres:
@@ -71,12 +68,9 @@ jobs:
7168

7269
- name: Install copier
7370
run: |
74-
pip install copier==7.1.0
75-
pip install copier-templates-extensions
76-
pip install pyyaml-include==1.4.1
77-
# hardcode pydantic version to avoid dependency conflict with copier
78-
pip install pydantic==1.10.2
79-
python -m copier --defaults . bot-example
71+
pip install copier==9.4.0
72+
pip install copier-templates-extensions==0.3.1
73+
python -m copier copy --trust --force . bot-example
8074
8175
8276
- name: Set up Python ${{ matrix.python-version }}
@@ -90,7 +84,7 @@ jobs:
9084

9185
- name: Set up cache
9286
id: cache
93-
uses: actions/cache@v2
87+
uses: actions/cache@v3
9488
with:
9589
path: |
9690
~/.cache/pip
@@ -116,23 +110,20 @@ jobs:
116110
117111
lint:
118112
name: Lint
119-
runs-on: ubuntu-20.04
113+
runs-on: ubuntu-22.04
120114
strategy:
121115
matrix:
122-
python-version: ["3.8", "3.9", "3.10"]
116+
python-version: ["3.8", "3.9", "3.10", "3.11"]
123117

124118
steps:
125119
- name: Checkout
126120
uses: actions/checkout@v2
127121

128122
- name: Install copier
129123
run: |
130-
pip install copier==7.1.0
131-
pip install copier-templates-extensions
132-
pip install pyyaml-include==1.4.1
133-
# hardcode pydantic version to avoid dependency conflict with copier
134-
pip install pydantic==1.10.2
135-
python -m copier --defaults . bot-example
124+
pip install copier==9.4.0
125+
pip install copier-templates-extensions==0.3.1
126+
python -m copier copy --trust --force . bot-example
136127
137128
- name: Set up Python ${{ matrix.python-version }}
138129
uses: actions/setup-python@v2
@@ -145,7 +136,7 @@ jobs:
145136

146137
- name: Set up cache
147138
id: cache
148-
uses: actions/cache@v2
139+
uses: actions/cache@v3
149140
with:
150141
path: |
151142
~/.cache/pip

app/api/routers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Configuration of routers for all endpoints."""
2+
23
from fastapi import APIRouter
34

45
from app.api.endpoints.botx import router as bot_router

app/bot/error_handlers/internal_error.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Handler to work with unexpected errors."""
2+
23
from uuid import uuid4
34

45
from pybotx import Bot, BotShuttingDownError, IncomingMessage

app/db/migrations/versions/d6e3a38b1fbd_.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
"""empty message
22
33
Revision ID: d6e3a38b1fbd
4-
Revises:
4+
Revises:
55
Create Date: 2021-07-09 13:40:29.058513
66
77
Doc: https://alembic.sqlalchemy.org/en/latest/tutorial.html#create-a-migration-script
88
"""
9+
910
import sqlalchemy as sa
1011
from alembic import op
1112

app/schemas/enums.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module for enums."""
2+
23
from enum import Enum
34

45

app/services/healthcheck.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Healthcheck service bot."""
2+
23
from dataclasses import dataclass
34
from typing import List, Literal, Optional, Union
45

extensions/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class ContextUpdater(ContextHook):
88
def hook(self, context):
99
context["CI"] = os.environ.get("CI", False)
1010

11-
if context["from_ccsteam"]:
11+
if context.get("from_ccsteam", False):
1212
try:
1313
context["PROD_SERVER_HOST"] = os.environ["PROD_SERVER_HOST"]
1414
context["DEV_SERVER_HOST"] = os.environ["DEV_SERVER_HOST"]

0 commit comments

Comments
 (0)