Compare commits

...

5 Commits

9 changed files with 2227 additions and 2266 deletions

View File

@ -29,7 +29,7 @@ jobs:
#---------------------------------------------- #----------------------------------------------
- name: Install poetry - name: Install poetry
env: # Keep in sync with `POETRY_VERSION` in `Dockerfile` env: # Keep in sync with `POETRY_VERSION` in `Dockerfile`
POETRY_VERSION: "1.2.0" POETRY_VERSION: "1.3.1"
run: | run: |
curl -sSL "https://install.python-poetry.org" | python - curl -sSL "https://install.python-poetry.org" | python -
# Adding `poetry` to `$PATH`: # Adding `poetry` to `$PATH`:

View File

@ -29,7 +29,7 @@ jobs:
#---------------------------------------------- #----------------------------------------------
- name: Install poetry - name: Install poetry
env: # Keep in sync with `POETRY_VERSION` in `Dockerfile` env: # Keep in sync with `POETRY_VERSION` in `Dockerfile`
POETRY_VERSION: "1.2.0" POETRY_VERSION: "1.3.1"
run: | run: |
curl -sSL "https://install.python-poetry.org" | python - curl -sSL "https://install.python-poetry.org" | python -
# Adding `poetry` to `$PATH`: # Adding `poetry` to `$PATH`:

View File

