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

uv equivalent to running "python -m" #7738

Closed
tomaszbk opened this issue Sep 27, 2024 · 5 comments
Closed

uv equivalent to running "python -m" #7738

tomaszbk opened this issue Sep 27, 2024 · 5 comments
Labels
question Asking for clarification or support

Comments

@tomaszbk
Copy link

I want to migrate to uv, and my actual project is under an "app/" folder, and we use python -m app.main.py to run it.

How can I achieve the same command using uv?

@zanieb
Copy link
Member

zanieb commented Sep 27, 2024

Generally, you'd use uv run python -m app/main.py — does that work for you?

@zanieb
Copy link
Member

zanieb commented Sep 27, 2024

Related #6638

@zanieb zanieb added the question Asking for clarification or support label Sep 27, 2024
@tilschuenemann
Copy link

Adding onto this - how would I generate coverage when running pytest?
When using poetry I'd do poetry run coverage run -m pytest tests/ .

@zanieb
Copy link
Member

zanieb commented Sep 27, 2024

It'd be the same, but with uv run instead of poetry run.

@tomaszbk
Copy link
Author

Yes it works! sorry for not seeing the related github issue before

@zanieb zanieb closed this as completed Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

3 participants