Skip to content

Conversation

@dividedmind
Copy link
Contributor

This commit migrates the project's dependency management and build system from Poetry to uv and Hatchling.

This change significantly speeds up dependency installation and testing, providing a more efficient development workflow.

Key changes include:

  • pyproject.toml is now configured for Hatchling and uv.
  • GitHub Actions workflows have been updated to use astral-sh/setup-uv.
  • tox.ini is reconfigured to use tox-uv for test environments.
  • README.md has been updated with new setup and usage instructions.
  • Obsolete Poetry and pyenv files (tool-versions.example, etc.) have been removed.

This commit migrates the project's dependency management and build
system from Poetry to uv and Hatchling.

This change significantly speeds up dependency installation and testing,
providing a more efficient development workflow.

Key changes include:
- `pyproject.toml` is now configured for Hatchling and uv.
- GitHub Actions workflows have been updated to use `astral-sh/setup-uv`.
- `tox.ini` is reconfigured to use `tox-uv` for test environments.
- `README.md` has been updated with new setup and usage instructions.
- Obsolete Poetry and pyenv files (`tool-versions.example`, etc.) have
  been removed.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Migrates the project’s Python packaging and dependency workflow from Poetry to uv + Hatchling, updating local tooling and CI/release automation accordingly.

Changes:

  • Replaces Poetry configuration with PEP 621 [project] metadata and Hatchling build settings in pyproject.toml.
  • Updates tox and GitHub Actions to use uv (including tox-uv) instead of Poetry.
  • Removes legacy requirements/tool-version files and refreshes developer docs for uv-based workflows.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tox.ini Switches tox to tox>=4 + tox-uv, installs project as editable with extras=test, and removes Poetry commands.
tool-versions.example Removes obsolete Python version pinning example.
requirements-test.txt Removes legacy test requirements file (replaced by pyproject extras/tox).
requirements-dev.txt Removes legacy dev requirements file (replaced by pyproject extras/tox).
pyproject.toml Converts Poetry config to [project] + Hatchling build config; defines test/dev optional dependencies.
pylintrc Removes suggestion-mode setting.
ci/scripts/build_with_uv.sh Replaces Poetry build invocation with uv build.
README.md Updates setup/lint/test instructions to use uv.
.releaserc.yml Updates release build script to use the uv-based build script.
.gitignore Ignores uv.lock and *.sqlite3.
.github/workflows/release.yml Installs uv in release workflow (replacing prior Poetry-based setup step).
.github/actions/setup/action.yml Composite action now installs uv and tox tooling via uv tool install.
Comments suppressed due to low confidence (2)

ci/scripts/build_with_uv.sh:8

  • Using $* here will perform word-splitting and can corrupt arguments that contain spaces (and it also drops original argument boundaries). Prefer passing through arguments as "$@" so flags/values are forwarded safely.
    ci/scripts/build_with_uv.sh:17
  • Same argument-forwarding issue here: $* can break when any argument contains whitespace. Use "$@" to forward the original argument list safely.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +29 to 32
usedevelop = true
extras = test
passenv =
PYTEST_XDIST_AUTO_NUM_WORKERS
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

extras = test installs the appmap[test] extra into every env, but that extra currently pins framework versions (Django>=4,<5, Flask>=3, SQLAlchemy>=2). This will make envs like django3, django5, flask2, and sqlalchemy1 impossible to resolve because tox also adds conflicting framework constraints for those factors. Consider removing framework pins from the test extra (keep it to pytest tooling only) and let tox factor-specific deps control Django/Flask/SQLAlchemy versions, or avoid using extras=test for the factor envs that vary framework versions.

Copilot uses AI. Check for mistakes.
Comment on lines +59 to +61
"Django>=4.0,<5.0",
"Flask>=3.0",
"sqlalchemy>=2.0,<3.0",
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

Including Django/Flask/SQLAlchemy version pins in the test extra conflicts with tox’s matrix which explicitly tests multiple framework versions (e.g., flask2 requires Flask<3, django3 requires Django<4, django5 requires Django>=5, sqlalchemy1 requires SQLAlchemy<2). This will prevent uv/pip from resolving dependencies for those tox envs. Move framework constraints out of test (keep it to test tooling), and let tox factor-specific deps (or separate per-framework extras) supply the framework versions.

Suggested change
"Django>=4.0,<5.0",
"Flask>=3.0",
"sqlalchemy>=2.0,<3.0",

Copilot uses AI. Check for mistakes.
Comment on lines +73 to +76
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The release job no longer sets up a specific Python version (the previous composite ./.github/actions/setup did). Since the release flow runs uv build via semantic-release, consider adding an explicit actions/setup-python step (or otherwise pinning/ensuring the Python used for building) to avoid relying on whatever Python happens to be preinstalled on the runner.

Copilot uses AI. Check for mistakes.
with:
enable-cache: true

- name: Install tox and tox-uv
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

Step name is slightly misleading: this installs tox with both tox-uv and tox-gh-actions. Consider updating the step name to reflect the full set of tools being installed to reduce confusion when debugging CI.

Suggested change
- name: Install tox and tox-uv
- name: Install tox, tox-uv, and tox-gh-actions

Copilot uses AI. Check for mistakes.
uv sync --all-extras
```

### wrapt
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The wrapt section immediately following this heading still refers to dependency management via poetry (“not managed using poetry”), which is now outdated after the uv migration. Update that paragraph to reference uv/current tooling so the README doesn’t give conflicting guidance.

Copilot uses AI. Check for mistakes.
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.

2 participants