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

simplified command line interface #12

Closed
wants to merge 1 commit into from

Conversation

serine
Copy link

@serine serine commented Jan 16, 2020

@Marcdh3 I think something like this provides more intuitive and user friendly cli interface for ornet tool. cheers

@Marcdh3
Copy link
Contributor

Marcdh3 commented Jan 16, 2020

Thank you for the PR, because we were planning on transitioning the code to a simpler cli. However, we were considering using a main.py for clarity. Are there any advantages to using the entry_points option in setuptools, rather than a main.py?

@serine
Copy link
Author

serine commented Jan 17, 2020

@Marcdh3 I'm not exactly sure what you mean by using main.py ? As in the user will type main.py on the command line? or you going to rename one of the modules into e.g Pipeline.py -> main.py ? The latter wouldn't change anything, the former is sort of upto you, but you want to make sure it is initiative to the user. If the tool called my-tool I sort of expect it to be the same name on the command line, but it doesn't have to be I guess.

entry_points is the way to specify "main" function, as in the function that going to run first.

There are various ways of doing what I've done. Another way I've seem people do this is to make scripts or bin directory and place ornet.py into that directory. That way user just finds that and runs it.

Feel free to knock-back the PR this was just an example, has no effect on the review

Cheers

@Marcdh3
Copy link
Contributor

Marcdh3 commented Jan 17, 2020

Oops, I wrote "__main__.py", but the markdown removed the '_'. Thanks a lot for the tip! Taught me a new way to do that. We stuck with the original plan, since it sounds like they achieve the same functionality, and using this file may make it easier for someone exploring the directory to have a common starting point. The changes can be seen here.

@Marcdh3 Marcdh3 closed this Jan 17, 2020
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.

2 participants