Skip to content

Add UV support for faster development workflows #70

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

Merged
merged 5 commits into from
May 18, 2025

Conversation

EstebanGZam
Copy link
Contributor

This PR implements UV as the primary package manager for the project, addressing issue #64. UV delivers significant improvements in dependency resolution speed (10-100x faster than pip) and simplifies local development setup.

Key Changes:

  1. Project Modernization

    • Migrated from setup.py to pyproject.toml with all metadata preserved
    • Generated uv.lock for reproducible environments
    • Added clear documentation in README.md for UV usage
  2. New Workflow Features

    # 1. Setup environment
    uv venv venv
    source venv/bin/activate
    
    # 2. Install with all dependencies
    uv pip install -e .
    uv pip install -e ".[dev,test]"
    
    # 3. Run tests
    uv pip install coverage
    uv run --active coverage run -m unittest discover -s tests -p 'test_*.py'
    uv run --active coverage report -m

Benefits:

  • Faster onboarding: New contributors can setup environments in seconds
  • 📦 Consistent installations: Precise dependency resolution avoids "works on my machine" issues
  • 🧪 Efficient testing: uv run executes tests with minimal overhead

Verification:

  • Confirmed all unit tests pass with the new UV workflow
  • Verified coverage reporting works as expected

Resolves #64

@VigneshVSV VigneshVSV self-requested a review April 15, 2025 06:42
@VigneshVSV
Copy link
Collaborator

Hi, I will get to this in a day or two max.

@VigneshVSV
Copy link
Collaborator

I would add this:

Benefits:
⚡ Faster onboarding: New contributors can setup environments in seconds
📦 Consistent installations: Precise dependency resolution avoids "works on my machine" issues
🧪 Efficient testing: uv run executes tests with minimal overhead

to changelog.md. Nice emojis.

Also can you bump the version to 0.2.11? I will do a test deployment to testpypi.org

The files to change are the pyproject.toml and the __init__.py within hololinked folder.

@VigneshVSV VigneshVSV self-assigned this Apr 15, 2025
@VigneshVSV VigneshVSV moved this to In review in hololinked Apr 15, 2025
@EstebanGZam
Copy link
Contributor Author

I understand. I'll start working on these revisions in the next few days.

Regarding the section on support for simulation examples mentioned in the issue:

"if examples are supported, that is even better (at least for the simulations)"

I acknowledge that I haven't been able to implement this part as I would need more clarity on the specific requirements. To ensure proper implementation, I propose:

  1. Open a new issue dedicated exclusively to this feature.
  2. Define the implementation details there (optional dependencies, expected structure, etc.).
  3. Work on it as the next priority.

This way, we can manage example dependencies in a more organized manner and with clear expectations.

What do you think of this approach? I'm open to adjusting it based on what you consider most appropriate.

@VigneshVSV
Copy link
Collaborator

VigneshVSV commented Apr 16, 2025

  1. Open a new issue dedicated exclusively to this feature.
  2. Define the implementation details there (optional dependencies, expected structure, etc.).
  3. Work on it as the next priority.

This way, we can manage example dependencies in a more organized manner and with clear expectations.

Agree! Lets just keep this for another issue. I also worked on something in uv last week at my workplace and things were not so easy. I will open a new issue coming weekend.

@VigneshVSV
Copy link
Collaborator

VigneshVSV commented Apr 18, 2025

Hi @EstebanGZam,

I have completed my comments, sorry the delays. There is nothing more to add from my side.

Thanks again for this merge request.

@VigneshVSV
Copy link
Collaborator

VigneshVSV commented Apr 19, 2025

I merged this pull request: #73

You need to

git checkout main
git pull
git checkout <this branch>
git rebase main

If conflicts occur while rebasing, choose which changes to keep, then

git add <file names that were resolved>
git rebase --continue

finally, when rebase finishes, which you will see in git status:

git push -f

If you need more help, just let me know. There are only two commits, so it should be fairly straightforward.

@VigneshVSV
Copy link
Collaborator

Hi @EstebanGZam ,

Would you be still interested to continue this or should I take it further? I can merge it another branch.

@VigneshVSV VigneshVSV changed the base branch from main to main-next-release May 11, 2025 18:27
@VigneshVSV VigneshVSV changed the base branch from main-next-release to issue-64-uv May 18, 2025 12:02
@VigneshVSV VigneshVSV merged commit 5f51c75 into hololinked-dev:issue-64-uv May 18, 2025
2 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in hololinked May 18, 2025
@VigneshVSV
Copy link
Collaborator

VigneshVSV commented May 18, 2025

Merged to main using #83 where the comments were resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

setup uv python package and environment management
2 participants