-
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.
- Loading branch information
1 parent
e4fff83
commit 77f46b5
Showing
9 changed files
with
342 additions
and
471 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
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,5 +1,6 @@ | ||
[tools] | ||
python = "3.13" | ||
uv = "0.5" | ||
|
||
[env] | ||
_.python.venv = { path = '.venv', create = true } |
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,15 +1,26 @@ | ||
FROM ghcr.io/blindfoldedsurgery/poetry:2.1.2-pipx-3.13-bookworm | ||
FROM ghcr.io/astral-sh/uv:0.5-python3.13-bookworm-slim | ||
|
||
COPY [ "poetry.toml", "poetry.lock", "pyproject.toml", "./" ] | ||
RUN apt-get update -qq \ | ||
&& apt-get install -yq --no-install-recommends tini \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* | ||
|
||
RUN poetry install --no-interaction --ansi --only=main --no-root | ||
RUN groupadd --system --gid 500 app | ||
RUN useradd --system --uid 500 --gid app --create-home --home-dir /app app | ||
|
||
USER app | ||
WORKDIR /app | ||
|
||
COPY [ "uv.lock", "pyproject.toml", "./" ] | ||
|
||
RUN uv sync --locked --no-install-workspace --all-extras --no-dev | ||
|
||
# We don't want the tests | ||
COPY src/app ./src/app | ||
|
||
RUN poetry install --no-interaction --ansi --only-root | ||
RUN uv sync --locked --no-editable --all-extras --no-dev | ||
|
||
ARG APP_VERSION | ||
ENV APP_VERSION=$APP_VERSION | ||
|
||
ENTRYPOINT [ "tini", "--", "poetry", "run", "python", "-m", "app" ] | ||
ENV UV_NO_SYNC=true | ||
ENTRYPOINT [ "tini", "--", "uv", "run", "-m", "app" ] |
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 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,37 +1,39 @@ | ||
[project] | ||
requires-python = "==3.13.*" | ||
|
||
[tool.poetry] | ||
name = "location-bot" | ||
name = "app" | ||
description = "" | ||
version = "1.0.0" | ||
authors = ["BlindfoldedSurgery <[email protected]>"] | ||
license = "MIT" | ||
packages = [ | ||
{ include = "app", from = "src" } | ||
authors = [{ name = "BlindfoldedSurgery", email = "[email protected]" }] | ||
classifiers = [ | ||
"Private :: Do Not Upload", | ||
"License :: OSI Approved :: MIT License", | ||
] | ||
|
||
dependencies = [ | ||
"bs-config [dotenv] ==1.1.1", | ||
"python-telegram-bot ==21.9", | ||
"sentry-sdk >=2.0.0, <3.0.0", | ||
] | ||
|
||
[[tool.poetry.source]] | ||
[dependency-groups] | ||
dev = [ | ||
"mypy ==1.13.*", | ||
"pytest >=8.0.0, <9.0.0", | ||
"ruff ==0.8.3", | ||
"types-requests >=2.28.11, <3.0.0", | ||
] | ||
|
||
[[tool.uv.index]] | ||
name = "internal" | ||
url = "https://pypi.bjoernpetersen.net" | ||
priority = "explicit" | ||
|
||
[tool.poetry.dependencies] | ||
bs-config = { version = "1.1.1", extras = ["dotenv"], source = "internal" } | ||
certifi = "2024.8.30" | ||
python = "~3.13" | ||
python-telegram-bot = "21.9" | ||
sentry-sdk = "^2.0.0" | ||
explicit = true | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
mypy = "~1.13" | ||
pytest = "^8.0.0" | ||
ruff = "0.8.3" | ||
types-requests = "^2.28.11" | ||
[tool.uv.sources] | ||
bs-config = { index = "internal" } | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.3.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.mypy] | ||
strict = true | ||
|
@@ -61,6 +63,3 @@ ignore = [ | |
# redundant-open-modes | ||
"UP015", | ||
] | ||
|
||
[tool.ruff.lint.isort] | ||
known-first-party = ["app"] |