dev: Migrate to uv (#6470)

This commit is contained in:
Michael Genson
2025-11-01 14:36:40 -05:00
committed by GitHub
parent 01713b0416
commit 75616d66b8
16 changed files with 2191 additions and 4223 deletions

View File

@@ -8,28 +8,13 @@ FROM mcr.microsoft.com/devcontainers/python:${VARIANT}
ARG NODE_VERSION="none" ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
# install poetry - respects $POETRY_VERSION & $POETRY_HOME
RUN echo "export PROMPT_COMMAND='history -a'" >> /home/vscode/.bashrc \ RUN echo "export PROMPT_COMMAND='history -a'" >> /home/vscode/.bashrc \
&& echo "export HISTFILE=~/commandhistory/.bash_history" >> /home/vscode/.bashrc \ && echo "export HISTFILE=~/commandhistory/.bash_history" >> /home/vscode/.bashrc \
&& chown vscode:vscode -R /home/vscode/ && chown vscode:vscode -R /home/vscode/
RUN npm install -g @go-task/cli RUN npm install -g @go-task/cli
ENV PYTHONUNBUFFERED=1 \ # Install additional OS packages
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_HOME="/opt/poetry" \
POETRY_VIRTUALENVS_IN_PROJECT=true
# prepend poetry and venv to path
ENV PATH="$POETRY_HOME/bin:$PATH"
RUN curl -sSL https://install.python-poetry.org | python3 -
# RUN poetry config virtualenvs.create false
RUN apt-get update \ RUN apt-get update \
&& apt-get install --no-install-recommends -y \ && apt-get install --no-install-recommends -y \
curl \ curl \
@@ -39,5 +24,9 @@ RUN apt-get update \
libsasl2-dev libldap2-dev libssl-dev \ libsasl2-dev libldap2-dev libssl-dev \
gnupg gnupg2 gnupg1 gnupg gnupg2 gnupg1
# create directory used for Docker Secrets # Install uv
RUN pip install uv
ENV UV_LINK_MODE=copy
# Create directory for Docker Secrets
RUN mkdir -p /run/secrets RUN mkdir -p /run/secrets

View File

@@ -48,7 +48,7 @@
], ],
// Use 'onCreateCommand' to run commands at the end of container creation. // Use 'onCreateCommand' to run commands at the end of container creation.
// Use 'postCreateCommand' to run commands after the container is created. // Use 'postCreateCommand' to run commands after the container is created.
"onCreateCommand": "sudo chown -R vscode:vscode /workspaces/mealie/frontend/node_modules /home/vscode/commandhistory && task setup", "onCreateCommand": "sudo chown -R vscode:vscode /workspaces/mealie/frontend/node_modules /home/vscode/commandhistory && task setup --force",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode", "remoteUser": "vscode",
"features": { "features": {

View File

@@ -70,13 +70,8 @@ jobs:
with: with:
python-version: "3.12" python-version: "3.12"
- name: Install Poetry - name: Install uv
uses: snok/install-poetry@v1 run: pip install uv
with:
virtualenvs-create: true
virtualenvs-in-project: true
plugins: |
poetry-plugin-export
- name: Retrieve built frontend - name: Retrieve built frontend
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4

View File

@@ -25,24 +25,21 @@ jobs:
with: with:
python-version: "3.12" python-version: "3.12"
- name: Install Poetry - name: Install uv
uses: snok/install-poetry@v1 run: pip install uv
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv - name: Load cached venv
id: cached-poetry-dependencies id: cached-python-dependencies
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: .venv path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} key: venv-${{ runner.os }}-${{ hashFiles('**/uv.lock') }}
- name: Check venv cache - name: Check venv cache
id: cache-validate id: cache-validate
if: steps.cached-poetry-dependencies.outputs.cache-hit == 'true' if: steps.cached-python-dependencies.outputs.cache-hit == 'true'
run: | run: |
echo "import fastapi;print('venv good?')" > test.py && poetry run python test.py && echo "cache-hit-success=true" >> $GITHUB_OUTPUT echo "import fastapi;print('venv good?')" > test.py && uv run python test.py && echo "cache-hit-success=true" >> $GITHUB_OUTPUT
rm test.py rm test.py
continue-on-error: true continue-on-error: true
@@ -50,13 +47,13 @@ jobs:
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install libsasl2-dev libldap2-dev libssl-dev sudo apt-get install libsasl2-dev libldap2-dev libssl-dev
poetry install uv sync --group dev
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' if: steps.cached-python-dependencies.outputs.cache-hit != 'true'
- name: Run locale generation - name: Run locale generation
run: | run: |
cd dev/code-generation cd dev/code-generation
poetry run python main.py locales uv run python main.py locales
env: env:
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }} CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}

View File

@@ -49,24 +49,21 @@ jobs:
with: with:
python-version: "3.12" python-version: "3.12"
- name: Install Poetry - name: Install uv
uses: snok/install-poetry@v1 run: pip install uv
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv - name: Load cached venv
id: cached-poetry-dependencies id: cached-python-dependencies
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: .venv path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} key: venv-${{ runner.os }}-${{ hashFiles('**/uv.lock') }}
- name: Check venv cache - name: Check venv cache
id: cache-validate id: cache-validate
if: steps.cached-poetry-dependencies.outputs.cache-hit == 'true' if: steps.cached-python-dependencies.outputs.cache-hit == 'true'
run: | run: |
echo "import fastapi;print('venv good?')" > test.py && poetry run python test.py && echo "cache-hit-success=true" >> $GITHUB_OUTPUT echo "import fastapi;print('venv good?')" > test.py && uv run python test.py && echo "cache-hit-success=true" >> $GITHUB_OUTPUT
rm test.py rm test.py
continue-on-error: true continue-on-error: true
@@ -74,13 +71,12 @@ jobs:
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install libsasl2-dev libldap2-dev libssl-dev sudo apt-get install libsasl2-dev libldap2-dev libssl-dev
poetry install uv sync --group dev --extra pgsql
poetry add "psycopg2-binary==2.9.9" if: steps.cached-python-dependencies.outputs.cache-hit != 'true' || steps.cache-validate.outputs.cache-hit-success != 'true'
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' || steps.cache-validate.outputs.cache-hit-success != 'true'
- name: Formatting (Ruff) - name: Formatting (Ruff)
run: | run: |
poetry run ruff format . --check uv run ruff format . --check
- name: Lint (Ruff) - name: Lint (Ruff)
run: | run: |

View File

@@ -55,7 +55,7 @@
"explorer.fileNesting.enabled": true, "explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": { "explorer.fileNesting.patterns": {
"package.json": "package-lock.json, yarn.lock, .eslintrc.js, tsconfig.json, .prettierrc, .editorconfig", "package.json": "package-lock.json, yarn.lock, .eslintrc.js, tsconfig.json, .prettierrc, .editorconfig",
"pyproject.toml": "poetry.lock, alembic.ini, .pylintrc", "pyproject.toml": "uv.lock, alembic.ini, .pylintrc",
"netlify.toml": "runtime.txt", "netlify.toml": "runtime.txt",
"README.md": "LICENSE, SECURITY.md" "README.md": "LICENSE, SECURITY.md"
}, },

View File

