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

feat: Implement UV lock translator #106

Merged
merged 3 commits into from
Jul 9, 2024
Merged

Conversation

ewianda
Copy link
Contributor

@ewianda ewianda commented Jun 26, 2024

Close #103

@ewianda
Copy link
Contributor Author

ewianda commented Jun 26, 2024

@jvolkman Seems the format of uv.lock is pretty close to pdm.lock and can share most of the code. Not sure if you have thoughts already on how this could be implemented

@ewianda ewianda changed the title UV lock POC feat: Implement UV lock translator Jul 1, 2024
@ewianda ewianda marked this pull request as ready for review July 1, 2024 22:59
@jvolkman
Copy link
Owner

jvolkman commented Jul 3, 2024

Thanks for the PR. Looks like it was a decent amount of work!

I think I would prefer the uv translator to just be a copy+paste of the pdm code, modified as needed, rather than trying to abstract a common implementation. Unless there is some guarantee that uv is tracking pdm model changes going forward, copying and pasting the implementation better aligns with the fact that they are separate formats and may diverge. It would also make reviewing easier, as most changes will just be additive.

@ewianda
Copy link
Contributor Author

ewianda commented Jul 3, 2024

Fair enough. Does this apply only to the uv_translator.py, or should I copy-paste the .bzl functions /files as well

@jvolkman
Copy link
Owner

jvolkman commented Jul 3, 2024

Fair enough. Does this apply only to the uv_translator.py, or should I copy-paste the .bzl functions /files as well

I would just do it all.

@ewianda ewianda force-pushed the uv-poc branch 2 times, most recently from 706ab73 to dc2dbbd Compare July 3, 2024 20:08
Copy link
Owner

@jvolkman jvolkman left a comment

Choose a reason for hiding this comment

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

Thanks; this looks fine. I've left a couple of minor comments.

pycross/private/lock_attrs.bzl Outdated Show resolved Hide resolved
pycross/private/tools/uv_translator.py Outdated Show resolved Hide resolved
pycross/private/tools/uv_translator.py Outdated Show resolved Hide resolved
pycross/private/tools/uv_translator.py Outdated Show resolved Hide resolved
@ewianda ewianda force-pushed the uv-poc branch 2 times, most recently from 07250fc to 8b20d33 Compare July 8, 2024 21:43
@jvolkman
Copy link
Owner

jvolkman commented Jul 9, 2024

Thanks!

@jvolkman jvolkman merged commit b0b8c8f into jvolkman:main Jul 9, 2024
22 checks passed
@ewianda ewianda deleted the uv-poc branch July 9, 2024 05:02
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.

Add support for uv.lock file
2 participants