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

Remove #! from non-executable files #29

Closed
ekr-cfa opened this issue Mar 18, 2024 · 1 comment · Fixed by #32
Closed

Remove #! from non-executable files #29

ekr-cfa opened this issue Mar 18, 2024 · 1 comment · Fixed by #32

Comments

@ekr-cfa
Copy link

ekr-cfa commented Mar 18, 2024

I see that a number of the .py files start with #!/usr/bin/env/python, as in:

https://github.com/CDCgov/multisignal-epi-inference/blob/main/model/src/pyrenew/basic.py#L1

These are only needed when you will be executing the file directly, because their purpose is to tell the shell which interpreter to run. I.e., so you can do ./foo.py rather than python foo.py. However, if the python code is just a module that isn't intended to be run but just imported, then you don't need this.

In addition, this is actually the wrong line, because what's after the #! needs to be something executable, but this isn't usually a valid path, because /usr/bin/env is a program, not a directory. Rather, you want /usr/bin/env python, which runs the env command to run python.

@ghost
Copy link

ghost commented Mar 18, 2024

Thanks for flagging that, @ekr-cfa. @dylanhmorris, I can address this on #26.

ghost pushed a commit that referenced this issue Mar 19, 2024
@ghost ghost closed this as completed Mar 19, 2024
@dylanhmorris dylanhmorris reopened this Mar 20, 2024
@dylanhmorris dylanhmorris linked a pull request Mar 20, 2024 that will close this issue
dylanhmorris added a commit that referenced this issue Mar 21, 2024
---------

Co-authored-by: Dylan H. Morris <[email protected]>
@dylanhmorris dylanhmorris added this to the Fruitadens 🥭 milestone Mar 21, 2024
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 a pull request may close this issue.

2 participants