Skip to content
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

Migrate to uv #494

Merged
merged 2 commits into from
Jan 7, 2025
Merged

Migrate to uv #494

merged 2 commits into from
Jan 7, 2025

Conversation

Wuestengecko
Copy link
Member

Use uv for management of development dependencies and building in CI.

This also migrates the "docs" and "test" extras to dependency groups, as they were only used to facilitate the dev setup, and did not actually add any functionality.

Copy link
Member

@ewuerger ewuerger left a comment

Choose a reason for hiding this comment

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

I am very surprised how fast the environment setup with uv is. The installation of 77 packages in 49ms is insanely fast. The docs are almost build instantly.

Can you explain why you modified the library structure by moving capellambse into a src folder? Is this necessary for uv to work? Or is this just best practice in order to exclude docs and tests from the build package?

I think you need to also check:

  • CODEOWNERS (the paths aren't valid anymore)
  • ./capellambse/repl.py test-5.0

    This doesn't work anymore, first the path needs to include ./src but also with uv run the tests aren't included anymore, so the test model can't be found.

The rest looks fine and as soon as this is merged I'll start to migrate to uv in other projects.

This helps maintain a clear distinction between what goes into the wheel
and what doesn't.
Use uv for management of development dependencies and building in CI.

This also migrates the "docs" and "test" extras to dependency groups, as
they were only used to facilitate the dev setup, and did not actually
add any functionality.
@Wuestengecko
Copy link
Member Author

Can you explain why you modified the library structure by moving capellambse into a src folder?

It's not strictly required for uv (in fact, uv doesn't care either way, it's up to the build backend to deal with this), but IMO this is a good opportunity for it. The two main reasons are:

  1. It helps setuptools figure out what should actually go into the wheel and what not. We had problems with that in the past, where it unintentionally included megabytes worth of test models and docs stuff, and this is a good opportunity to fix that once and for all.

  2. uv init --lib does it this way :)

I think you need to also check:

  • CODEOWNERS (the paths aren't valid anymore)

  • ./capellambse/repl.py test-5.0

    This doesn't work anymore, first the path needs to include ./src but also with uv run the tests aren't included anymore, so the test model can't be found.

Good catch! Fixed.

@ewuerger ewuerger self-requested a review January 6, 2025 13:24
Copy link
Member

@ewuerger ewuerger left a comment

Choose a reason for hiding this comment

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

LGTM.

@Wuestengecko Wuestengecko merged commit 13dbe0f into master Jan 7, 2025
10 checks passed
@Wuestengecko Wuestengecko deleted the uv branch January 7, 2025 09:20
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