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

Allow --profile to be passed a dir. #3919

Closed
Carreau opened this issue Aug 6, 2013 · 6 comments
Closed

Allow --profile to be passed a dir. #3919

Carreau opened this issue Aug 6, 2013 · 6 comments
Milestone

Comments

@Carreau
Copy link
Member

Carreau commented Aug 6, 2013

Would it be possible to have --profile= to also be able to take a directory that will be use as current profile. That would be useful when teaching tutorial to ship the profile dir along the notebooks and ask user to start with shipped profile instead of copying in .ipython/profile.

Yes I know of ProfileDir.location, but it is too complicated IMHO. it woudl be nice to just do clone for example IPython in depth and do $ ipython notebook --profile=./in-depth and get for example some extensions shipped by instructor.

That would kind of complement the new --config flag.

Though ?

@minrk
Copy link
Member

minrk commented Aug 6, 2013

IPython.parallel entry points already support this (via --profile-dir), it should be one of the things that propagates upstream when I get rid of BaseParallelApp.

In the meantime, set ProfileDir.location or use IPYTHONDIR env.

@Carreau
Copy link
Member Author

Carreau commented Aug 6, 2013

IIRC, --profile-dir allow you to set the directory in which the profile are searched but it is not what I want, I want to explicitely pass the profile basicaly I woudl like the ability to merge:

$ ipyton --ProfileDir.location=~/.ipython/ --profile=default

Into one option

$ ipython --with-profile=~/.ipython/profile_default

@minrk
Copy link
Member

minrk commented Aug 6, 2013

Ah, you misunderstand what ProfileDir.location is. ProfileDir.location is the path to the actual profile directory (e.g. ~/.ipython/profile_default), so it's just one step. The two-step is already available with aliases via --ipython-dir or the IPYTHONDIR env variable:

IPYTHONDIR=/tmp/ipython ipython --profile foo
# or
ipython --ipython-dir /tmp/ipython --profile foo

But if you use ProfileDir.location, it's just one step:

ipython --ProfileDir.location=./myprofile

And you can create profiles the same way:

ipython profile create --ProfileDir.location=./myprofile

@Carreau
Copy link
Member Author

Carreau commented Aug 7, 2013

Hum... I think I was tired, the text of the option is pretty clear.
+1 to having it directly --profile-dir then. Shoudl I close? Or change it as a reminder to make the --profile-dir flag global ?

@minrk
Copy link
Member

minrk commented Aug 7, 2013

You can leave it open marked for 2.0. Hopefully I will get to that, I really want to reduce the amount of unique code in IPython.parallel.

@minrk
Copy link
Member

minrk commented Jan 29, 2014

--profile-dir works now.

@minrk minrk closed this as completed Jan 29, 2014
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

No branches or pull requests

2 participants