feat(dependencies): switch to Poetry

This commit is contained in:
Luke Tainton 2024-11-28 20:54:12 +00:00
parent 5e72d44b95
commit c04d23f85d
6 changed files with 16 additions and 69 deletions

View File

@ -12,7 +12,7 @@ on:
jobs: jobs:
ci: ci:
uses: luketainton/gha-workflows/.github/workflows/ci-python-with-docker.yml@main uses: luketainton/gha-workflows/.github/workflows/ci-python-poetry-with-docker.yml@main
secrets: secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

View File

@ -8,10 +8,13 @@ WORKDIR /run
RUN mkdir -p /.local && \ RUN mkdir -p /.local && \
chmod -R 777 /.local && \ chmod -R 777 /.local && \
pip install -U pip pip install -U pip poetry
COPY requirements.txt /run/requirements.txt COPY pyproject.toml /run/pyproject.toml
RUN pip install --no-cache-dir -r requirements.txt COPY poetry.lock /run/poetry.lock
RUN poetry config virtualenvs.create false && \
poetry install --without dev
ENTRYPOINT ["python3", "-B", "-m", "app.main"] ENTRYPOINT ["python3", "-B", "-m", "app.main"]

69
poetry.lock generated
View File

@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. # This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand.
[[package]] [[package]]
name = "astroid" name = "astroid"
@ -390,20 +390,17 @@ files = [
[[package]] [[package]]
name = "isort" name = "isort"
version = "5.12.0" version = "5.13.2"
description = "A Python utility / library to sort Python imports." description = "A Python utility / library to sort Python imports."
optional = false optional = false
python-versions = ">=3.8.0" python-versions = ">=3.8.0"
files = [ files = [
{file = "isort-5.12.0-py3-none-any.whl", hash = "sha256:f84c2818376e66cf843d497486ea8fed8700b340f308f076c6fb1229dff318b6"}, {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"},
{file = "isort-5.12.0.tar.gz", hash = "sha256:8bef7dde241278824a6d83f44a544709b065191b95b6e50894bdc722fcba0504"}, {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"},
] ]
[package.extras] [package.extras]
colors = ["colorama (>=0.4.3)"] colors = ["colorama (>=0.4.6)"]
pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib"]
plugins = ["setuptools"]
requirements-deprecated-finder = ["pip-api", "pipreqs"]
[[package]] [[package]]
name = "mccabe" name = "mccabe"
@ -784,60 +781,6 @@ files = [
[package.dependencies] [package.dependencies]
requests = ">=2.0.1,<3.0.0" requests = ">=2.0.1,<3.0.0"
[[package]]
name = "sentry-sdk"
version = "2.19.0"
description = "Python client for Sentry (https://sentry.io)"
optional = false
python-versions = ">=3.6"
files = [
{file = "sentry_sdk-2.19.0-py2.py3-none-any.whl", hash = "sha256:7b0b3b709dee051337244a09a30dbf6e95afe0d34a1f8b430d45e0982a7c125b"},
{file = "sentry_sdk-2.19.0.tar.gz", hash = "sha256:ee4a4d2ae8bfe3cac012dcf3e4607975904c137e1738116549fc3dbbb6ff0e36"},
]
[package.dependencies]
certifi = "*"
urllib3 = ">=1.26.11"
[package.extras]
aiohttp = ["aiohttp (>=3.5)"]
anthropic = ["anthropic (>=0.16)"]
arq = ["arq (>=0.23)"]
asyncpg = ["asyncpg (>=0.23)"]
beam = ["apache-beam (>=2.12)"]
bottle = ["bottle (>=0.12.13)"]
celery = ["celery (>=3)"]
celery-redbeat = ["celery-redbeat (>=2)"]
chalice = ["chalice (>=1.16.0)"]
clickhouse-driver = ["clickhouse-driver (>=0.2.0)"]
django = ["django (>=1.8)"]
falcon = ["falcon (>=1.4)"]
fastapi = ["fastapi (>=0.79.0)"]
flask = ["blinker (>=1.1)", "flask (>=0.11)", "markupsafe"]
grpcio = ["grpcio (>=1.21.1)", "protobuf (>=3.8.0)"]
http2 = ["httpcore[http2] (==1.*)"]
httpx = ["httpx (>=0.16.0)"]
huey = ["huey (>=2)"]
huggingface-hub = ["huggingface_hub (>=0.22)"]
langchain = ["langchain (>=0.0.210)"]
launchdarkly = ["launchdarkly-server-sdk (>=9.8.0)"]
litestar = ["litestar (>=2.0.0)"]
loguru = ["loguru (>=0.5)"]
openai = ["openai (>=1.0.0)", "tiktoken (>=0.3.0)"]
openfeature = ["openfeature-sdk (>=0.7.1)"]
opentelemetry = ["opentelemetry-distro (>=0.35b0)"]
opentelemetry-experimental = ["opentelemetry-distro"]
pure-eval = ["asttokens", "executing", "pure_eval"]
pymongo = ["pymongo (>=3.1)"]
pyspark = ["pyspark (>=2.4.4)"]
quart = ["blinker (>=1.1)", "quart (>=0.16.1)"]
rq = ["rq (>=0.6)"]
sanic = ["sanic (>=0.8)"]
sqlalchemy = ["sqlalchemy (>=1.2)"]
starlette = ["starlette (>=0.19.1)"]
starlite = ["starlite (>=1.48)"]
tornado = ["tornado (>=6)"]
[[package]] [[package]]
name = "setuptools" name = "setuptools"
version = "68.0.0" version = "68.0.0"
@ -1021,4 +964,4 @@ files = [
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = "^3.11.2" python-versions = "^3.11.2"
content-hash = "f7823bb3d889bedb7b2edccc56ba8169403af44b0e5d17925cee1e42445ccb5c" content-hash = "3bf64765123ffdd88b19d2ddaa5cd4a40370e4e635cd22164065e4cc583aae20"

View File

@ -1,19 +1,20 @@
[tool.poetry] [tool.poetry]
name = "webexmemebot" name = "webexmemebot"
version = "0.1.0" version = "0.0.0" # Version is tracked by GitHub Releases
description = "Webex-based meme generation bot using memegen.link." description = "Webex-based meme generation bot using memegen.link."
authors = ["luketainton"] authors = ["luketainton"]
readme = "README.md" readme = "README.md"
package-mode = false
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.11.2" python = "^3.11.2"
webex-bot = "^0.5.2" webex-bot = "^0.5.2"
pillow = "^11.0.0" pillow = "^11.0.0"
sentry-sdk = "^2.19.0"
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]
black = "^24.10.0" black = "^24.10.0"
coverage = "^7.6.8" coverage = "^7.6.8"
isort = "^5.13.2"
pylint = "^3.2.6" pylint = "^3.2.6"
pylint-exit = "^1.2.0" pylint-exit = "^1.2.0"
pytest = "^8.3.3" pytest = "^8.3.3"