Skip to content

Use uv instead of poetry#168

Merged
bodrovis merged 4 commits intomasterfrom
use_uv
Sep 23, 2025
Merged

Use uv instead of poetry#168
bodrovis merged 4 commits intomasterfrom
use_uv

Conversation

@bodrovis
Copy link
Collaborator

@bodrovis bodrovis commented Sep 23, 2025

Summary by CodeRabbit

  • Chores
    • Migrated developer tooling to uv and moved packaging to Hatch; CI updated to newer actions and uv-based workflow.
    • Enabled automated monthly dependency updates and added Python 3.13 runtime file.
    • Set minimum supported Python to 3.9 and updated requests dependency to >=2.32.5.
  • Documentation
    • Streamlined contributing instructions and linked to centralized guide.
    • Improved README installation formatting and updated docs build environment to Ubuntu 24.04.

@coderabbitai
Copy link

coderabbitai bot commented Sep 23, 2025

Warning

Rate limit exceeded

@bodrovis has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 12 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 969bddd and f167693.

📒 Files selected for processing (1)
  • pyproject.toml (2 hunks)

Walkthrough

Replaces Poetry with uv in local and CI workflows, migrates packaging to Hatch, adds Dependabot rules for uv and GitHub Actions, updates CI actions and steps, sets Python version to 3.13, updates Read the Docs OS to Ubuntu 24.04, and simplifies contributing docs/README formatting.

Changes

Cohort / File(s) Summary of Changes
Dev workflow: switch to uv
.github/CONTRIBUTING.md, .github/workflows/ci.yml, .github/dependabot.yml
Replaced Poetry commands with uv (install/sync/run) in contributor guide and CI; updated CI action versions (checkout v5, setup-python v6), added setup-uv, uv sync --group dev --frozen, uv pip install -e ., and uv run --group dev pytest; added Dependabot rules for uv and github-actions.
Packaging/build system migration
pyproject.toml
Removed Poetry config, added Hatch build system (hatchling) and wheel target, added requires-python = ">=3.9", reordered/updated dependencies (e.g., exceptiongroup, requests), introduced [dependency-groups] with dev, and adjusted pylint/pytest tooling sections.
Documentation and contributor pointers
docs/additional_info/contributing.rst, README.md, .github/CONTRIBUTING.md
Replaced detailed local contributing/testing steps in docs with link to repository CONTRIBUTING.md; updated README install line to a code block; updated CONTRIBUTING to use uv commands and added post-implementation steps.
Environment/platform settings
.python-version, .readthedocs.yml
Added .python-version specifying 3.13; updated .readthedocs.yml build OS from ubuntu-22.04 to ubuntu-24.04.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev
  participant GH as GitHub Actions Runner
  participant Repo as Repository
  participant Py as setup-python@v6
  participant UV as setup-uv@v6
  participant UVC as uv (sync/run)
  participant Cov as Coveralls

  Dev->>GH: Push or open PR
  GH->>Repo: actions/checkout@v5
  GH->>Py: setup-python@v6
  GH->>UV: install/setup uv
  GH->>UVC: uv sync --group dev --frozen
  GH->>UVC: uv pip install -e .
  GH->>UVC: uv run --group dev pytest --cov --cov-report=lcov
  alt Tests succeed
    GH->>Cov: Upload coverage (coverage.lcov)
  else Tests fail
    GH-->>Dev: Report failure
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks and finishing touches

✅ 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 "Use uv instead of poetry" succinctly and accurately reflects the primary change in the PR, which replaces Poetry-based commands and CI steps with uv across workflows, contributor docs, and tooling. It is concise, specific to the main migration, and directly related to the modified files (CONTRIBUTING.md, CI, dependabot, etc.), so a reviewer scanning history will understand the primary intent. The title does not overclaim and need not enumerate secondary changes.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

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.

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

Caution

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

⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)

9-11: Remove hardcoded CODECOV_TOKEN (secret leakage).

A token is committed in plain text. Use repository Secrets or remove if unused (you’re using Coveralls, not Codecov).

-env:
-  CODECOV_TOKEN: 690ea968-186e-40df-b491-478de6dc0746
+env:

If no other env vars are needed, remove the env: block entirely.

🧹 Nitpick comments (3)
README.md (1)

15-17: Add language to the fenced code block to satisfy linters and improve rendering.

Specify bash for the install snippet.

-```
-pip install python-lokalise-api
-```
+```bash
+pip install python-lokalise-api
+```
pyproject.toml (2)

32-41: Align stub package with requests version.

Bump types-requests to match requests 2.32.x for better typing accuracy.