@@ -28,7 +28,7 @@ tasks:
docs:gen: docs:gen:
desc: runs the API documentation generator desc: runs the API documentation generator
cmds: cmds:
- poetry run python dev/code-generation/gen_docs_api.py - uv run python dev/code-generation/gen_docs_api.py
docs: docs:
desc: runs the documentation server desc: runs the documentation server
@@ -36,7 +36,7 @@ tasks:
deps: deps:
- docs:gen - docs:gen
cmds: cmds:
- poetry run python -m mkdocs serve - uv run python -m mkdocs serve
setup:ui: setup:ui:
desc: setup frontend dependencies desc: setup frontend dependencies
@@ -54,10 +54,10 @@ tasks:
desc: setup python dependencies desc: setup python dependencies
run: once run: once
cmds: cmds:
- poetry install --with main,dev,postgres - uv sync --extra pgsql --group dev
- poetry run pre-commit install - uv run pre-commit install
sources: sources:
- poetry.lock - uv.lock
- pyproject.toml - pyproject.toml
- .pre-commit-config.yaml - .pre-commit-config.yaml
@@ -70,7 +70,7 @@ tasks:
dev:generate: dev:generate:
desc: run code generators desc: run code generators
cmds: cmds:
- poetry run python dev/code-generation/main.py {{ .CLI_ARGS }} - uv run python dev/code-generation/main.py {{ .CLI_ARGS }}
- task: docs:gen - task: docs:gen
- task: py:format - task: py:format
@@ -96,22 +96,22 @@ tasks:
py:mypy: py:mypy:
desc: runs python type checking desc: runs python type checking
cmds: cmds:
- poetry run mypy mealie - uv run mypy mealie
py:test: py:test:
desc: runs python tests (support args after '--') desc: runs python tests (support args after '--')
cmds: cmds:
- poetry run pytest {{ .CLI_ARGS }} - uv run pytest {{ .CLI_ARGS }}
py:format: py:format:
desc: runs python code formatter desc: runs python code formatter
cmds: cmds:
- poetry run ruff format . - uv run ruff format .
py:lint: py:lint:
desc: runs python linter desc: runs python linter
cmds: cmds:
- poetry run ruff check mealie - uv run ruff check mealie
py:check: py:check:
desc: runs all linters, type checkers, and formatters desc: runs all linters, type checkers, and formatters
@@ -124,10 +124,10 @@ tasks:
py:coverage: py:coverage:
desc: runs python coverage and generates html report desc: runs python coverage and generates html report
cmds: cmds:
- poetry run pytest - uv run pytest
- poetry run coverage report -m - uv run coverage report -m
- poetry run coveragepy-lcov - uv run coveragepy-lcov
- poetry run coverage html - uv run coverage html
- open htmlcov/index.html - open htmlcov/index.html
py:package:copy-frontend: py:package:copy-frontend:
@@ -147,17 +147,17 @@ tasks:
desc: Generate requirements file to pin all packages, effectively a "pip freeze" before installation begins desc: Generate requirements file to pin all packages, effectively a "pip freeze" before installation begins
internal: true internal: true
cmds: cmds:
- poetry export -n --only=main --extras=pgsql --output=dist/requirements.txt - uv export --no-editable --no-emit-project --extra pgsql --format requirements-txt --output-file dist/requirements.txt
# Include mealie in the requirements, hashing the package that was just built to ensure it's the one installed # Include mealie in the requirements, hashing the package that was just built to ensure it's the one installed
- echo "mealie[pgsql]=={{.MEALIE_VERSION}} \\" >> dist/requirements.txt - echo "mealie[pgsql]=={{.MEALIE_VERSION}} \\" >> dist/requirements.txt
- poetry run pip hash dist/mealie-{{.MEALIE_VERSION}}-py3-none-any.whl | tail -n1 | tr -d '\n' >> dist/requirements.txt - pip hash dist/mealie-{{.MEALIE_VERSION}}-py3-none-any.whl | tail -n1 | tr -d '\n' >> dist/requirements.txt
- echo " \\" >> dist/requirements.txt - echo " \\" >> dist/requirements.txt
- poetry run pip hash dist/mealie-{{.MEALIE_VERSION}}.tar.gz | tail -n1 >> dist/requirements.txt - pip hash dist/mealie-{{.MEALIE_VERSION}}.tar.gz | tail -n1 >> dist/requirements.txt
vars: vars:
MEALIE_VERSION: MEALIE_VERSION:
sh: poetry version --short sh: python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])"
sources: sources:
- poetry.lock - uv.lock
- pyproject.toml - pyproject.toml
- dist/mealie-*.whl - dist/mealie-*.whl
- dist/mealie-*.tar.gz - dist/mealie-*.tar.gz
@@ -184,13 +184,13 @@ tasks:
deps: deps:
- py:package:deps - py:package:deps
cmds: cmds:
- poetry build -n --output=dist - uv build --out-dir dist
- task: py:package:generate-requirements - task: py:package:generate-requirements
py: py:
desc: runs the backend server desc: runs the backend server
cmds: cmds:
- poetry run python mealie/app.py - uv run python mealie/app.py
py:postgres: py:postgres:
desc: runs the backend server configured for containerized postgres desc: runs the backend server configured for containerized postgres
@@ -202,12 +202,12 @@ tasks:
POSTGRES_PORT: 5432 POSTGRES_PORT: 5432
POSTGRES_DB: mealie POSTGRES_DB: mealie
cmds: cmds:
- poetry run python mealie/app.py - uv run python mealie/app.py
py:migrate: py:migrate:
desc: generates a new database migration file e.g. task py:migrate -- "add new column" desc: generates a new database migration file e.g. task py:migrate -- "add new column"
cmds: cmds:
- poetry run alembic --config mealie/alembic/alembic.ini revision --autogenerate -m "{{ .CLI_ARGS }}" - uv run alembic --config mealie/alembic/alembic.ini revision --autogenerate -m "{{ .CLI_ARGS }}"
- task: py:format - task: py:format
ui:build: ui:build:

View File

@@ -113,8 +113,8 @@ def main():
{"children": all_children}, {"children": all_children},
) )
subprocess.run(["poetry", "run", "ruff", "check", str(out_path), "--fix"]) subprocess.run(["uv", "run", "ruff", "check", str(out_path), "--fix"])
subprocess.run(["poetry", "run", "ruff", "format", str(out_path)]) subprocess.run(["uv", "run", "ruff", "format", str(out_path)])
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -100,8 +100,8 @@ def main() -> None:
render_python_template(template, template_path, {"module": module}) render_python_template(template, template_path, {"module": module})
path_args = (str(p) for p in template_paths) path_args = (str(p) for p in template_paths)
subprocess.run(["poetry", "run", "ruff", "check", *path_args, "--fix"]) subprocess.run(["uv", "run", "ruff", "check", *path_args, "--fix"])
subprocess.run(["poetry", "run", "ruff", "format", *path_args]) subprocess.run(["uv", "run", "ruff", "format", *path_args])
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -50,40 +50,29 @@ RUN apt-get update \
curl \ curl \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
ENV POETRY_HOME="/opt/poetry" \ RUN pip install uv
POETRY_NO_INTERACTION=1
# prepend poetry to path
ENV PATH="$POETRY_HOME/bin:$PATH"
# install poetry - respects $POETRY_VERSION & $POETRY_HOME
ENV POETRY_VERSION=2.0.1
RUN curl -sSL https://install.python-poetry.org | python3 -
# install poetry plugins needed to build the package
RUN poetry self add "poetry-plugin-export>=1.9"
WORKDIR /mealie WORKDIR /mealie
# copy project files here to ensure they will be cached. # copy project files here to ensure they will be cached.
COPY poetry.lock pyproject.toml ./ COPY uv.lock pyproject.toml ./
COPY mealie ./mealie COPY mealie ./mealie
# Copy frontend to package it into the wheel # Copy frontend to package it into the wheel
COPY --from=frontend-builder /frontend/dist ./mealie/frontend COPY --from=frontend-builder /frontend/dist ./mealie/frontend
# Build the source and binary package # Build the source and binary package
RUN poetry build --output=dist RUN uv build --out-dir dist
# Create the requirements file, which is used to install the built package and # Create the requirements file, which is used to install the built package and
# its pinned dependencies later. mealie is included to ensure the built one is # its pinned dependencies later. mealie is included to ensure the built one is
# what's installed. # what's installed.
RUN export MEALIE_VERSION=$(poetry version --short) \ RUN uv export --no-editable --no-emit-project --extra pgsql --format requirements-txt --output-file dist/requirements.txt \
&& poetry export --only=main --extras=pgsql --output=dist/requirements.txt \ && MEALIE_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])") \
&& echo "mealie[pgsql]==$MEALIE_VERSION \\" >> dist/requirements.txt \ && echo "mealie[pgsql]==${MEALIE_VERSION} \\" >> dist/requirements.txt \
&& poetry run pip hash dist/mealie-$MEALIE_VERSION-py3-none-any.whl | tail -n1 | tr -d '\n' >> dist/requirements.txt \ && pip hash dist/mealie-${MEALIE_VERSION}-py3-none-any.whl | tail -n1 | tr -d '\n' >> dist/requirements.txt \
&& echo " \\" >> dist/requirements.txt \ && echo " \\" >> dist/requirements.txt \
&& poetry run pip hash dist/mealie-$MEALIE_VERSION.tar.gz | tail -n1 >> dist/requirements.txt && pip hash dist/mealie-${MEALIE_VERSION}.tar.gz | tail -n1 >> dist/requirements.txt
############################################### ###############################################
# Package Container # Package Container

