-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from 9dogs/maintenance
Maintenance and kz for Yandex
- Loading branch information
Showing
12 changed files
with
1,063 additions
and
917 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
FROM python:3.11.7-bookworm AS builder | ||
FROM python:3.11.10-bookworm AS builder | ||
|
||
LABEL maintainer="[email protected]" | ||
LABEL description="Telegram Bot to share music with Odesli (former Songlink) service." | ||
|
||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
ENV PYTHONUNBUFFERED=1 | ||
|
||
ARG poetry_args='--without dev' | ||
|
||
|
@@ -19,10 +19,10 @@ WORKDIR /opt/tg-odesli-bot | |
RUN poetry install --no-interaction --no-ansi $poetry_args | ||
# Copy project files | ||
COPY . /opt/tg-odesli-bot | ||
ENV PYTHONPATH "${PYTHONPATH}:/opt/tg-odesli-bot" | ||
ENV PYTHONPATH="/opt/tg-odesli-bot" | ||
|
||
|
||
FROM python:3.11.7-slim-bookworm | ||
FROM python:3.11.10-slim-bookworm | ||
|
||
ARG UID=997 | ||
ARG GID=997 | ||
|
@@ -34,6 +34,5 @@ USER bot | |
# Copy project files | ||
COPY --from=builder --chown=bot:bot /opt/tg-odesli-bot /opt/tg-odesli-bot | ||
WORKDIR /opt/tg-odesli-bot | ||
ENV PYTHONPATH "${PYTHONPATH}:/opt/tg-odesli-bot" | ||
|
||
CMD ["/opt/tg-odesli-bot/.venv/bin/python", "-m", "tg_odesli_bot.bot"] |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Helpers and fixtures for pytest.""" | ||
|
||
import json | ||
import re | ||
import string | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Integration tests for Odesli bot.""" | ||
|
||
import asyncio | ||
import re | ||
from http import HTTPStatus | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Unit tests for Odesli bot.""" | ||
|
||
from pytest import mark | ||
|
||
from tg_odesli_bot.bot import OdesliBot, SongInfo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Tests for configuration.""" | ||
|
||
from tg_odesli_bot.settings import TestSettings | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Telegram Odesli bot.""" | ||
|
||
from __future__ import annotations | ||
|
||
import asyncio | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Supported platforms.""" | ||
|
||
import re | ||
from abc import ABC | ||
from re import Pattern | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Odesli API schemas.""" | ||
|
||
from pydantic import BaseModel, Field | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Bot configuration.""" | ||
|
||
from __future__ import annotations | ||
|
||
import logging.config | ||
|