Skip to content

Migrate to uv for dependency management#3101

Merged
arkid15r merged 12 commits intovacanza:devfrom
PPsyrius:uv
Dec 6, 2025
Merged

Migrate to uv for dependency management#3101
arkid15r merged 12 commits intovacanza:devfrom
PPsyrius:uv

Conversation

@PPsyrius
Copy link
Copy Markdown
Collaborator

@PPsyrius PPsyrius commented Dec 2, 2025

Proposed change

Pretty much a proof-of-concept at the moment (as I cannot test GitHub action ones locally), I've also updated the CONTRIBUTING.md up a bit to be clearer for Windows-based contributors.

Also, turns out CycloneDX doesn't officially support uv at the moment, but this workaround from CycloneDX/cyclonedx-python#857 works. I know uv did recently implement theirs as part of uv export in astral-sh/uv#16523 (v0.9.11) but I haven't tried that yet.

Resolves #2342

Type of change

  • New country/market holidays support (thank you!)
  • Supported country/market holidays update (calendar discrepancy fix, localization)
  • Existing code/documentation/test/process quality improvement (best practice, cleanup, refactoring, optimization)
  • Dependency update (version deprecation/pin/upgrade)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (a code change causing existing functionality to break)
  • New feature (new holidays functionality in general)

Checklist

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 2, 2025

Summary by CodeRabbit

Release Notes

  • Chores
    • Migrated build and development tooling to use uv for improved dependency management and performance.
    • Updated project configuration and metadata.
    • Added documentation for Windows WSL file permission fixes to support developers using WSL environments.

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

Walkthrough

