Skip to content

Commit

Permalink
Rename instances of 'root' to 'base'
Browse files Browse the repository at this point in the history
  • Loading branch information
petebachant committed Dec 28, 2017
1 parent 8d809dd commit ef8369f
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Conda installs packages into environments efficiently using `hard links
environments are space efficient, and take seconds to create.

The default environment, which ``conda`` itself is installed into is called
``root``. To create another environment, use the ``conda create``
``base``. To create another environment, use the ``conda create``
command. For instance, to create an environment with the IPython notebook and
NumPy 1.6, which is older than the version that comes with Anaconda by
default, you would run
Expand All @@ -107,7 +107,7 @@ We can now activate this environment, use
This puts the bin directory of the ``numpy16`` environment in the front of the
``PATH``, and sets it as the default environment for all subsequent conda commands.

To go back to the root environment, use
To go back to the base environment, use

.. code-block:: bash
Expand Down Expand Up @@ -188,7 +188,7 @@ so that ``which -a conda`` lists first your miniconda installation.
If you are worried about breaking your conda installation, you can install a
separate instance of `Miniconda <http://conda.pydata.org/miniconda.html>`_ and
work off it. This is also the only way to test conda in both Python 2 and
Python 3, as conda can only be installed into a root environment.
Python 3, as conda can only be installed into a base environment.

To run the tests, set up a testing environment by running

