Conversation
There was a problem hiding this comment.
Pull request overview
This PR modernizes the Python dependency and container setup by migrating from requirements.txt to a pyproject.toml + uv.lock workflow, updating Docker to install dependencies via uv, and adding Dependabot support for the new ecosystem.
Changes:
- Replace
requirements.txtwithpyproject.tomland a generateduv.lock(Python >= 3.12). - Update the Docker build to install dependencies using
uvand run the app viauv run. - Add
.python-versionand a Dependabot config targetinguv.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
uv.lock |
Adds a uv lockfile capturing resolved dependency versions for reproducible installs. |
requirements.txt |
Removes the legacy pip requirements list in favor of pyproject.toml/uv.lock. |
pyproject.toml |
Introduces project metadata and dependencies using PEP 621 [project]. |
Dockerfile |
Switches base image and installs dependencies via uv (with libmagic1 for python-magic). |
.python-version |
Pins local/dev Python version to 3.12. |
.github/dependabot.yml |
Configures Dependabot updates for the uv ecosystem. |
LICENSE |
Updates copyright header. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
use --frozen Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
update description Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@samppanja I've opened a new pull request, #3, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@samppanja I've opened a new pull request, #4, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: samppanja <21281919+samppanja@users.noreply.github.com>
Fix Docker layer caching in Dockerfile
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: samppanja <21281919+samppanja@users.noreply.github.com>
Co-authored-by: samppanja <21281919+samppanja@users.noreply.github.com>
Co-authored-by: samppanja <21281919+samppanja@users.noreply.github.com>
Co-authored-by: samppanja <21281919+samppanja@users.noreply.github.com>
Replace curl-pipe-to-shell uv install with pinned pipx version
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@claude[agent] code review |
|
@samppanja I've opened a new pull request, #5, to work on those changes. Once the pull request is ready, I'll request review from you. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| && apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| RUN pip3 install --no-cache-dir --upgrade -r /app/requirements.txt | ||
| COPY pyproject.toml uv.lock ./ |
There was a problem hiding this comment.
uv sync runs right after copying only pyproject.toml/uv.lock, but the project metadata references README.md (and uv sync typically installs the local project by default). This can fail during build because README.md/source files are not present yet. Consider copying README.md (and any files needed to build the project) before uv sync, or run uv sync with the appropriate flag to avoid installing the project during this layer.
| COPY pyproject.toml uv.lock ./ | |
| COPY pyproject.toml uv.lock README.md ./ |
| COPY pyproject.toml uv.lock ./ | ||
| RUN uv sync --no-dev --frozen | ||
|
|
||
| COPY . /app |
There was a problem hiding this comment.
COPY . /app will include the entire build context (including .git/ and any locally-created .venv/), which can bloat the image and can also overwrite the virtual environment created by uv sync if a local .venv exists. Adding a .dockerignore to exclude .git, .venv, __pycache__, etc. avoids these issues and makes builds more deterministic.
modernize application