You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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.
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This PR migrates the Python API dependency management from legacy
requirements.txtto the modern uv package manager. It also provides minor cleanup to the Next.js configuration.Approach
The transition involves replacing the manual
pipinstallation process withuv's workspace-aware commands. Dependency definitions have been moved to standard Python packaging formats (pyproject.toml).Key Modifications
api/requirements.txt.api/pyproject.tomlandapi/uv.lockfor deterministic dependency resolution..python-version.datacitekitas a URL-sourced dependency inpyproject.toml.package.jsoncommand definitions forapiandapi-prodto useuv syncanduv run.next.config.jsby movingoutputFileTracingExcludesout of theexperimentalflag (as it is now stable) and removingswcMinify: true(which is default in modern Next.js).Important Technical Details
uvbeing installed in the development/build environment.Types of changes
Reviewer, please remember our guidelines:
Summary by CodeRabbit
Release Notes