Skip to content

Comments

Migrate Python dependency management to uv and update Next.js configuration#569

Merged
jrhoads merged 2 commits intomasterfrom
python-uv
Feb 12, 2026
Merged

Migrate Python dependency management to uv and update Next.js configuration#569
jrhoads merged 2 commits intomasterfrom
python-uv

Conversation

@jrhoads
Copy link
Contributor

@jrhoads jrhoads commented Feb 12, 2026

Purpose

This PR migrates the Python API dependency management from legacy requirements.txt to the modern uv package manager. It also provides minor cleanup to the Next.js configuration.

Approach

The transition involves replacing the manual pip installation process with uv's workspace-aware commands. Dependency definitions have been moved to standard Python packaging formats (pyproject.toml).

Key Modifications

  • Python Dependency Management:
    • Deleted api/requirements.txt.
    • Added api/pyproject.toml and api/uv.lock for deterministic dependency resolution.
    • Specified Python version as 3.12 in .python-version.
    • Configured datacitekit as a URL-sourced dependency in pyproject.toml.
  • Scripts:
    • Updated package.json command definitions for api and api-prod to use uv sync and uv run.
  • Infrastructure/Build:
    • Cleaned up next.config.js by moving outputFileTracingExcludes out of the experimental flag (as it is now stable) and removing swcMinify: true (which is default in modern Next.js).

Important Technical Details

  • The project now relies on uv being installed in the development/build environment.
  • Dependencies are isolated per project environment, ensuring better consistency across developer machines and CI/CD.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Reviewer, please remember our guidelines:

  • Be humble in the language and feedback you give, ask don't tell.
  • Consider using positive language as opposed to neutral when offering feedback. This is to avoid the negative bias that can occur with neutral language appearing negative.
  • Offer suggestions on how to improve code e.g. simplification or expanding clarity.
  • Ensure you give reasons for the changes you are proposing.

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated project infrastructure and build tooling configuration.
    • Reorganized API project configuration for improved dependency management.
    • Updated build scripts for more efficient project setup and execution.
    • Optimized Next.js build configuration by consolidating settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 12, 2026

Walkthrough

This PR transitions the Python API tooling from pip/Flask to uv-based dependency management, specifies Python 3.12, and restructures Next.js configuration by promoting outputFileTracingExcludes to top-level config.

Changes

Cohort / File(s) Summary
Python API Configuration
api/.python-version, api/pyproject.toml, api/requirements.txt
Added Python 3.12 version specification and new pyproject.toml with uv-compatible project metadata and dependencies; removed Flask and datacitekit URL from requirements.txt.
Next.js Configuration
next.config.js
Removed swcMinify and experimental.outputFileTracingExcludes; promoted outputFileTracingExcludes to top-level config with unchanged exclusion list.
Build Scripts
package.json
Updated api and api-prod scripts to use uv sync and uv run instead of pip3 install and python3 invocations while preserving environment-specific API URLs.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: migrating Python dependency management to uv and updating Next.js configuration, which are the primary objectives of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch python-uv

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
api/pyproject.toml (2)

11-12: Non-deterministic dependency: datacitekit points to a moving main branch archive.

The URL https://github.com/datacite/datacitekit/archive/main.zip resolves to whatever is on main at the time of resolution. While uv.lock should pin the exact hash for reproducible installs, any uv lock --upgrade or fresh lock will silently pull in potentially breaking changes. Consider pinning to a specific tag or commit SHA (e.g., .../archive/<tag-or-sha>.zip) for safer upgrades.


4-4: Placeholder description should be updated.

"Add your description here" was left from the uv init scaffold.

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@cypress
Copy link

cypress bot commented Feb 12, 2026

akita    Run #1890

Run Properties:  status check passed Passed #1890  •  git commit 05ba1b1def ℹ️: Merge 927d0b78f0992fb4294b2b538e0d2a4075a7cd81 into 658ef4140adfd0cdcad52f70510a...
Project akita
Branch Review python-uv
Run status status check passed Passed #1890
Run duration 01m 47s
Commit git commit 05ba1b1def ℹ️: Merge 927d0b78f0992fb4294b2b538e0d2a4075a7cd81 into 658ef4140adfd0cdcad52f70510a...
Committer Joseph Rhoads
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 2
Tests that did not run due to a developer annotating a test with .skip  Pending 3
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 47
View all changes introduced in this branch ↗︎

@jrhoads jrhoads requested review from a team, bklaing2 and codycooperross February 12, 2026 13:11
@jrhoads jrhoads merged commit 158c330 into master Feb 12, 2026
13 checks passed
@jrhoads jrhoads deleted the python-uv branch February 12, 2026 16:21
@cypress
Copy link

cypress bot commented Feb 12, 2026

akita    Run #1893

Run Properties:  status check passed Passed #1893  •  git commit 158c330627: Merge pull request #569 from datacite/python-uv
Project akita
Branch Review 1.42.1
Run status status check passed Passed #1893
Run duration 01m 51s
Commit git commit 158c330627: Merge pull request #569 from datacite/python-uv
Committer Joseph Rhoads
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 3
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 47
View all changes introduced in this branch ↗︎

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.

3 participants