bcgov / quickstart-openshift

QuickStart template targeted for OpenShift.
https://quickstart-openshift-test-frontend.apps.silver.devops.gov.bc.ca/
Apache License 2.0
29 stars 3 forks source link

upgrade python backend from poetry to uv #2049

Open mishraomp opened 3 weeks ago

mishraomp commented 3 weeks ago

https://github.com/astral-sh/uv

mishraomp commented 3 weeks ago

@franTarkenton @conbrad @DerekRoberts this looks promising, let me know if you guys think otherwise.

DerekRoberts commented 3 weeks ago

@mishraomp Let's dig in. :)

conbrad commented 3 weeks ago

Looks interesting, we use their lint/formatter tool, ruff: https://github.com/astral-sh/ruff

conbrad commented 3 weeks ago

Might be difficult for us to use since we work on macOS, and their lockfiles are platform specific: https://github.com/astral-sh/uv?tab=readme-ov-file#limitations

conbrad commented 3 weeks ago

Looks like you can generate different platform lockfiles with a flag though so it may not be too tricky: https://github.com/astral-sh/uv?tab=readme-ov-file#platform-independent-resolution

mishraomp commented 3 weeks ago

thanks @conbrad , may be we should move from poetry and prospector in the qsos to uv and ruff

cc @DerekRoberts @franTarkenton

DerekRoberts commented 3 weeks ago

Thanks @conbrad. Unfortunately the non-agnostic lockfiles sound like a deal breaker. Rather than using their workarounds, how about waiting until this is solved?

conbrad commented 3 weeks ago

Thanks @conbrad. Unfortunately the non-agnostic lockfiles sound like a deal breaker. Rather than using their workarounds, how about waiting until this is solved?

I think it should be fine, would just need to test it, from their readme:

For example, if you're running uv on macOS, but want to resolve for Linux, you can run uv pip compile --python-platform=linux requirements.in to produce a manylinux2014-compatible resolution.

conbrad commented 3 weeks ago

It might even be more transparent than pip, poetry, etc, since their agnostic lockfiles are hiding the real binaries they're pulling down for each platform anyways.