@ -13,7 +13,7 @@ env_path = BASE_DIR.joinpath('config')
config = AutoConfig(search_path=env_path) config = AutoConfig(search_path=env_path)
GECKO_DRIVER_VERSION = config('GECKO_DRIVER_VERSION', default='0.31.0') GECKO_DRIVER_VERSION = config('GECKO_DRIVER_VERSION', default='0.32.0')
TELEGRAM_API_TOKEN = config( TELEGRAM_API_TOKEN = config(
'TELEGRAM_API_TOKEN', default='123456789:AABBCCDDEEFFaabbccddeeff-1234567890' 'TELEGRAM_API_TOKEN', default='123456789:AABBCCDDEEFFaabbccddeeff-1234567890'

View File

@ -13,7 +13,10 @@ ENV USER=${USER} \
PIP_DEFAULT_TIMEOUT=100 \ PIP_DEFAULT_TIMEOUT=100 \
POETRY_VIRTUALENVS_CREATE=false \ POETRY_VIRTUALENVS_CREATE=false \
POETRY_CACHE_DIR='/var/cache/pypoetry' \ POETRY_CACHE_DIR='/var/cache/pypoetry' \
PATH="$PATH:/root/.poetry/bin" PATH="$PATH:/root/.poetry/bin" \
DOCKER_CONTAINER=1 \
POETRY_VERSION=1.3.1
RUN printf "================\n\nStart build app. USER is: "${USER}"\n\n===============\n" \ RUN printf "================\n\nStart build app. USER is: "${USER}"\n\n===============\n" \
&& apt-get update \ && apt-get update \
@ -30,7 +33,7 @@ RUN printf "================\n\nStart build app. USER is: "${USER}"\n\n=========
sshpass \ sshpass \
&& pip install --upgrade pip \ && pip install --upgrade pip \
# Installing `poetry` package manager: # Installing `poetry` package manager:
&& pip install poetry wheel\ && pip install poetry==$POETRY_VERSION wheel \
# Cleaning cache: # Cleaning cache:
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* && apt-get clean -y && rm -rf /var/lib/apt/lists/*
@ -50,7 +53,7 @@ COPY --chown="$USER":"$USER" ./poetry.lock ./pyproject.toml /app/
RUN poetry --version \ RUN poetry --version \
&& poetry run pip install -U pip \ && poetry run pip install -U pip \
&& poetry install \ && poetry install \
$(if [ "$USER" != 'root' ]; then echo '--no-dev'; fi) \ $(if [ "$USER" != 'root' ]; then echo '--only main'; fi) \
--no-interaction --no-ansi \ --no-interaction --no-ansi \
# Cleaning poetry installation's cache for production: # Cleaning poetry installation's cache for production:
&& if [ "$USER" != 'root' ]; then rm -rf "$POETRY_CACHE_DIR"; fi && if [ "$USER" != 'root' ]; then rm -rf "$POETRY_CACHE_DIR"; fi

View File

@ -1,4 +1,4 @@
FROM selenoid/firefox:104.0 as builder FROM selenoid/firefox:108.0 as builder
FROM aerokube/selenoid:latest-release FROM aerokube/selenoid:latest-release

View File

@ -1,9 +1,9 @@
{ {
"firefox": { "firefox": {
"default": "104.0", "default": "108.0",
"versions": { "versions": {
"104.0": { "108.0": {
"image": "selenoid/firefox:104.0", "image": "selenoid/firefox:108.0",
"port": "4444", "port": "4444",
"path": "/wd/hub" "path": "/wd/hub"
} }

View File

@ -56,7 +56,7 @@ services:
caddy: caddy:
image: "caddy:2.5.2" image: "caddy:2.6.2"
container_name: transport_bot_caddy container_name: transport_bot_caddy
hostname: transport_bot_caddy hostname: transport_bot_caddy
restart: unless-stopped restart: unless-stopped

4425
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -13,32 +13,30 @@ wget = "^3.2"
loguru = "^0.6.0" loguru = "^0.6.0"
python-decouple = "^3.6" python-decouple = "^3.6"
apscheduler = "^3.9.1" apscheduler = "^3.9.1"
SQLAlchemy = {version = "^1.4", extras = ["mypy", "asyncio"]}
gunicorn = "^20.1.0" gunicorn = "^20.1.0"
factory-boy = "^3.2.1" factory-boy = "^3.2.1"
Faker = "^14.0.0" Faker = "^15.0.0"
[tool.poetry.dev-dependencies] [tool.poetry.dev-dependencies]
ipython = "^8.2.0" ipython = "^8.2.0"
pre-commit = "^2.14.0" pre-commit = "^2.21.0"
safety = "^1.10.3" safety = "^2.3.4"
yamllint = "^1.26.3" yamllint = "^1.26.3"
tomlkit = "^0.7.2" tomlkit = "^0.7.2"
bandit = "1.7.4" bandit = "1.7.4"
requests = "^2.26.0" requests = "^2.28.0"
SQLAlchemy = {version = "^1.4", extras = ["mypy"]}
aresponses = "^2.1" aresponses = "^2.1"
pyupgrade = "^2.24.0" pyupgrade = "^2.24.0"
isort = "^5.9.3" isort = "^5.11.4"
black = "^22.3.0" black = "^22.12.0"
mypy = "^0.961" mypy = "^0.991"
types-PyMySQL = "^1.0.11" types-PyMySQL = "^1.0.11"
types-python-dateutil = "^2.8.4" types-python-dateutil = "^2.8.4"
pytest = "^6.2.4" pytest = "^7.2.0"
pytest-asyncio = "^0.15.1" pytest-asyncio = "^0.15.1"
pytest-deadfixtures = "^2.2.1" pytest-deadfixtures = "^2.2.1"
pytest-testmon = "^1.1.2" pytest-testmon = "^1.1.2"
@ -50,21 +48,21 @@ pytest-clarity = "^1.0.1"
pytest-env = "^0.6.2" pytest-env = "^0.6.2"
nest-asyncio = "^1.5.1" nest-asyncio = "^1.5.1"
autoflake = "^1.4" autoflake = "^1.7.8"
flake8 = "^3.9" flake8 = "^5.0.4"
flake8-logging-format = "^0.6.0" flake8-logging-format = "^0.9.0"
flake8-comprehensions = "^3.6.1" flake8-comprehensions = "^3.10.1"
flake8-eradicate = "^1.1.0" flake8-eradicate = "^1.4.0"
flake8-pytest-style = "^1.5.0" flake8-pytest-style = "^1.6.0"
flake8-aaa = "^0.12.0" flake8-aaa = "^0.12.0"
flake8-bugbear = "^21.4.3" flake8-bugbear = "^22.12.6"
flake8-debugger = "^4.0.0" flake8-debugger = "^4.1.2"
flake8-expression-complexity = "^0.0.11" flake8-expression-complexity = "^0.0.11"
flake8-fixme = "^1.1.1" flake8-fixme = "^1.1.1"
flake8-simplify = "^0.18.2" flake8-simplify = "^0.19.3"
flake8-variables-names = "^0.0.4" flake8-variables-names = "^0.0.5"
flake8-bandit = "3.0.0" flake8-bandit = "4.1.1"
flake8-tidy-imports = "^4.4.1" flake8-tidy-imports = "^4.8.0"
[tool.isort] [tool.isort]
@ -83,7 +81,6 @@ show_error_codes = true
implicit_reexport = true implicit_reexport = true
allow_untyped_decorators = true allow_untyped_decorators = true
warn_return_any = false warn_return_any = false
plugins = ["sqlalchemy.ext.mypy.plugin"]
[tool.coverage.run] [tool.coverage.run]