Skip to content

feat: Start using uv#351

Merged
ividito merged 2 commits intodevfrom
feat/use-uv
Apr 17, 2025
Merged

feat: Start using uv#351
ividito merged 2 commits intodevfrom
feat/use-uv

Conversation

@ividito
Copy link
Contributor

@ividito ividito commented Apr 15, 2025

Summary:

Reduces dev dependency installation time by 99% (47.8s on my machine to 400ms - at first, I didn't believe uv sync had actually done anything at all).

I tried to more-or-less follow conventions established by CSDA: https://github.com/NASA-IMPACT/csdap-stac-api/pull/250

Included some minor README updates to match.

Starts some of the dependency/constraint reorganization discussed in #307 - I would like to get this working in the Dockerfiles too, but this will be a lot easier after #348

@ividito ividito mentioned this pull request Apr 15, 2025
4 tasks
@ividito ividito marked this pull request as ready for review April 15, 2025 15:28
Copy link
Member

@botanical botanical left a comment

Choose a reason for hiding this comment

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

Yay for uv!! I just had one question.

@amarouane-ABDELHAK
Copy link
Contributor

I am a huge fan of uv and I am in favor of using it. But, SM2A is intended to run in a Docker container for local development to mirror the production environment (as closely as possible). Is the use case for uv here specifically to run unit tests?
After running uv sync, there’s no further guidance on what the user should do next with the virtual environment set up by uv.

@ividito
Copy link
Contributor Author

ividito commented Apr 16, 2025

@amarouane-ABDELHAK for now, yes, this only improves non-containerized local development and unit testing. I have a follow-up that incorporates uv into our Dockerfiles, which will have more impact on deployment speed and containerized development, but I think this will be easier to implement and merge after #352

Copy link
Member

@botanical botanical left a comment

Choose a reason for hiding this comment

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

Since we're using an updated version of moto, do you mind updating the unit tests that import it? ( I think the mock_s3 imports can now be from moto import mock_aws and all instances of mock_s3 can be updated to use mock_aws.

I also think we need to add smart_open to our pyproject.toml

@ividito ividito force-pushed the feat/use-uv branch 2 times, most recently from d7abd30 to be52042 Compare April 17, 2025 13:13
@ividito ividito requested a review from botanical April 17, 2025 13:24
Copy link
Member

@botanical botanical left a comment

Choose a reason for hiding this comment

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

🔥 thanks for this work

@ividito ividito merged commit cc0c560 into dev Apr 17, 2025
3 checks passed
@ividito ividito deleted the feat/use-uv branch April 17, 2025 22:01
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.

3 participants