-
-
Notifications
You must be signed in to change notification settings - Fork 408
Use mamba 2 for the base installation of Miniforge #715
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
Changes from 12 commits
e682bd6
bbcf282
bbfe368
f90665c
a5b25eb
cd9613d
cfcafd8
6f354be
11191a2
cd352ab
6512f45
265ae61
dfb9e83
9e53db8
ee2c1f7
ac6245a
95ec0a1
bdfd5da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ set -ex | |
echo "***** Start: Testing Miniforge installer *****" | ||
|
||
export CONDA_PATH="${HOME}/miniforge" | ||
export MAMBA_VERSION="${MAMBA_VERSION:-2.0.6.rc1}" | ||
jjerphan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
CONSTRUCT_ROOT="${CONSTRUCT_ROOT:-${PWD}}" | ||
|
||
|
@@ -72,6 +73,28 @@ EOF | |
conda list | ||
fi | ||
|
||
echo "+ Mamba does not warn (check that there is no warning on stderr) and returns exit code 0" | ||
mamba --help 2> stderr.log || cat stderr.log | ||
test ! -s stderr.log | ||
rm -f stderr.log | ||
|
||
echo "+ mamba info" | ||
mamba info | ||
|
||
echo "+ mamba config sources" | ||
mamba config sources | ||
|
||
echo "+ mamba config list" | ||
mamba config list | ||
|
||
echo "+ Testing mamba version (i.e. ${MAMBA_VERSION})" | ||
mamba info --json | python -c "import sys, json; info = json.loads(sys.stdin.read()); assert info['mamba version'] == '${MAMBA_VERSION}', info" | ||
echo " OK" | ||
|
||
echo "+ Testing mamba channels" | ||
mamba info --json | python -c "import sys, json; info = json.loads(sys.stdin.read()); assert any('conda-forge' in c for c in info['channels']), info" | ||
echo " OK" | ||
|
||
echo "***** Python path *****" | ||
python -c "import sys; print(sys.executable)" | ||
python -c "import sys; assert 'miniforge' in sys.executable" | ||
|
@@ -84,3 +107,44 @@ python -c "import platform; print(platform.machine())" | |
python -c "import platform; print(platform.release())" | ||
|
||
echo "***** Done: Testing installer *****" | ||
|
||
echo "***** Testing the usage of mamba main commands *****" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note for reviewers: are there other commands or behaviors one could test? |
||
|
||
echo "***** Initialize the current session for mamba *****" | ||
export MAMBA_ROOT_PREFIX="/root/miniforge" | ||
jjerphan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
eval "$(mamba shell hook --shell bash)" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note for reviewers: I would also like to test when this is the case if possible. |
||
|
||
echo "***** Create a new environment *****" | ||
ENV_PREFIX="/tmp/testenv" | ||
|
||
mamba create -p $ENV_PREFIX numpy --yes -vvv | ||
|
||
echo "***** Activate the environment with mamba *****" | ||
mamba activate $ENV_PREFIX | ||
|
||
echo "***** Check that numpy is installed with mamba list *****" | ||
mamba list | grep numpy | ||
|
||
echo "***** Deactivate the environment *****" | ||
mamba deactivate | ||
|
||
echo "***** Activate the environment with conda *****" | ||
conda activate $ENV_PREFIX | ||
|
||
echo "***** Check that numpy is installed with python *****" | ||
python -c "import numpy; print(numpy.__version__)" | ||
|
||
echo "***** Remove numpy *****" | ||
mamba remove numpy --yes | ||
|
||
echo "***** Check that numpy is not installed with mamba list *****" | ||
mamba list | grep -v numpy | ||
|
||
echo "***** Deactivate the environment with conda *****" | ||
conda deactivate | ||
|
||
echo "***** Remove the environment *****" | ||
mamba env remove -p $ENV_PREFIX --yes | ||
|
||
echo "***** Done: Testing mamba main commands *****" | ||
|
Uh oh!
There was an error while loading. Please reload this page.