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 locate
entry points
#1762
add locate
entry points
#1762
Conversation
Do we also have documentation on how to find them from Python code, i.e. starting |
For ipython_dir, absolutely, but I don't think there is a prominent mention for |
I added a simple doc section describing these entry points, and the corresponding utility functions. |
@@ -85,6 +85,8 @@ | |||
_main_examples = """ | |||
ipython profile create -h # show the help string for the create subcommand | |||
ipython profile list -h # show the help string for the list subcommand | |||
|
|||
ipython profile locate foo # print the path to the directory for profile 'foo' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it deliberate to allow both ipython profile locate foo
and ipython locate profile foo
? It seems kind of unpythonic to offer two similar commands for the same thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's in both because I didn't know which one to choose. If there were no other commands, locate profile foo
makes more sense because it's an actual sentence. But we already have an ipython profile
subtree of commands, so it seemed weird for it to not be there. I will add ipython locate profile foo
to the ipython profile
help, if you think that's best, and remove the ipython profile locate
entry point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK - I'm fairly neutral on which is better, but I think I marginally prefer having the locate
commands together, so I'd remove ipython profile locate
. Adding a note in the help makes sense too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ipython profile locate removed
Thanks, I think the doc section looks good. |
This looks very useful, and after the review and fixes I see no reason to delay it further. Thanks guys! Going in... |
Add `locate` entry points; these would be useful for quickly locating IPython directories and profiles from other (non-Python) applications. Examples: $> ipython locate /Users/me/.ipython $> ipython locate profile foo /Users/me/.ipython/profile_foo $> ipython locate profile /Users/me/.ipython/profile_default $> ipython locate profile dne [ProfileLocate] Profile u'dne' not found.
Add `locate` entry points; these would be useful for quickly locating IPython directories and profiles from other (non-Python) applications. Examples: $> ipython locate /Users/me/.ipython $> ipython locate profile foo /Users/me/.ipython/profile_foo $> ipython locate profile /Users/me/.ipython/profile_default $> ipython locate profile dne [ProfileLocate] Profile u'dne' not found.
These would be useful for quickly locating IPython directories and profiles from other (non-Python) applications.
Examples:
locate profile
is also available asprofile locate
, since that subcommand tree already exists.