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

Unclear on use patterns: PATH script or local file in repo? #25

Closed
jrmontag opened this issue Apr 5, 2018 · 1 comment
Closed

Unclear on use patterns: PATH script or local file in repo? #25

jrmontag opened this issue Apr 5, 2018 · 1 comment
Assignees

Comments

@jrmontag
Copy link
Collaborator

jrmontag commented Apr 5, 2018

If I understand correctly, when the library is pip-installed, the current setup.py file copies the executable search_tweets.py into the bin/ dir of the relevant python environment. In my experience, this is so the user can run e.g. (env)$ search_tweets.py from any location and the stand-alone script will still be on the $PATH. However the current search_tweets.py doesn't have the #! line so it leads to some unexpected errors - in both my case and this SO post, the resulting output comes from ImageMagik (of all places...).

In the README, the user is instructed to run the local, repo file as (env)$ python search_tweets.py from the tools/ directory. This requires the user to have the repo cloned locally.

I think it would be helpful to be more clear about which is the recommended way for the user to run the main search_tweets.py script (not when imported as a library).

My preference would be to enable the file to run by keeping it in the setup.py script and adding the appropriate shebang. Then, we could remove the language about using the repo version, thus removing the expectation that the user has downloaded or cloned the repo. But I'm happy to hear more about the relative trade-offs of the approaches here.

@binaryaaron binaryaaron self-assigned this Apr 5, 2018
@binaryaaron
Copy link
Contributor

Thank you, Josh.

Omitting the #!/usr/bin/env python from the search_tweets.py program was unintentional, as as the language about running it from the tools/ directory.

I think your suggestion is appropriate and will implement this in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants