Skip to content

Modernize#2

Open
samppanja wants to merge 16 commits intomasterfrom
modernize
Open

Modernize#2
samppanja wants to merge 16 commits intomasterfrom
modernize

Conversation

@samppanja
Copy link
Owner

modernize application

Copilot AI review requested due to automatic review settings March 10, 2026 15:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.txt with pyproject.toml and a generated uv.lock (Python >= 3.12).
  • Update the Docker build to install dependencies using uv and run the app via uv run.
  • Add .python-version and a Dependabot config targeting uv.

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>
Copilot AI review requested due to automatic review settings March 10, 2026 18:18
update description

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

Copilot AI commented Mar 10, 2026

@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.

Copy link

Copilot AI commented Mar 10, 2026

@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.

Copilot AI and others added 2 commits March 10, 2026 18:20
Co-authored-by: samppanja <21281919+samppanja@users.noreply.github.com>
Fix Docker layer caching in Dockerfile
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot AI and others added 7 commits March 10, 2026 18:24
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>
Copilot AI review requested due to automatic review settings March 10, 2026 18:40
@samppanja
Copy link
Owner Author

@claude[agent] code review

@Claude
Copy link

Claude AI commented Mar 10, 2026

@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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ./
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
COPY pyproject.toml uv.lock ./
COPY pyproject.toml uv.lock README.md ./

Copilot uses AI. Check for mistakes.
COPY pyproject.toml uv.lock ./
RUN uv sync --no-dev --frozen

COPY . /app
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants