Skip to content

Bump python version#28

Merged
RadCod3 merged 5 commits intomainfrom
chore/27-bump-python
Jan 10, 2026
Merged

Bump python version#28
RadCod3 merged 5 commits intomainfrom
chore/27-bump-python

Conversation

@RadCod3
Copy link
Owner

@RadCod3 RadCod3 commented Jan 10, 2026

Resolves #27

Summary by CodeRabbit

  • Chores
    • Updated Python version requirement to 3.14+ across CI, build tools, and production environments
    • Optimized Docker image using Alpine Linux with pre-installed dependencies for faster builds and smaller deployments
    • Enhanced type safety with stricter validation checks

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI review requested due to automatic review settings January 10, 2026 07:05
Copy link
Contributor

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 attempts to bump the project's Python version requirement from 3.13 to 3.14 across all configuration files and documentation, as requested in issue #27. The changes update version specifications in pyproject.toml, Dockerfile, .python-version, README.md, and CI workflows, and regenerate the uv.lock file to remove Python 3.13 wheels in favor of Python 3.14 wheels.

Changes:

  • Updated Python version requirement from 3.13 to 3.14 in all configuration files
  • Regenerated uv.lock to use Python 3.14 wheels instead of Python 3.13 wheels
  • Removed a # type: ignore comment in firefly.py client code

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pyproject.toml Updated requires-python from ">=3.13" to ">=3.14"
Dockerfile Updated base image from python:3.13-slim to python:3.14-slim
.python-version Updated version from 3.13 to 3.14
README.md Updated prerequisite documentation from Python 3.13+ to Python 3.14+
.github/workflows/ci.yml Updated CI Python installation commands from 3.13 to 3.14
uv.lock Regenerated lock file removing Python 3.13 wheels, adding Python 3.14 wheels
src/lampyrid/clients/firefly.py Removed unnecessary # type: ignore comment

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

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 6 out of 7 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

coderabbitai bot commented Jan 10, 2026

📝 Walkthrough

Walkthrough

This PR upgrades the project's Python runtime version from 3.13 to 3.14 across configuration, CI/CD, and tooling files. The Dockerfile switches to an Alpine-based image with pre-installed uv and updates user creation commands for Alpine compatibility. A type ignore comment is removed from firefly client code.

Changes

Cohort / File(s) Summary
Version Configuration
pyproject.toml, .python-version, README.md
Updated Python version requirement from 3.13 to 3.14 across package metadata, runtime version declaration, and documentation
CI/CD Workflow
.github/workflows/ci.yml
Updated two job steps to install Python 3.14 instead of 3.13
Container Configuration
Dockerfile
Replaced base image from python:3.13-slim to python:3.14-alpine with pre-installed uv; updated non-root user creation from groupadd/useradd to Alpine-compatible addgroup/adduser commands
Source Code
src/lampyrid/clients/firefly.py
Removed inline type ignore comment from TransactionSplitUpdate instantiation to enforce strict type checking

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Hopping high to 3.14,
Version bumps forevermore!
Alpine images, workflows lean,
The finest Python yet we've seen!
With types now strict and clean as day,
Our code hops brightly on its way! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning One change appears out of scope: removing the type ignore comment in firefly.py is not listed in issue #27 requirements for the Python version bump. Clarify whether the type ignore removal in firefly.py is a necessary change for Python 3.14 compatibility or should be addressed in a separate PR.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Bump python version' directly and concisely summarizes the main change of the PR, which is updating the project's Python version requirement.
Linked Issues check ✅ Passed All required changes from issue #27 have been implemented: pyproject.toml, Dockerfile, .python-version, README.md, and .github/workflows/ci.yml have been updated to Python 3.14.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
Dockerfile (1)

28-29: Explicitly create the home directory for the lampyrid user.

Alpine's adduser -S with -h /home/lampyrid sets the home directory path in /etc/passwd but does not create the directory itself. While Line 32's mkdir -p /home/lampyrid/.cache/uv will create it as a side effect, this is implicit and fragile.

🏠 Proposed fix to explicitly create home directory
 # Create a non-root user for security (Alpine uses addgroup/adduser)
-RUN addgroup -S lampyrid && adduser -S -G lampyrid -h /home/lampyrid lampyrid
+RUN addgroup -S lampyrid && \
+    adduser -S -G lampyrid -h /home/lampyrid lampyrid && \
+    mkdir -p /home/lampyrid
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2d5ce81 and 24bac7c.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • .github/workflows/ci.yml
  • .python-version
  • Dockerfile
  • README.md
  • pyproject.toml
  • src/lampyrid/clients/firefly.py
🧰 Additional context used
🧬 Code graph analysis (1)
src/lampyrid/clients/firefly.py (1)
src/lampyrid/models/firefly_models.py (1)
  • TransactionSplitUpdate (3301-3434)
🔇 Additional comments (6)
README.md (1)

18-18: LGTM! Documentation properly updated.

The prerequisites section correctly reflects the Python 3.14 requirement, consistent with the pyproject.toml changes.

.python-version (1)

1-1: LGTM! Runtime version declaration updated correctly.

The .python-version file now correctly specifies Python 3.14, ensuring version managers like pyenv use the appropriate Python version.

.github/workflows/ci.yml (1)

24-24: LGTM! CI workflows updated to Python 3.14.

Both the lint-and-format and build-test jobs now correctly install Python 3.14, ensuring all CI checks run against the new Python version. The docker-build-test job will use the Python version specified in the Dockerfile.

Also applies to: 48-48

pyproject.toml (1)

10-10: Dependencies already support Python 3.14.

The project's locked dependency versions already meet Python 3.14 requirements: Pydantic 2.12.5 (released Oct 7, 2025 with Python 3.14 support) exceeds the minimum 2.12.0 needed, and FastMCP 2.14.2 and Pydantic-settings 2.12.0 are similarly compatible. No lockfile update is necessary.

src/lampyrid/clients/firefly.py (1)

193-193: Type ignore removal is safe, but reasoning needs correction.

The removal is justified because TransactionSplitUpdate has all fields declared as Optional with defaults (lines like amount: Optional[str] = Field(default=None, ...)). Since update_kwargs only includes keys where the corresponding request field is not None (lines 176–192), passing **update_kwargs to the constructor is type-safe without the ignore comment.

However, this safety derives from Pydantic's handling of partial kwargs for all-optional models, not from PEP 649's deferred annotation evaluation. PEP 649 addresses lazy evaluation of type annotations themselves, not kwargs validation. The change is correct and can remain, but the justification in the review comment misattributes the reason to annotation improvements.

Likely an incorrect or invalid review comment.

Dockerfile (1)

1-2: The Alpine image change is safe for this project. Python 3.14 is stable and production-ready, and the runtime dependencies (fastmcp, pydantic, pydantic-settings) have no known musl compatibility issues. The user home directory is properly created before use. No action required.

@RadCod3 RadCod3 merged commit e108b67 into main Jan 10, 2026
4 checks passed
@RadCod3 RadCod3 deleted the chore/27-bump-python branch January 10, 2026 08:05
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.

Bump project Python version to 3.14

1 participant