Expand Down
6 changes: 3 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ conda_build_test: &conda_build_test
sudo /opt/conda/bin/pip install --no-deps -U .
git clone https://github.com/conda/conda_build_test_recipe.git ~/conda_build_test_recipe
/opt/conda/bin/conda info
sudo chown -R $(id -nu):$(id -ng) /opt/conda # conda-build tests assume writable root prefix
sudo chown -R $(id -nu):$(id -ng) /opt/conda # conda-build tests assume writable base prefix
rm ~/.gitconfig
# circleci image by default has
# $ cat ~/.gitconfig
Expand Down Expand Up @@ -128,7 +128,7 @@ conda_build_test: &conda_build_test
# skipping perl-cpan-Moo because of changes in cpan API
command: |
. /opt/conda/etc/profile.d/conda.sh
conda activate root
conda activate base
conda info
cd ~/conda-build
env | sort
Expand All @@ -146,7 +146,7 @@ conda_build_test: &conda_build_test
# env_creation_with_short_prefix_does_not_deadlock: error is prefix is too long
command: |
. /opt/conda/etc/profile.d/conda.sh
conda activate root
conda activate base
conda info
cd ~/conda-build
env | sort
Expand Down
4 changes: 2 additions & 2 deletions conda/cli/conda_argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ def configure_parser_info(sub_parsers):
help="Display information about packages.",
)
p.add_argument(
'--root',
'--base',
action='store_true',
help='Display root environment path.',
help='Display base environment path.',
)
p.add_argument(
'--unsafe-channels',
Expand Down
2 changes: 1 addition & 1 deletion conda/cli/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def install(args, parser, command='install'):
if newenv:
check_prefix(prefix, json=context.json)
if context.force_32bit and prefix == context.root_prefix:
raise CondaValueError("cannot use CONDA_FORCE_32BIT=1 in root env")
raise CondaValueError("cannot use CONDA_FORCE_32BIT=1 in base env")
if isupdate and not (args.file or args.all or args.packages):
raise CondaValueError("""no package names supplied
# If you want to update to a newer version of Anaconda, type:
Expand Down
2 changes: 1 addition & 1 deletion conda/plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def _remove_actions(prefix, specs, index, force=False, pinned=True): # pragma:
if (abspath(prefix) == sys.prefix and name == 'conda' and name not in nlinked
and not context.force):
if any(s.split(' ', 1)[0] == 'conda' for s in specs):
raise RemoveError("'conda' cannot be removed from the root environment")
raise RemoveError("'conda' cannot be removed from the base environment")
else:
raise RemoveError("Error: this 'remove' command cannot be executed because it\n"
"would require removing 'conda' dependencies")
Expand Down
2 changes: 1 addition & 1 deletion conda/shell/conda.xsh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def _parse_args(args=None):
p.add_argument('command')
ns, _ = p.parse_known_args(args)
if ns.command == 'activate':
p.add_argument('env_name_or_prefix', default='root')
p.add_argument('env_name_or_prefix', default='base')
elif ns.command in _REACTIVATE_COMMANDS:
p.add_argument('-n', '--name')
p.add_argument('-p', '--prefix')
Expand Down
2 changes: 1 addition & 1 deletion conda_env/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Provides the `conda env` interface to Conda environments.
Installing
----------

To install `conda env` with conda, run the following command in your root environment:
To install `conda env` with conda, run the following command in your base environment:

.. code-block:: bash
Expand Down
4 changes: 2 additions & 2 deletions conda_env/cli/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from conda._vendor.auxlib.entity import EntityEncoder
from conda.base.context import context

root_env_name = 'root'
base_env_name = 'base'


def stdout_json(d):
Expand All @@ -21,7 +21,7 @@ def get_prefix(args, search=True):


def find_prefix_name(name):
if name == root_env_name:
if name == base_env_name:
return context.root_prefix
# always search cwd in addition to envs dirs (for relative path access)
for envs_dir in list(context.envs_dirs) + [os.getcwd(), ]:
Expand Down
2 changes: 1 addition & 1 deletion conda_env/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
It appears this was caused by installing conda-env into a conda
environment. Like conda, conda-env needs to be installed into your
root conda/Anaconda environment.
base conda/Anaconda environment.
Please deactivate your current environment, then re-install conda-env
using this command:
Expand Down
2 changes: 1 addition & 1 deletion conda_env/cli/main_attach.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

example = """
examples:
conda env attach -n root notebook.ipynb
conda env attach -n base notebook.ipynb
conda env attach -r user/environment notebook.ipynb
"""

Expand Down
10 changes: 5 additions & 5 deletions tests/test_activate.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ def test_PS1(self):
activator = Activator('posix')
assert activator._prompt_modifier(ROOT_ENV_NAME) == '(%s) ' % ROOT_ENV_NAME

instructions = activator.build_activate("root")
instructions = activator.build_activate("base")
assert instructions['export_vars']['CONDA_PROMPT_MODIFIER'] == '(%s) ' % ROOT_ENV_NAME

def test_PS1_no_changeps1(self):
with env_var("CONDA_CHANGEPS1", "no", reset_context):
activator = Activator('posix')
assert activator._prompt_modifier('root') == ''

instructions = activator.build_activate("root")
instructions = activator.build_activate("base")
assert instructions['export_vars']['CONDA_PROMPT_MODIFIER'] == ''

def test_add_prefix_to_path(self):
Expand Down Expand Up @@ -978,7 +978,7 @@ def tearDown(self):

def basic_posix(self, shell):
shell.assert_env_var('CONDA_SHLVL', '0')
shell.sendline('conda activate root')
shell.sendline('conda activate base')
shell.assert_env_var('PS1', '(base).*')
shell.assert_env_var('CONDA_SHLVL', '1')
shell.sendline('conda activate "%s"' % self.prefix)
Expand Down Expand Up @@ -1020,7 +1020,7 @@ def test_zsh_basic_integration(self):

def basic_csh(self, shell):
shell.assert_env_var('CONDA_SHLVL', '0')
shell.sendline('conda activate root')
shell.sendline('conda activate base')
shell.assert_env_var('prompt', '(base).*')
shell.assert_env_var('CONDA_SHLVL', '1')
shell.sendline('conda activate "%s"' % self.prefix)
Expand Down Expand Up @@ -1056,7 +1056,7 @@ def test_fish_basic_integration(self):
# we aren't. Haven't experienced this problem yet with any other shell...

shell.assert_env_var('CONDA_SHLVL', '0')
shell.sendline('conda activate root')
shell.sendline('conda activate base')
shell.assert_env_var('CONDA_SHLVL', '1')
shell.sendline('conda activate "%s"' % self.prefix)
shell.assert_env_var('CONDA_SHLVL', '2')
Expand Down

0 comments on commit ef8369f

Please sign in to comment.