-    "types-requests>=2.31.0.6",
+    "types-requests>=2.32.0.0",

57-59: Use numeric values (not strings) for pylint config.

Pylint expects integers; strings may parse but are non-idiomatic.

-min-public-methods = "0"
-min-similarity-lines = "5"
+min-public-methods = 0
+min-similarity-lines = 5
📜 Review details

Configuration used: Repository: lokalise/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 15ef1eb and 0e64489.

⛔ Files ignored due to path filters (2)
  • poetry.lock is excluded by !**/*.lock
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (8)
  • .github/CONTRIBUTING.md (1 hunks)
  • .github/dependabot.yml (1 hunks)
  • .github/workflows/ci.yml (1 hunks)
  • .python-version (1 hunks)
  • .readthedocs.yml (1 hunks)
  • README.md (1 hunks)
  • docs/additional_info/contributing.rst (1 hunks)
  • pyproject.toml (2 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
README.md

15-15: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (6)
.python-version (1)

1-2: LGTM.

Version pin for local tooling is consistent with CI matrix (includes 3.13). No action needed.

.readthedocs.yml (1)

9-9: OS bump looks good.

Ubuntu 24.04 is supported on RTD; no further changes required.

.github/CONTRIBUTING.md (1)

3-9: LGTM.

Clear, uv-based workflow instructions with linting and type checks. Matches CI.

.github/workflows/ci.yml (1)

27-27: Keep --frozen — uv.lock is present

uv.lock found at repo root; leave uv sync --group dev --frozen as-is.

.github/dependabot.yml (2)

11-12: No change required — cooldown is supported in Dependabot config. GitHub allows cooldown inside each updates entry (fields: default-days, semver-major-days, semver-minor-days, semver-patch-days, include, exclude), so keep the cooldown blocks in .github/dependabot.yml as-is.


3-14: Dependabot supports "uv" — keep package-ecosystem: "uv" if the repo uses uv; use pip only for pip/PEP-621 projects.

GitHub added explicit uv support on 2025-03-13; the current entry in .github/dependabot.yml is valid for uv-managed projects. Switch to "pip" only when the project uses pip/PEP‑621 manifests.

Likely an incorrect or invalid review comment.

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 (3)
pyproject.toml (3)

9-9: Align declared Python support with CI/test matrix

You declare support for Python >=3.9 while CI reportedly defaults to 3.13. Either:

  • test 3.9–3.13 in CI, or
  • raise the floor (and drop the exceptiongroup backport).

Optionally add explicit version trove classifiers for clarity.


30-42: uv dependency groups: ensure consumers/install paths are updated

  • Using [dependency-groups] is correct for uv. Ensure CI/docs use uv pip install --group dev (or uv sync --group dev) everywhere.
  • If non‑uv consumers exist, consider mirroring dev tools under [project.optional-dependencies].dev for pip install .[dev].

I can propose an optional extras stanza if desired.


48-49: Verify package discovery

Explicit packages = ["lokalise"] is fine if this is the only top‑level package. If you add subpackages or a different layout later, consider hatch’s automatic discovery to avoid drift.

📜 Review details

Configuration used: Repository: lokalise/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 0e64489 and 969bddd.

📒 Files selected for processing (2)
  • docs/additional_info/contributing.rst (1 hunks)
  • pyproject.toml (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • docs/additional_info/contributing.rst
🔇 Additional comments (5)
pyproject.toml (5)

20-21: Deps look good; confirm compatibility

  • requests>=2.32.5,<3 is a safe bump.
  • exceptiongroup is fine for <3.11 but only needed if you use ExceptionGroup/except*.

Please confirm existing VCR cassettes and any request mocking remain compatible with the requests bump.


25-29: URLs consolidation LGTM

Public links are accurate and consistent.


45-46: Hatch build backend LGTM

Build backend switch is correct and consistent with the PR goal.


57-58: Pylint option section validity

Please verify that min-public-methods and min-similarity-lines are picked up under tool.pylint.MASTER with your current Pylint version. Historically these options belong to other sections; misplacement may cause them to be ignored (and CI to fail with --pylint).


60-61: Pylint section name and plugin compatibility

  • Confirm tool.pylint."MESSAGES CONTROL" is recognized (TOML quoting is correct for spaces).
  • Check pytest-pylint>=0.21.0 is compatible with pylint>=3.3.8 and Python 3.13 to avoid plugin breakage.

If issues arise, we can pin compatible versions or adjust sections.

@bodrovis bodrovis merged commit f0f6f08 into master Sep 23, 2025
1 of 6 checks passed
@bodrovis bodrovis deleted the use_uv branch September 23, 2025 16:31
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.

1 participant