Adjust project files after migration to uv#3116
Conversation
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughMigrates CI, local tooling, and packaging from actions/setup-python and tox to a uv-centric workflow; updates GitHub Actions, Makefile/make.cmd, Make targets, pyproject dependency groups, removes tox.ini, adjusts pre-commit config, and tightens a python-dateutil constraint. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (6)📓 Common learnings📚 Learning: 2025-04-01T14:14:01.519ZApplied to files:
📚 Learning: 2025-06-10T05:07:29.372ZApplied to files:
📚 Learning: 2025-06-16T15:48:33.931ZApplied to files:
📚 Learning: 2025-06-10T05:08:07.939ZApplied to files:
📚 Learning: 2025-06-26T15:34:35.476ZApplied to files:
🪛 checkmake (0.2.2)Makefile[warning] 45-45: 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). (1)
🔇 Additional comments (18)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #3116 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 306 306
Lines 18083 18083
Branches 2292 2292
=========================================
Hits 18083 18083 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (8)
.github/workflows/ci-cd.yml(7 hunks).github/workflows/pre-commit-autoupdate.yml(1 hunks).github/workflows/update-snapshots.yml(1 hunks).pre-commit-config.yaml(0 hunks).readthedocs.yaml(1 hunks)Makefile(1 hunks)pyproject.toml(1 hunks)tox.ini(0 hunks)
💤 Files with no reviewable changes (2)
- .pre-commit-config.yaml
- tox.ini
🧰 Additional context used
🧠 Learnings (15)
📓 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.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2632
File: holidays/countries/solomon_islands.py:28-54
Timestamp: 2025-06-15T15:10:20.360Z
Learning: The vacanza/holidays project uses ruff with line-length = 99 characters (configured in pyproject.toml), not the standard 80 or 100 character limits. When pre-commit checks pass, the formatting is compliant with the project's specific ruff configuration.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2631
File: tests/countries/test_sint_maarten.py:62-0
Timestamp: 2025-06-14T21:12:07.224Z
Learning: KJhellico prefers to focus on completing and reviewing the main holiday implementation code before doing detailed reviews of the corresponding test files.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2702
File: holidays/countries/__init__.py:65-69
Timestamp: 2025-07-05T20:26:31.219Z
Learning: The vacanza/holidays project uses ruff as the primary linter for code checking and linting. Flake8 suppression comments are not needed since the project defers to ruff's rules, and existing `ruff: noqa` comments should be sufficient for handling linting warnings.
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.
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.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2608
File: holidays/locale/en_US/LC_MESSAGES/VC.po:76-76
Timestamp: 2025-06-10T05:08:07.939Z
Learning: For the holidays project, localization file formatting issues (like missing terminal periods in .po files) should be automatically fixed by running `make l10n` command (which is included in `make check`). Authors should be directed to use this automated tooling instead of manual formatting fixes.
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2637
File: holidays/countries/singapore.py:49-50
Timestamp: 2025-06-16T11:17:34.671Z
Learning: For the vacanza/holidays project, defer to ruff's line length rules rather than pylint's C0301 warnings. If ruff passes in pre-commit tests, line length is acceptable regardless of pylint warnings about exceeding 100 characters.
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2653
File: holidays/locale/th/LC_MESSAGES/TW.po:17-21
Timestamp: 2025-06-21T18:06:50.027Z
Learning: KJhellico's username includes a tilde character (~) as part of their nickname (appears as "~Jhellico" in Last-Translator headers), which is intentional formatting and not an error.
📚 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:
Makefile
📚 Learning: 2025-06-10T05:07:29.372Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2608
File: holidays/locale/en_VC/LC_MESSAGES/VC.po:61-66
Timestamp: 2025-06-10T05:07:29.372Z
Learning: For missing translator comments in .po localization files in the holidays repository, direct authors to run `make l10n` or `make check` commands instead of suggesting manual fixes, as these commands automatically handle translator comment generation.
Applied to files:
Makefile
📚 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:
Makefile
📚 Learning: 2025-06-10T05:08:07.939Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2608
File: holidays/locale/en_US/LC_MESSAGES/VC.po:76-76
Timestamp: 2025-06-10T05:08:07.939Z
Learning: For the holidays project, localization file formatting issues (like missing terminal periods in .po files) should be automatically fixed by running `make l10n` command (which is included in `make check`). Authors should be directed to use this automated tooling instead of manual formatting fixes.
Applied to files:
Makefile
📚 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-19T05:54:49.792Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2642
File: holidays/countries/french_polynesia.py:1-12
Timestamp: 2025-06-19T05:54:49.792Z
Learning: The holidays library uses a standard file header format across all country implementation files consisting of a comprehensive comment block with project description, authors, website, and license information. Country files do not use module-level docstrings but instead rely on this header format followed by class-level docstrings.
Applied to files:
pyproject.toml
📚 Learning: 2025-06-21T16:30:12.749Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2654
File: holidays/countries/cape_verde.py:1-12
Timestamp: 2025-06-21T16:30:12.749Z
Learning: The holidays project does not use module docstrings in country holiday files. All country files start directly with the copyright header comment block without module docstrings, maintaining a consistent coding style across the project.
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:
pyproject.toml
📚 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:
pyproject.toml
📚 Learning: 2025-08-11T13:48:45.953Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2794
File: holidays/calendars/ethiopian.py:13-13
Timestamp: 2025-08-11T13:48:45.953Z
Learning: The holidays library does not use `__all__` declarations in calendar modules (holidays/calendars/). Calendar files follow a standard pattern of defining constants and functions directly without explicit exports, similar to the convention used in country modules.
Applied to files:
pyproject.toml
📚 Learning: 2025-06-01T17:58:53.279Z
Learnt from: KJhellico
Repo: vacanza/holidays PR: 2583
File: holidays/countries/niger.py:1-1
Timestamp: 2025-06-01T17:58:53.279Z
Learning: In the holidays project, module-level docstrings are not required or needed for country holiday files in the holidays/countries/ directory.
Applied to files:
pyproject.toml
📚 Learning: 2025-03-04T11:32:45.095Z
Learnt from: PPsyrius
Repo: vacanza/holidays PR: 2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (`government`, `mandatory`, and `public`), which are utilized by syntactic sugar methods.
Applied to files:
pyproject.toml
🪛 checkmake (0.2.2)
Makefile
[warning] 45-45: 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). (3)
- GitHub Check: Test Python 3.14 on windows-latest
- GitHub Check: Test Python 3.10 on windows-latest
- GitHub Check: Test Python 3.13 on windows-latest
🔇 Additional comments (15)
.readthedocs.yaml (1)
18-18: Looks good—aligned with dependency-groups migration.The updated flags correctly reference the new
docsgroup from pyproject.toml and use the proper uv syntax.Makefile (1)
25-25: Consistent application of--no-syncflag across targets.All script invocations properly use
uv run --no-syncto avoid unnecessary dependency re-syncing, which is efficient and correct.Also applies to: 29-30, 33-33, 37-37, 40-40, 48-49, 54-55, 58-59
pyproject.toml (2)
49-79: Dependency-groups migration looks comprehensive and well-structured.The transition from optional-dependencies to PEP 735 dependency-groups is clean. Version constraints are appropriately bounded, and the numpy matrix for Python versions (lines 73–74) correctly accounts for compatibility.
45-47: Project metadata enhancement approved.The added URLs (Changelog, Documentation, Repository) are accurate and improve discoverability.
.github/workflows/update-snapshots.yml (2)
27-28: Verify thatUV_PYTHONenvironment variable is properly set.Line 28 uses
uv python install "$UV_PYTHON", but this variable is not explicitly defined in the workflow. In contrast, the test job in ci-cd.yml (line 101) usesuv python install ${{ matrix.python-version }}. Please confirm the setup-uv action exportsUV_PYTHON, or use an explicit version reference instead.
31-34: Dependency sync and make invocation look good.The
--group buildcorrectly references the new dependency group, and invokingmake snapshotdirectly (rather than nesteduv run) is cleaner..github/workflows/pre-commit-autoupdate.yml (2)
29-30: Same UV_PYTHON environment variable concern as in update-snapshots.yml.Please verify that
UV_PYTHONis properly exported by the astral-sh/setup-uv action. Consider using an explicit version reference (e.g.,${{ env.UV_PYTHON }}if set by the action, or3.14directly) for clarity.
34-35: Tool invocation pattern is solid.Using
uv tool run --with pre-commit-uvis the right approach for managing pre-commit via uv without persisting it in the project dependencies..github/workflows/ci-cd.yml (7)
40-50: Pre-commit job setup looks solid.The installation pattern is clean, and using
uv tool run --with pre-commit-uvis the right approach for ephemeral tool usage.
100-107: Test job pattern is correct—use this as the model for other jobs.The test job properly uses
${{ matrix.python-version }}from the matrix context, making it explicit and maintainable. This pattern should be applied to other jobs as well.
128-129: Replace undefinedUV_PYTHONwith explicit version reference.The build job sets
python-version: '3.14'in setup-uv (line 125) but then uses the undefined$UV_PYTHONvariable. Use either an explicit version string or confirm the action exports this variable. For consistency with the test job pattern, use a direct version reference.- name: Install Python run: uv python install "3.14"
178-180: Same UV_PYTHON issue in test-build job.Line 180 uses
$UV_PYTHON, which is undefined. Use an explicit version reference matching the setup-uv configuration (line 175).
213-214: Same UV_PYTHON issue in test-docs job.Line 214 uses
$UV_PYTHON, which is undefined. Use an explicit version reference matching the setup-uv configuration (line 210).
191-197: Distribution testing strategy is solid.The test-build job wisely verifies both wheel (.whl) and source distribution (.tar.gz) installations, catching packaging issues that wheel-only testing might miss.
148-149: SBOM generation strategy is appropriate.The version-stamped filename (line 149) and conditional execution on tagged releases (line 148) properly integrate SBOM artifacts into the release pipeline.
# Conflicts: # Makefile
|
PPsyrius
left a comment
There was a problem hiding this comment.
LGTM 🛠️
Nice uv cleanup, I will see if we can eliminate the usage of cyclonedx in favor of uv export as well in another PR



Proposed change
Adjust project files after migration to
uv:uvcommands params (uv run,uv sync) in CI workflowstoxand standaloneruffType of change
holidaysfunctionality in general)Checklist
make checklocally; all checks and tests passed.