View File

@@ -12,13 +12,13 @@ yarnpkg generate
popd popd
rm -r mealie/frontend rm -r mealie/frontend
cp -a frontend/dist mealie/frontend cp -a frontend/dist mealie/frontend
poetry build uv build --out-dir dist
poetry export -n --only=main --extras=pgsql --output=dist/requirements.txt uv export --no-editable --no-emit-project --extra pgsql --format requirements-txt --output-file dist/requirements.txt
MEALIE_VERSION=$(poetry version --short) MEALIE_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
echo "mealie[pgsql]==${MEALIE_VERSION} \\" >> dist/requirements.txt echo "mealie[pgsql]==${MEALIE_VERSION} \\" >> dist/requirements.txt
poetry run pip hash dist/mealie-${MEALIE_VERSION}-py3-none-any.whl | tail -n1 | tr -d '\n' >> dist/requirements.txt pip hash dist/mealie-${MEALIE_VERSION}-py3-none-any.whl | tail -n1 | tr -d '\n' >> dist/requirements.txt
echo " \\" >> dist/requirements.txt echo " \\" >> dist/requirements.txt
poetry run pip hash dist/mealie-${MEALIE_VERSION}.tar.gz | tail -n1 >> dist/requirements.txt pip hash dist/mealie-${MEALIE_VERSION}.tar.gz | tail -n1 >> dist/requirements.txt
``` ```
The Python package can be installed with all of its dependencies pinned to the versions tested by the developers with: The Python package can be installed with all of its dependencies pinned to the versions tested by the developers with:

View File

