Skip to content

Convert to uv #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: transformer_gen
Choose a base branch
from
Open

Convert to uv #9

wants to merge 3 commits into from

Conversation

jeremy-wayland
Copy link
Collaborator

✅ Completed Tasks

  1. Created new branch: convert-to-uv from the 8-docs branch
  2. Converted pyproject.toml:
    • Changed from Poetry format to standard PEP 621 format
    • Updated build backend from Poetry to Hatchling
    • Added proper package configuration for presto and lsd modules
    • Converted dependency specifications to PEP 621 format
  3. Resolved dependency conflicts:
    • Added explicit numba>=0.59.0 dependency to resolve version compatibility issues
    • Updated Python version to 3.11 for better compatibility
  4. Generated new lockfile: Created uv.lock and removed the old poetry.lock
  5. Successfully installed all dependencies: Both main and dev dependencies are working
  6. Created migration guide: Added UV_MIGRATION.md with workflow instructions
  7. Committed all changes: Everything is ready for review/merge

✅ Key Benefits

• Faster dependency resolution: uv is significantly faster than Poetry
• Standard compliance: Using PEP 621 format makes the project more compatible with the broader Python ecosystem
• Better tooling integration: Works well with modern Python packaging tools
• Verified functionality: All packages import correctly and dev dependencies are available

🔄 Next Steps

You can now:
• Test the project thoroughly with uv run pytest
• Use uv sync instead of poetry install for future dependency management
• Review the UV_MIGRATION.md file for the complete command reference
• Merge the branch when you're satisfied with the conversion

Closes #7

- Convert pyproject.toml from Poetry to standard PEP 621 format
- Add hatchling build backend with proper package configuration
- Replace poetry.lock with uv.lock for dependency locking
- Update Python version to 3.11 for compatibility
- Add explicit numba dependency to resolve version conflicts
- Create UV_MIGRATION.md guide for new workflow
- Successfully tested package imports and dev dependencies
@jeremy-wayland jeremy-wayland changed the base branch from main to transformer_gen June 30, 2025 16:47
@jeremy-wayland jeremy-wayland requested a review from Copilot June 30, 2025 16:49
Copy link

@Copilot 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

This PR migrates the project from Poetry to Hatchling (uv), updates packaging configuration to PEP 621, refreshes lockfiles, and tweaks code/tests formatting and error handling.

  • Converted pyproject.toml from Poetry to PEP 621, updated build backend, and refreshed dependencies/lockfile.
  • Updated tests to consistent quoting style, added missing imports, and standardized trailing commas.
  • Enhanced transformer modules (tf.py, sbert.py) with improved error messages and exception handling; expanded YAML config and pinned Python version.

Reviewed Changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/lsd/generate/test_transformers.py Standardized string quoting, added trailing commas
tests/lsd/generate/conftest.py Imported torch for tensor fixtures
pyproject.toml Switched to PEP 621 format, moved to Hatchling, updated deps
lsd/generate/transformers/tf.py Reformatted quotes, improved multiline error messages
lsd/generate/transformers/models/sbert.py Swapped config key, wrapped model load in try/except
lsd/design/tf.yaml Expanded transformer configuration options in YAML
.python-version Updated local Python version to 3.11

"numpy>=1.26.4",
"numba>=0.59.0",
"scikit-learn>=1.4.1",
"pytest>=8.0.2",
Copy link
Preview

Copilot AI Jun 30, 2025

Choose a reason for hiding this comment

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

pytest is listed under main dependencies but is only needed for development and testing; move it to the [project.optional-dependencies].dev section to avoid shipping it in production installs.

Suggested change
"pytest>=8.0.2",

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.

UV
1 participant