Replaces pip/requirements-based dependency management and CI steps with UV-based tooling (astral-sh/setup-uv, uv venv, uv sync, uv run, uv build); migrates dependency pins into pyproject.toml extras; removes requirements/* files; updates Makefile/make.cmd, tox, dependabot, workflows, MANIFEST.in, and CONTRIBUTING.md (adds WSL fix note).

Changes

Cohort / File(s) Summary
CI workflows
\.github/workflows/ci-cd.yml, \.github/workflows/update-snapshots.yml
Replace Python setup and pip steps with astral-sh/setup-uv; use uv venv --clear, uv sync --extra ... --link-mode=copy; convert make/python -m/pip/pytest invocations to uv run/uv pytest; adjust venv lifecycle and artifact steps.
ReadTheDocs config
\.readthedocs.yaml
Add pre-create/create environment steps using uv (asdf install/set, uv venv, uv sync) before mkdocs build.
Project metadata & deps
pyproject.toml
Add optional-dependencies groups (build, dev, docs, tests); change python-dateutil to >=2.9.0.post0; add project.urls entries (Changelog, Documentation, Repository).
Removed requirements
requirements/*
requirements/build.txt, requirements/dev.txt, requirements/docs.txt, requirements/runtime.txt, requirements/tests.txt
Deleted or emptied these files, removing pinned dependency lists previously held in them.
Build & developer scripts
Makefile, make.cmd
Replace direct python/pip/tool invocations with uv venv, uv sync, uv run, uv build, and uv tool run across targets (docs, l10n, package, sbom, setup, snapshot, test, tox, pre-commit, release-notes).
Packaging manifest
MANIFEST.in
Removed recursive inclusion of requirements files from the source distribution.
Contribution docs
CONTRIBUTING.md
Inserted WSL Windows file-permission fix instructions (edit /etc/wsl.conf, restart WSL, example outputs) under Running tests.
Tox config
tox.ini
Add tox-uv>=1.29 to [tox] requires; switch testenv dependencies to `extras = tests
Dependabot
.github/dependabot.yml
Change first updates[].package-ecosystem from pip to uv.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

  • Inspect CI workflows (.github/workflows/*) for correct uv venv lifecycle, matrix behavior, and artifact steps.
  • Verify pyproject.toml extras reproduce removed requirement pins including platform markers (numpy conditions).
  • Check Makefile/make.cmd uv mappings for developer ergonomics (pre-commit, sbom, packaging).
  • Validate tox-uv integration and that extras = ... produce equivalent test/docs environments.
  • Review packaging impacts from removing requirements from MANIFEST.in.

Possibly related PRs

Suggested labels

doc, script

Suggested reviewers

  • PPsyrius

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely captures the main objective of the PR: migrating the project to uv for dependency management, which is reflected throughout the changeset.
Description check ✅ Passed The description is relevant to the changeset, explaining the migration effort as a proof-of-concept, noting CycloneDX compatibility issues, and referencing the resolved issue #2342.
Linked Issues check ✅ Passed The PR substantially addresses issue #2342 requirements by creating pyproject.toml with organized optional-dependencies groups, migrating CI/build workflows to use uv commands, updating documentation (CONTRIBUTING.md), and replacing requirements.txt files with pyproject.toml declarations.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the uv migration: workflow updates, Makefile/make.cmd conversions, pyproject.toml setup, requirements.txt consolidation, and .readthedocs.yaml configuration—no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@github-actions github-actions bot added the ci label Dec 2, 2025
Copy link
Copy Markdown
Contributor

@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: 2

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e253407 and 81e311b.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (13)
  • .github/workflows/ci-cd.yml (5 hunks)
  • .github/workflows/update-snapshots.yml (1 hunks)
  • CONTRIBUTING.md (1 hunks)
  • MANIFEST.in (0 hunks)
  • Makefile (1 hunks)
  • make.cmd (2 hunks)
  • pyproject.toml (1 hunks)
  • requirements/build.txt (0 hunks)
  • requirements/dev.txt (0 hunks)
  • requirements/docs.txt (0 hunks)
  • requirements/runtime.txt (0 hunks)
  • requirements/tests.txt (0 hunks)
  • tox.ini (2 hunks)
💤 Files with no reviewable changes (6)
  • requirements/build.txt
  • MANIFEST.in
  • requirements/runtime.txt
  • requirements/docs.txt
  • requirements/dev.txt
  • requirements/tests.txt
🧰 Additional context used
🧠 Learnings (12)
📓 Common learnings
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2608
File: holidays/countries/saint_vincent_and_the_grenadines.py:30-30
Timestamp: 2025-06-07T07:37:55.516Z
Learning: For the vacanza/holidays repository, defer to the ruff configuration and pre-commit checks for coding standards rather than making manual suggestions about line length or style issues. If the automated checks pass, the code follows the project's standards.
📚 Learning: 2025-11-17T05:45:27.759Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 3062
File: scripts/generate_snapshots.py:69-80
Timestamp: 2025-11-17T05:45:27.759Z
Learning: The vacanza/holidays project requires Python 3.10+ as of November 2025 (specified in pyproject.toml as "requires-python = ">=3.10""). Python 3.9 support has been deprecated.

Applied to files:

  • pyproject.toml
📚 Learning: 2025-04-26T19:55:09.581Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2501
File: scripts/docs/gen_index.py:1-12
Timestamp: 2025-04-26T19:55:09.581Z
Learning: The holidays project uses a standard header for all Python (.py) files in the repository that describes the overall holidays library, including authors, website and license information, regardless of the specific purpose of individual script files.

Applied to files:

  • pyproject.toml
📚 Learning: 2025-09-15T15:54:52.871Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2929
File: scripts/generate_release_notes.py:82-82
Timestamp: 2025-09-15T15:54:52.871Z
Learning: The vacanza/holidays project requires Python 3.9+ and uses PyGithub 2.8.1, so there's no need for backward compatibility with PyGithub 1.x when reviewing authentication code.

Applied to files:

  • pyproject.toml
📚 Learning: 2025-06-05T09:31:22.753Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2599
File: holidays/countries/__init__.py:193-193
Timestamp: 2025-06-05T09:31:22.753Z
Learning: For the holidays Python library, when encountering line length or formatting issues, suggest contributors run `make pre-commit` to auto-format their files instead of providing specific manual formatting fixes like line splitting or noqa comments.

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-04-01T14:14:01.519Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2398
File: holidays/groups/islamic.py:301-301
Timestamp: 2025-04-01T14:14:01.519Z
Learning: Running `make pre-commit` in the holidays project can automatically fix common code style issues like whitespace in blank lines.

Applied to files:

  • CONTRIBUTING.md
  • tox.ini
📚 Learning: 2025-06-16T15:48:33.931Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2615
File: tests/countries/test_anguilla.py:20-24
Timestamp: 2025-06-16T15:48:33.931Z
Learning: The holidays project uses `make pre-commit` test which includes `ruff` as the primary linter. If `ruff` passes, then Pylint warnings that don't appear in `ruff` are considered acceptable and can be ignored.

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-04-05T04:47:27.213Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:47:27.213Z
Learning: For holiday tests in the vacanza/holidays project, structure tests by individual holidays rather than by years. Each test method should focus on a specific holiday and test it across multiple years (from start_year through 2050) using helper methods like `assertHolidayName`. For fixed holidays, use generators like `(f"{year}-01-01" for year in range(1991, 2051))`. For movable holidays, specify individual dates for specific years followed by a range check.

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-04-05T04:29:38.042Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2416
File: tests/countries/test_turkmenistan.py:85-86
Timestamp: 2025-04-05T04:29:38.042Z
Learning: For testing holiday implementations in the vacanza/holidays repository, recommend using `from tests.common import CommonCountryTests` as the base class instead of directly using `unittest.TestCase` to maintain consistency with project conventions and leverage common test utilities.

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-06-16T15:48:48.680Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2615
File: tests/countries/test_anguilla.py:1-12
Timestamp: 2025-06-16T15:48:48.680Z
Learning: Test files in the holidays repository follow a standardized structure without module or class docstrings. All country test files use the same pattern: license header, imports, and class definition (`class Test{Country}(CommonCountryTests, TestCase):`) without docstrings. This is an established codebase convention that should be maintained for consistency.

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-03-26T22:40:52.932Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2375
File: snapshots/countries/AR_G.json:2-2008
Timestamp: 2025-03-26T22:40:52.932Z
Learning: Snapshot files in the `snapshots/` directory are automatically generated by `scripts/generate_snapshots.py` and are intended for internal use only. There is no point in analyzing or suggesting changes to their contents as they are not meant to be manually edited.

Applied to files:

  • .github/workflows/update-snapshots.yml
📚 Learning: 2025-06-05T18:24:26.712Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2600
File: holidays/countries/philippines.py:56-56
Timestamp: 2025-06-05T18:24:26.712Z
Learning: In the holidays repository, if code passes `make pre-commit` checks, then it's allowed regardless of individual static analysis tool warnings like Pylint line length violations. The pre-commit hooks are the definitive source of truth for their coding standards.

Applied to files:

  • tox.ini
🪛 checkmake (0.2.2)
Makefile

[warning] 47-47: Target body for "setup" exceeds allowed length of 5 (6).

(maxbodylength)

🪛 markdownlint-cli2 (0.18.1)
CONTRIBUTING.md

27-27: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)

🔇 Additional comments (11)
CONTRIBUTING.md (1)

19-19: LGTM - helpful addition for Windows contributors.

The WSL permission fix documentation is clear and actionable. The uv installation reference aligns well with the migration goals.

Also applies to: 25-58

tox.ini (2)

4-4: Good addition for improved test performance.

Adding tox-uv aligns with the migration strategy and should provide faster environment setup.


12-13: Clean migration to extras-based dependency management.

The switch from file-based deps to extras properly reflects the new pyproject.toml structure.

Also applies to: 19-21, 30-31

pyproject.toml (3)

43-43: Verify the relaxed version constraint for python-dateutil.

Changed from an exact pin to >=2.9.0.post0, which allows patch and minor updates. Ensure this aligns with compatibility testing.


44-77: Well-structured optional dependencies.

The categorization into build, dev, docs, and tests extras is clear. Security pins with explanatory comments are good practice.


78-80: Useful metadata additions.

Adding project URLs improves discoverability and follows modern packaging standards.

.github/workflows/update-snapshots.yml (1)

29-30: Clean migration to uv for snapshot generation.

The workflow properly initializes a clean venv and syncs build dependencies before running the snapshot generation.

Also applies to: 33-33

Makefile (2)

48-51: Comprehensive setup target.

The setup properly initializes a clean venv and syncs all necessary extras for development. The --link-mode=copy ensures proper file handling.


26-26: Consistent uv run migration across all targets.

All make targets properly route commands through uv run, ensuring execution in the managed environment.

Also applies to: 30-31, 34-35, 38-38, 56-57, 60-61, 64-64

make.cmd (1)

29-29: Windows make script properly updated.

All changes mirror the Makefile updates with appropriate Windows path separators. Consistent uv run usage throughout.

Also applies to: 46-47, 51-52, 56-56, 60-60, 64-65, 69-72, 78-79, 84-84, 88-88

.github/workflows/ci-cd.yml (1)

99-99: CI/CD workflow properly migrated to uv.

The workflow consistently uses uv for dependency management and command execution across all test environments and platforms.

Also applies to: 102-102, 124-124, 127-127, 141-141, 179-185, 204-204

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (deb7499) to head (cf6acdc).
⚠️ Report is 8 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3101   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          306       306           
  Lines        18083     18083           
  Branches      2292      2292           
=========================================
  Hits         18083     18083           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@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: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 81e311b and 3c624e6.

📒 Files selected for processing (2)
  • .github/workflows/ci-cd.yml (5 hunks)
  • .github/workflows/update-snapshots.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Test Python 3.14 on windows-latest
  • GitHub Check: Test Python 3.13 on windows-latest
  • GitHub Check: Test Python 3.10 on windows-latest
  • GitHub Check: Test Python 3.11 on windows-latest
  • GitHub Check: Test Python 3.12 on windows-latest
🔇 Additional comments (5)
.github/workflows/update-snapshots.yml (2)

27-33: uv setup looks solid. Venv initialized cleanly, deps synced with build extras. Good foundation for the subsequent make invocation.


35-36: Snapshot generation via uv is correct. The uv run make snapshot pattern properly invokes make within the uv-managed environment.

.github/workflows/ci-cd.yml (3)

98-105: Test job uv integration is correct. Proper sequencing: install uv, sync test extras, invoke make through uv.


179-191: test-build job flow is well-structured. Clean venv setup, dual-artifact testing (wheel then tarball), and proper uv command usage. Good coverage for package distribution validation.


206-213: test-docs job properly configured. uv installed, doc extras synced correctly with --extra docs, and make invoked through uv. Past review flagging --docs usage appears resolved.

Copy link
Copy Markdown
Contributor

@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: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3c624e6 and af952f2.

📒 Files selected for processing (3)
  • .github/workflows/ci-cd.yml (5 hunks)
  • .github/workflows/update-snapshots.yml (1 hunks)
  • Makefile (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-03-26T22:40:52.932Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2375
File: snapshots/countries/AR_G.json:2-2008
Timestamp: 2025-03-26T22:40:52.932Z
Learning: Snapshot files in the `snapshots/` directory are automatically generated by `scripts/generate_snapshots.py` and are intended for internal use only. There is no point in analyzing or suggesting changes to their contents as they are not meant to be manually edited.

Applied to files:

  • .github/workflows/update-snapshots.yml
🪛 checkmake (0.2.2)
Makefile

[warning] 47-47: Target body for "setup" exceeds allowed length of 5 (6).

(maxbodylength)

⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Test Python 3.13 on windows-latest
  • GitHub Check: Test Python 3.14 on windows-latest
  • GitHub Check: Test Python 3.11 on windows-latest
  • GitHub Check: Test Python 3.10 on windows-latest
🔇 Additional comments (1)
Makefile (1)

48-51: Setup target complexity is acceptable despite style analysis flag.

Static analysis flags the setup target body as exceeding 5 lines (currently 6), but this multi-line command with proper Makefile continuation syntax is legitimate and acceptable. No functional issue here.

Copy link
Copy Markdown
Contributor

@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: 2

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between af952f2 and 13298d1.

📒 Files selected for processing (1)
  • .github/workflows/ci-cd.yml (5 hunks)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Test Python 3.12 on windows-latest
  • GitHub Check: Test Python 3.14 on windows-latest
  • GitHub Check: Test Python 3.11 on windows-latest
🔇 Additional comments (1)
.github/workflows/ci-cd.yml (1)

98-105: uv migration flow looks solid.

All four jobs (test, build, test-build, test-docs) now properly install uv, run uv sync --extra <group> to pull dependencies, and use uv run to invoke commands. Prior critical issues (invalid flags, missing uv setup, bare uv install/uv uninstall) are addressed. The workflow is well-structured for reproducible builds.

Also applies to: 126-133, 182-194, 209-216

Copy link
Copy Markdown
Contributor

@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: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 13298d1 and d910fba.

📒 Files selected for processing (4)
  • .github/workflows/ci-cd.yml (5 hunks)
  • .github/workflows/update-snapshots.yml (1 hunks)
  • Makefile (1 hunks)
  • make.cmd (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2608
File: holidays/countries/saint_vincent_and_the_grenadines.py:30-30
Timestamp: 2025-06-07T07:37:55.516Z
Learning: For the vacanza/holidays repository, defer to the ruff configuration and pre-commit checks for coding standards rather than making manual suggestions about line length or style issues. If the automated checks pass, the code follows the project's standards.
🪛 checkmake (0.2.2)
Makefile

[warning] 47-47: Target body for "setup" exceeds allowed length of 5 (6).

(maxbodylength)

⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Test Python 3.13 on windows-latest
  • GitHub Check: Test Python 3.12 on windows-latest
  • GitHub Check: Test Python 3.14 on windows-latest
  • GitHub Check: Test Python 3.11 on windows-latest
🔇 Additional comments (12)
.github/workflows/update-snapshots.yml (1)

27-36: Clean uv migration for snapshot workflow.

The workflow correctly sets up uv, creates a fresh venv, syncs build dependencies, and runs the snapshot generation through uv. The --link-mode=copy flag ensures dependencies are copied rather than symlinked, which is appropriate for CI environments.

.github/workflows/ci-cd.yml (4)

98-105: Test job properly migrated to uv.

The test matrix correctly installs uv, syncs test dependencies, and runs tests through uv. The removal of pip caching is appropriate since uv manages its own cache.


126-147: Build and SBOM generation correctly use uv.

The build job now properly installs uv before using it, syncs build dependencies, and executes both package building and SBOM generation through uv. Good to see the critical issue from the previous review was addressed.


182-194: Test-build job comprehensively validates distributions.

This job creates a fresh venv, installs test dependencies, then validates both wheel and source distribution by installing and running tests for each. The use of uv pip install and uv pip uninstall is correct syntax for pip-compatible operations within uv.


209-216: Docs build cleanly migrated to uv.

The test-docs job correctly syncs documentation dependencies and builds docs through uv. The simpler setup without check-latest is appropriate for documentation building as discussed in previous review.

Makefile (5)

25-35: Documentation, localization, and packaging targets properly migrated.

All three targets correctly use uv for execution:

  • doc runs mkdocs through uv
  • l10n generates .po and .mo files via uv
  • package uses uv build instead of python -m build

The migration maintains the original workflow logic while leveraging uv's environment management.


37-41: Pre-commit and release-notes targets use correct uv syntax.

Both targets properly invoke their commands through uv run, ensuring they execute within the project's managed environment. Good to see the @ prefix issue from the previous review was resolved.


43-45: SBOM generation correctly uses uv tool infrastructure.

The target syncs build dependencies then uses uv tool run to execute cyclonedx-py without permanently installing it. The $(uv python find) command locates the managed Python interpreter. This is the recommended approach for running one-off tools with uv.


47-53: Setup target comprehensively configures development environment.

The setup flow is well-structured:

  1. Creates a clean venv
  2. Syncs all dependency extras needed for development
  3. Installs pre-commit hooks
  4. Generates localization and package artifacts

The static analysis warning about body length is pedantic—six lines for a comprehensive setup target is reasonable and maintains clarity.


55-64: Snapshot, test, and tox targets correctly migrated.

All three targets properly invoke their commands through uv run:

  • snapshot generates localization files then creates test snapshots
  • test runs pytest with coverage and parallel execution
  • tox executes tox in parallel mode

The migration preserves all original flags and options while routing execution through uv's managed environment.

make.cmd (2)

28-53: Windows commands properly use backslash path separators.

The Doc, L10n, and Package targets correctly adapt the Unix commands for Windows:

  • Script paths use backslash (scripts\l10n\...) instead of forward slash
  • uv run python explicitly invokes the Python interpreter on Windows
  • uv build and uv run mkdocs work identically across platforms

The migration maintains parity with the Unix Makefile while respecting Windows conventions.


68-89: Setup, Snapshot, Test, and Tox targets correctly adapted for Windows.

These targets properly use:

  • Windows path separators (backslash) for all script paths
  • uv run python for explicit Python invocation on Windows
  • Platform-independent uv commands (uv venv, uv sync, uv run)

The implementation maintains functional parity with the Unix Makefile while respecting Windows batch file syntax.

@KJhellico
Copy link
Copy Markdown
Collaborator

as I cannot test GitHub action ones locally

I tested it in my repo when I tried this task.

PPsyrius and others added 2 commits December 5, 2025 09:33
Co-authored-by: ~Jhellico <[email protected]>
Signed-off-by: Panpakorn Siripanich <[email protected]>
@PPsyrius PPsyrius marked this pull request as ready for review December 5, 2025 03:46
arkid15r
arkid15r previously approved these changes Dec 6, 2025
Copy link
Copy Markdown
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

LGTM, great work 👍

I discussed the setup approach w/ @KJhellico in Slack. We agreed to merge it as is and revisit the CI/CD Python setup later

@KJhellico
Copy link
Copy Markdown
Collaborator

For documentation build we need to update also .readthedocs.yaml with something like

Index: .readthedocs.yaml
<+>UTF-8
===================================================================
diff --git a/.readthedocs.yaml b/.readthedocs.yaml
--- a/.readthedocs.yaml	(revision f148513cc6a835d3450164117a73206ceca95f1b)
+++ b/.readthedocs.yaml	(date 1765045969961)
@@ -7,6 +7,15 @@
   tools:
     # https://docs.readthedocs.com/platform/stable/config-file/v2.html#build-tools-python
     python: '3.14'
+  jobs:
+    pre_create_environment:
+       - asdf plugin add uv
+       - asdf install uv latest
+       - asdf global uv latest
+    create_environment:
+       - uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
+    install:
+       - UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --extra docs
 
 mkdocs:
   configuration: mkdocs.yml

(based on this)

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Dec 6, 2025

Copy link
Copy Markdown
Contributor

@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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.readthedocs.yaml (1)

24-25: Remove stale pip-based install configuration.

The old python.install section still references requirements/docs.txt, which conflicts with the new uv-based approach. Per the PR objectives, requirements/* files should be removed. This section needs to be deleted since the new jobs.install block (line 18) now handles dependency installation via uv sync.

Apply this diff to remove the stale configuration:

 mkdocs:
   configuration: mkdocs.yml

-python:
-  install:
-    - requirements: requirements/docs.txt
-
 version: 2
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f44499d and cf6acdc.

📒 Files selected for processing (1)
  • .readthedocs.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2608
File: holidays/countries/saint_vincent_and_the_grenadines.py:30-30
Timestamp: 2025-06-07T07:37:55.516Z
Learning: For the vacanza/holidays repository, defer to the ruff configuration and pre-commit checks for coding standards rather than making manual suggestions about line length or style issues. If the automated checks pass, the code follows the project's standards.

@arkid15r arkid15r added this pull request to the merge queue Dec 6, 2025
Merged via the queue into vacanza:dev with commit 75e353d Dec 6, 2025
33 checks passed
@PPsyrius PPsyrius deleted the uv branch December 9, 2025 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate to poetry or uv for dependency management

3 participants