@@ -33,7 +33,7 @@ Make sure the VSCode Dev Containers extension is installed, then select "Dev Con
### Prerequisites ### Prerequisites
- [Python 3.12](https://www.python.org/downloads/) - [Python 3.12](https://www.python.org/downloads/)
- [Poetry](https://python-poetry.org/docs/#installation) - [uv](https://docs.astral.sh/uv/)
- [Node](https://nodejs.org/en/) - [Node](https://nodejs.org/en/)
- [yarn](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable) - [yarn](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable)
- [task](https://taskfile.dev/#/installation) - [task](https://taskfile.dev/#/installation)

4032
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,94 +1,93 @@
[tool.poetry] [project]
authors = ["Hayden <hay-kot@pm.me>"]
description = "A Recipe Manager"
license = "AGPL"
name = "mealie" name = "mealie"
version = "3.4.0" version = "3.4.0"
include = [ description = "A Recipe Manager"
# Explicit include to override .gitignore when packaging the frontend authors = [{ name = "Hayden", email = "hay-kot@pm.me" }]
{ path = "mealie/frontend/**/*", format = ["sdist", "wheel"] } license = "AGPL-3.0-only"
requires-python = ">=3.12,<3.13"
dependencies = [
"Jinja2>=3.1.2,<4.0.0",
"Pillow>=12.0.0,<13.0.0",
"PyYAML>=6.0.1,<7.0.0",
"SQLAlchemy>=2.0.0,<3.0.0",
"aiofiles>=25.0.0,<26.0.0",
"alembic>=1.11.3,<2.0.0",
"aniso8601==10.0.1",
"appdirs==1.4.4",
"apprise>=1.4.5,<2.0.0",
"bcrypt>=5.0.0,<6.0.0",
"extruct>=0.18.0,<1.0.0",
"fastapi>=0.120.0,<1.0.0",
"httpx>=0.28.0,<1.0.0",
"lxml>=6.0.0,<7.0.0",
"orjson>=3.8.0,<4.0.0",
"pydantic>=2.6.1,<3.0.0",
"pyhumps>=3.5.3,<4.0.0",
"python-dateutil>=2.8.2,<3.0.0",
"python-dotenv>=1.0.0,<2.0.0",
"python-ldap>=3.3.1,<4.0.0",
"python-multipart>=0.0.20,<1.0.0",
"python-slugify>=8.0.0,<9.0.0",
"recipe-scrapers>=15.0.0,<16.0.0",
"requests>=2.31.0,<3.0.0",
"tzdata>=2024.1,<2025.0.0",
"uvicorn[standard]>=0.38.0,<1.0.0",
"beautifulsoup4>=4.11.2,<5.0.0",
"isodate>=0.7.0,<1.0.0",
"text-unidecode>=1.3,<2.0",
"rapidfuzz>=3.2.0,<4.0.0",
"authlib>=1.3.0,<2.0.0",
"html2text>=2025.0.0,<2026.0.0",
"paho-mqtt>=1.6.1,<2.0.0",
"pydantic-settings>=2.1.0,<3.0.0",
"pillow-heif>=1.0.0,<2.0.0",
"pyjwt>=2.8.0,<3.0.0",
"openai>=2.0.0,<3.0.0",
"typing-extensions>=4.12.2,<5.0.0",
"itsdangerous>=2.2.0,<3.0.0",
"ingredient-parser-nlp>=2.0.0,<3.0.0",
] ]
[tool.poetry.scripts] [project.scripts]
mealie = "mealie.main:main" mealie = "mealie.main:main"
[tool.poetry.dependencies] [project.optional-dependencies]
Jinja2 = "^3.1.2" pgsql = [
Pillow = "^12.0.0" "psycopg2-binary>=2.9.1,<3.0.0"
PyYAML = "^6.0.1" ]
SQLAlchemy = "^2"
aiofiles = "^25.0.0"
alembic = "^1.11.3"
aniso8601 = "10.0.1"
appdirs = "1.4.4"
apprise = "^1.4.5"
bcrypt = "^5.0.0"
extruct = "^0.18.0"
fastapi = "^0.120.0"
httpx = "^0.28.0"
lxml = "^6.0.0"
orjson = "^3.8.0"
psycopg2-binary = { version = "^2.9.1", optional = true }
pydantic = "^2.6.1"
pyhumps = "^3.5.3"
python = ">=3.12,<3.13"
python-dateutil = "^2.8.2"
python-dotenv = "^1.0.0"
python-ldap = "^3.3.1"
python-multipart = "^0.0.20"
python-slugify = "^8.0.0"
recipe-scrapers = "^15.0.0"
requests = "^2.31.0"
tzdata = "^2024.1"
uvicorn = { extras = ["standard"], version = "^0.38.0" }
beautifulsoup4 = "^4.11.2"
isodate = "^0.7.0"
text-unidecode = "^1.3"
rapidfuzz = "^3.2.0"
authlib = "^1.3.0"
html2text = "^2025.0.0"
paho-mqtt = "^1.6.1"
pydantic-settings = "^2.1.0"
pillow-heif = "^1.0.0"
pyjwt = "^2.8.0"
openai = "^2.0.0"
typing-extensions = "^4.12.2"
itsdangerous = "^2.2.0"
ingredient-parser-nlp = "^2.0.0"
[tool.poetry.group.postgres.dependencies]
psycopg2-binary = { version = "^2.9.1" }
[tool.poetry.group.dev.dependencies]
coverage = "^7.0"
coveragepy-lcov = "^0.1.1"
mkdocs-material = "^9.0.0"
mypy = "^1.5.1"
pre-commit = "^4.0.0"
pylint = "^4.0.0"
pytest = "^8.0.0"
pytest-asyncio = "^1.0.0"
rich = "^14.0.0"
ruff = "^0.14.0"
types-PyYAML = "^6.0.4"
types-python-dateutil = "^2.8.18"
types-python-slugify = "^6.0.0"
types-requests = "^2.27.12"
types-urllib3 = "^1.26.11"
pydantic-to-typescript2 = "^1.0.4"
[dependency-groups]
dev = [
"coverage>=7.0,<8.0",
"coveragepy-lcov>=0.1.1,<1.0.0",
"mkdocs-material>=9.0.0,<10.0.0",
"mypy>=1.5.1,<2.0.0",
"pre-commit>=4.0.0,<5.0.0",
"pylint>=4.0.0,<5.0.0",
"pytest>=8.0.0,<9.0.0",
"pytest-asyncio>=1.0.0,<2.0.0",
"rich>=14.0.0,<15.0.0",
"ruff>=0.14.0,<1.0.0",
"types-PyYAML>=6.0.4,<7.0.0",
"types-python-dateutil>=2.8.18,<3.0.0",
"types-python-slugify>=6.0.0,<7.0.0",
"types-requests>=2.27.12,<3.0.0",
"types-urllib3>=1.26.11,<2.0.0",
"pydantic-to-typescript2>=1.0.4,<2.0.0",
]
[build-system] [build-system]
build-backend = "poetry.core.masonry.api" requires = ["setuptools>=77.0.0"]
requires = ["poetry-core>=1.0.0"] build-backend = "setuptools.build_meta"
[tool.vulture] [tool.setuptools]
exclude = ["**/models/**/*.py", "dir/"] include-package-data = true
ignore_decorators = ["@*router.*", "@app.on_event", "@field_validator", "@controller"]
make_whitelist = true [tool.setuptools.packages.find]
min_confidence = 60 include = ["mealie*"]
paths = ["mealie"]
sort_by_size = true [tool.setuptools.package-data]
"*" = ["*"]
[tool.pytest.ini_options] [tool.pytest.ini_options]
addopts = "-ra -q" addopts = "-ra -q"
@@ -102,9 +101,6 @@ testpaths = ["tests"]
[tool.coverage.report] [tool.coverage.report]
skip_empty = true skip_empty = true
[tool.poetry.extras]
pgsql = ["psycopg2-binary"]
[tool.mypy] [tool.mypy]
follow_imports = "skip" follow_imports = "skip"
ignore_missing_imports = true ignore_missing_imports = true
@@ -113,6 +109,7 @@ python_version = "3.12"
strict_optional = true strict_optional = true
[tool.ruff] [tool.ruff]
target-version = "py312"
line-length = 120 line-length = 120
output-format = "concise" output-format = "concise"
@@ -139,9 +136,6 @@ exclude = [
"venv", "venv",
] ]
# Assume Python 3.12.
target-version = "py312"
[tool.ruff.lint.isort] [tool.ruff.lint.isort]
known-third-party = ["alembic"] known-third-party = ["alembic"]

View File

@@ -1,7 +1,7 @@
{ {
"$schema": "https://docs.renovatebot.com/renovate-schema.json", "$schema": "https://docs.renovatebot.com/renovate-schema.json",
"enabledManagers": [ "enabledManagers": [
"poetry", "pep621",
"dockerfile", "dockerfile",
"npm" "npm"
], ],

2040
uv.lock generated Normal file

File diff suppressed because it is too large Load Diff