-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update stream announcer to use uv instead of poetry
- Loading branch information
Showing
7 changed files
with
1,293 additions
and
1,516 deletions.
There are no files selected for viewing
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,16 +1,12 @@ | ||
FROM python:3.12-alpine | ||
FROM ghcr.io/astral-sh/uv:python3.12-alpine | ||
|
||
RUN pip install --no-cache-dir poetry==1.8 \ | ||
&& yes | poetry cache clear PyPI --all | ||
COPY uv.lock pyproject.toml /root/stream_announcer/ | ||
|
||
WORKDIR /root/stream_announcer | ||
|
||
COPY poetry.lock pyproject.toml ./ | ||
|
||
RUN poetry install --without dev | ||
RUN uv sync --no-dev --frozen --no-cache --no-install-project | ||
|
||
COPY src /root/stream_announcer/src | ||
|
||
ENV PYTHONPATH=$PYTHONPATH:/root/stream_announcer | ||
ENV PYTHONPATH=$PYTHONPATH:/root/stream_announcer/src | ||
|
||
CMD ["poetry", "run", "python", "src/stream_announcer.py"] | ||
CMD ["uv", "run", "--no-dev", "python", "src/stream_announcer.py"] |
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
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,33 +1,20 @@ | ||
[tool.poetry] | ||
name = "twitch-stream-announcer-webhook" | ||
[project] | ||
name = "src" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["BuRny <[email protected]>"] | ||
#package-mode = false | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.9 <3.13" | ||
aiohttp = "^3.7.4" | ||
loguru = "^0.7" | ||
discord = "^1.0.1" | ||
python-dotenv = "^1.0.0" | ||
arrow = "^1.3.0" | ||
twitchapi = "^4.1.0" | ||
dataset = "^1.6.2" | ||
psycopg2-binary = "^2.9.9" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
# Autoformat | ||
yapf = "^0.32.0" | ||
toml = "^0.10.2" | ||
# Linter | ||
ruff = "^0.1.14" | ||
# Type checker | ||
pyre-check = "^0.9.18" | ||
requires-python = ">=3.9, <3.14" | ||
dependencies = [ | ||
"aiohttp>=3.11.2", | ||
"arrow>=1.3.0", | ||
"dataset>=1.6.2", | ||
"discord>=2.3.2", | ||
"loguru>=0.7.2", | ||
"psycopg2-binary>=2.9.10", | ||
"python-dotenv>=1.0.1", | ||
"twitchapi>=4.3.1", | ||
] | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
[tool.uv] | ||
dev-dependencies = ["pyre-check>=0.9.23", "ruff>=0.7.4", "toml>=0.10.2"] | ||
|
||
[tool.yapf] | ||
based_on_style = "pep8" | ||
|
@@ -42,20 +29,20 @@ line-length = 120 | |
# Allow unused variables when underscore-prefixed. | ||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" | ||
select = [ | ||
"C4", # flake8-comprehensions | ||
"E", # Error | ||
"F", # pyflakes | ||
"BLE", # flake8-blind-except | ||
"I", # isort | ||
"N", # pep8-naming | ||
"PGH", # pygrep-hooks | ||
"C4", # flake8-comprehensions | ||
"E", # Error | ||
"F", # pyflakes | ||
"BLE", # flake8-blind-except | ||
"I", # isort | ||
"N", # pep8-naming | ||
"PGH", # pygrep-hooks | ||
"PTH", # flake8-use-pathlib | ||
"SIM", # flake8-simplify | ||
"W", # Warning | ||
"Q", # flake8-quotes | ||
"SIM", # flake8-simplify | ||
"W", # Warning | ||
"Q", # flake8-quotes | ||
"YTT", # flake8-2020 | ||
"UP", # pyupgrade | ||
# "A", # flake8-builtins | ||
# "A", # flake8-builtins | ||
] | ||
|
||
[tool.ruff.pep8-naming] | ||
|
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
Oops, something went wrong.