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

Updated search ordering when looking for holoviews.rc #1700

Merged
merged 2 commits into from
Jul 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion examples/user_guide/Installing_and_Configuring.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,13 @@
"source": [
"## The holoviews.rc file\n",
"\n",
"HoloViews searches the following places (in order) for an rc file: ``~/.holoviews.rc``, ``~/.config/holoviews/holoviews.rc``, and then the parent directory of the top-level ``__init__.py`` file (useful for developers working out of the HoloViews git repo). The rc file location can be overridden via the ``HOLOVIEWSRC`` environment variable.\n",
"HoloViews searches for the first rc file it finds in the following places (in order): \n",
"\n",
"1. ``holoviews.rc`` in the parent directory of the top-level ``__init__.py`` file (useful for developers working out of the HoloViews git repo)\n",
"2. ``~/.holoviews.rc``\n",
"3. ``~/.config/holoviews/holoviews.rc``\n",
"\n",
"The rc file location can be overridden via the ``HOLOVIEWSRC`` environment variable.\n",
"\n",
"The rc file is a Python script, executed as HoloViews is imported. An example rc file to include various options discussed above might look like this:\n",
"\n",
Expand Down
6 changes: 3 additions & 3 deletions holoviews/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ def __call__(self, *args, **opts): # noqa (dummy signature)

# A single holoviews.rc file may be executed if found.
for rcfile in [os.environ.get("HOLOVIEWSRC", ''),
"~/.holoviews.rc",
"~/.config/holoviews/holoviews.rc",
os.path.abspath(os.path.join(os.path.split(__file__)[0],
'..', 'holoviews.rc'))]:
'..', 'holoviews.rc')),
"~/.holoviews.rc",
"~/.config/holoviews/holoviews.rc"]:
filename = os.path.expanduser(rcfile)
if os.path.isfile(filename):
with open(filename) as f:
Expand Down