Skip to content

Commit 22d1bdf

Browse files
authored
Updated search ordering when looking for holoviews.rc (#1700)
* Updated search ordering when looking for holoviews.rc * Updated rc file documentation.
1 parent 516dfd7 commit 22d1bdf

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

examples/user_guide/Installing_and_Configuring.ipynb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,13 @@
134134
"source": [
135135
"## The holoviews.rc file\n",
136136
"\n",
137-
"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",
137+
"HoloViews searches for the first rc file it finds in the following places (in order): \n",
138+
"\n",
139+
"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",
140+
"2. ``~/.holoviews.rc``\n",
141+
"3. ``~/.config/holoviews/holoviews.rc``\n",
142+
"\n",
143+
"The rc file location can be overridden via the ``HOLOVIEWSRC`` environment variable.\n",
138144
"\n",
139145
"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",
140146
"\n",

holoviews/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ def __call__(self, *args, **opts): # noqa (dummy signature)
4949

5050
# A single holoviews.rc file may be executed if found.
5151
for rcfile in [os.environ.get("HOLOVIEWSRC", ''),
52-
"~/.holoviews.rc",
53-
"~/.config/holoviews/holoviews.rc",
5452
os.path.abspath(os.path.join(os.path.split(__file__)[0],
55-
'..', 'holoviews.rc'))]:
53+
'..', 'holoviews.rc')),
54+
"~/.holoviews.rc",
55+
"~/.config/holoviews/holoviews.rc"]:
5656
filename = os.path.expanduser(rcfile)
5757
if os.path.isfile(filename):
5858
with open(filename) as f:

0 commit comments

Comments
 (0)