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

Allow CLI to be invoked with python -m prefect #16790

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

sky-code
Copy link
Contributor

Added main module to prefect package to be able to use prefect cli with python -m prefect ... approach.

Copy link

codspeed-hq bot commented Jan 21, 2025

CodSpeed Performance Report

Merging #16790 will not alter performance

Comparing sky-code:main (39a311b) with main (e047607)

Summary

✅ 2 untouched benchmarks

@desertaxle
Copy link
Member

Thanks for opening a PR, @sky-code! Could you provide a bit more information on why this change is needed?

@sky-code
Copy link
Contributor Author

Thanks for opening a PR, @sky-code! Could you provide a bit more information on why this change is needed?

It primarily enables better integration with certain tools. For instance, this approach allows you to easily use PyCharm’s run configurations to execute Prefect CLI commands, such as:
image

@jbw-vtl
Copy link
Contributor

jbw-vtl commented Jan 29, 2025

By chance opened essentially the same PR as ran into a similar use-case which would benefit from being able to use python -m prefect.

being able to integrate prefect into PyCharm ruin configuration also simplifies the setup required to debug the prefect cli / server

Copy link
Member

@desertaxle desertaxle 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 the Pr and explanation @sky-code, and thanks @jbw-vtl for separately raising a similar PR!

@desertaxle desertaxle changed the title add prefect __main__ module Allow CLI to be invoked with python -m prefect Jan 29, 2025
@desertaxle desertaxle merged commit 71fb263 into PrefectHQ:main Jan 29, 2025
49 checks passed
@desertaxle desertaxle added the enhancement An improvement of an existing feature label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants