-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 basic XDG_CONFIG_HOME support #278
Conversation
priority is: $XDG/ipython if both or neither exist $HOME/.ipython if it exists and $XDG/ipython does not exist closes ipythongh-48 closes ipythongh-246
I'm inclined to switch to ~/.config/ipython for all new users. Might as well start following standards :) But before we merge, the policy should be documented: the docs describe ~/.ipython in a lot of places, so the new policy should be explained. And for now, I'd stick to just one dir, ignoring the XDG guidelines for multiple dirs. Let's get the basic part working first, but with our design of one ipython dir and subdirectories below it. If we read the full basedir spec (http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) and were to follow it all, we might need to have logic for DATA_DIRS, CACHE_HOME and RUNTIME_DIR. That's more complexity than I want to mess with now, especially since we haven't even finalized how much we want to serialize and where we want it. Those decisions are easier to make if we just have one location to think about instead of 4 different things. |
Okay, I can scan for .ipython references in the docs. Do you have a sense of exactly what you think that should look like? It's now a little harder, since I can't just replace Speaking of following standards, do we also want to comply with OSX standards, and use ~/Library there? |
I think for now, we can use ```ipython_dir` in references, explaining once the logic that sets it. I'm not sure about osx: do people prefer to use ~/Library/foo vs ~/.foo for more unix-type projects? I'll defer to you on how you prefer to go about it, since you have a much better feel for the platform than I do. |
Okay, I'll start some finding and replacing. command-line unix programs tend to not pay attention to OSX config standards, but real applications do (unless they are bad platform citizens). With things like the qtconsole, IPython is starting to straddle the gap. I would say leave .ipython on OSX for now, but add Library support if/when we do implement the split XDG basedir spec. |
Sounds good. I was thinking exactly what you said, that with the new tools we're becoming much more of a real set of apps than just an 80's style unix tool... |
I've scanned through the code and docs for ~/.ipython and made adjustments, and adding a short explanation into usage and the config overview. |
Looks great, merge away. Thanks! |
closes ipythongh-278 closes ipythongh-246 closes ipythongh-48
closes ipythongh-278 closes ipythongh-246 closes ipythongh-48
This commit adds basic support for
XDG_CONFIG_HOME
(default~/.config
), and tests to verify behavior.~/.ipython
, this will have no effect until they manually create~/.config/ipython
(or wherever their$XDG_CONFIG_HOME
points).~/.config/ipython
if~/.config
exists, else~/.ipython
~/.config/ipython
has priority over~/.ipython
I could change it so that, if we want to keep using
~/.ipython
as the default,XDG_CONFIG_HOME
is only used if it is explicitly specified, rather than defaulting to~/.config
.This might close #48 and its duplicate, #246. The reason it might not is that XDG recommends use of different directories for cache, runtime, and data, which would split the ipython dir. I'm not sure that regular terminal IPython would have much use for these, but the parallel computing code does have PID files, etc. that could logically fall into other categories.