Skip to content

feat: add project template with uv package manager#1057

Merged
Pijukatel merged 4 commits into
apify:masterfrom
Mantisus:uv-project-template
Mar 6, 2025
Merged

feat: add project template with uv package manager#1057
Pijukatel merged 4 commits into
apify:masterfrom
Mantisus:uv-project-template

Conversation

@Mantisus

@Mantisus Mantisus commented Mar 6, 2025

Copy link
Copy Markdown
Collaborator

Description

  • Add project template with uv package manager

Issues

@Mantisus Mantisus requested a review from janbuchar March 6, 2025 12:33

@janbuchar janbuchar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@janbuchar janbuchar requested review from Pijukatel and vdusek March 6, 2025 13:04
@Mantisus Mantisus self-assigned this Mar 6, 2025
&& echo "Installing dependencies:" \
# Check if playwright is already installed
&& PLAYWRIGHT_INSTALLED=$(pip freeze | grep -q playwright && echo "true" || echo "false") \
&& if [ "$PLAYWRIGHT_INSTALLED" = "true" ]; then \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not sure I follow, so I will think aloud:

This is here because we might already have some version of playwright installed in the base image in location "/usr/local". When we do, we exclude it from uv sync -> which btw syncs to where the python installation lives (so no isolated environment, but isolation is the image - so who cares).

If there is specific playwright version requirement(probably just theoretical use case) - we will ignore it and take whatever version already exists in the base image.

Is my understanding correct?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That's right, playwright may already be installed in the standard FROM apify/actor-python-playwright image.

This is similar to the logic used in poetry, but keeping the features that uv provides

@Pijukatel Pijukatel merged commit 9ec06e5 into apify:master Mar 6, 2025
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 an uv option to package manager selection in project bootstrapping

3 participants