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

Add __main__.py #854

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

triveria
Copy link

Hi,

on creating a python program I noticed I couldn't execute it since it didn't have a __main__.py.
Furthermore, I also couldn't start the debugger on that package for the very same reason.

This PR adds the missing __main__.py to the template to make it possible to both execute and debug the generated package.

I've seen PR #481, where @znd4 already worked on a very similar PR which unfortunatelly was never merged.
Based on the coversation there, I've tried to pick up where he left.

Let me know if I'm missing anything here.

Sidenote: While adding this, I've noticed a couple things:

  • The unit tests seem to be broken.
  • When the user selects "command_line_interface" = "Argparse, the project still gets set up for Typer

- Enable running the package with `python -m MY_PACKAGE` by adding `__main__.py`.
- Enable debugging by providing a clear entry point for the application.
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.

1 participant