From 4b20ebe8eeb53b420efdc0b62c404a66b0b93d32 Mon Sep 17 00:00:00 2001 From: Calvin Pieters Date: Tue, 14 Nov 2023 08:27:43 +0000 Subject: [PATCH 1/2] Changed install_sella.sh Updated the bash script --- devtools/install_sella.sh | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/devtools/install_sella.sh b/devtools/install_sella.sh index bc5356283f..94f39768c1 100644 --- a/devtools/install_sella.sh +++ b/devtools/install_sella.sh @@ -17,24 +17,34 @@ else exit 1 fi -# Set up Conda/Micromamba environment -if [ "$COMMAND_PKG" == "micromamba" ]; then +if [ "$COMMAND_PKG" = "micromamba" ]; then eval "$(micromamba shell hook --shell=bash)" micromamba activate base BASE=$MAMBA_ROOT_PREFIX - # shellcheck source=/dev/null - source "$BASE/etc/profile.d/micromamba.sh" + # Verify if the micromamba profile script exists + if [ -f "$BASE/etc/profile.d/micromamba.sh" ]; then + . "$BASE/etc/profile.d/micromamba.sh" + else + echo "File not found: $BASE/etc/profile.d/micromamba.sh" + exit 1 + fi else BASE=$(conda info --base) - # shellcheck source=/dev/null - source "$BASE/etc/profile.d/conda.sh" + echo "Conda base directory: $BASE" + # Verify if the conda profile script exists + if [ -f "$BASE/etc/profile.d/conda.sh" ]; then + . "$BASE/etc/profile.d/conda.sh" + else + echo "File not found: $BASE/etc/profile.d/conda.sh" + exit 1 + fi fi # clone the repo in the parent directory echo "Creating the Sella environment..." $COMMAND_PKG env create -f devtools/sella_environment.yml # Activate the environment -if [ "$COMMAND_PKG" == "micromamba" ]; then +if [ "$COMMAND_PKG" = "micromamba" ]; then micromamba activate sella_env else conda activate sella_env @@ -53,5 +63,5 @@ echo 'export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:'"$BASE"'/envs/sella_env/lib' >> echo 'export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}' >> $BASE/envs/sella_env/etc/conda/deactivate.d/env_vars.sh echo 'unset OLD_LD_LIBRARY_PATH' >> $BASE/envs/sella_env/etc/conda/deactivate.d/env_vars.sh -source ~/.bashrc +. ~/.bashrc echo "Done installing Sella." From d9c2e659441787dc836dae5ddf4db8cbc7e7d9b6 Mon Sep 17 00:00:00 2001 From: Calvin Pieters Date: Tue, 14 Nov 2023 08:28:24 +0000 Subject: [PATCH 2/2] Updated sella env Added python version - now 3.8 minimum added typing extensions as a packaged --- devtools/sella_environment.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/devtools/sella_environment.yml b/devtools/sella_environment.yml index 720b7310ba..8c84f67fb7 100644 --- a/devtools/sella_environment.yml +++ b/devtools/sella_environment.yml @@ -2,11 +2,11 @@ name: sella_env channels: - conda-forge dependencies: - - python=3.7 + - python>=3.8 - xtb-python - pyyaml - pandas - ncurses - pip: - - sella==2.2.1 - \ No newline at end of file + - sella + - typing-extensions