diff --git a/.github/workflows/mdtf_tests.yml b/.github/workflows/mdtf_tests.yml index 4e74747e6..85367909e 100644 --- a/.github/workflows/mdtf_tests.yml +++ b/.github/workflows/mdtf_tests.yml @@ -85,10 +85,6 @@ jobs: echo "env dir ${CONDA_ENV_DIR}" # MDTF-specific setup: install all conda envs ./src/conda/conda_env_setup.sh --all --micromamba_root ${CONDA_ROOT} --env_dir ${CONDA_ENV_DIR} - #micromamba create -y -f ./src/conda/env_base.yml - #micromamba create -y -f ./src/conda/env_python3_base.yml - #micromamba create -y -f ./src/conda/env_NCL_base.yml - #micromamba create -y -f ./src/conda/env_R_base.yml echo "Creating the _MDTF_synthetic_data environment" micromamba create -y -f ./src/conda/_env_synthetic_data.yml - name: Generate Model Data @@ -138,8 +134,8 @@ jobs: ./mdtf_framework.py --version # run the test PODs ./mdtf -v -f ${{matrix.json-file}} - # Debug - cat ${POD_OUTPUT}/MDTF_NCAR.Synthetic_1975_1981/Wheeler_Kiladis/Wheeler_Kiladis.log + # Debug POD log(s) + # cat ${POD_OUTPUT}/MDTF_NCAR.Synthetic_1975_1981/Wheeler_Kiladis/Wheeler_Kiladis.log - name: Get observational data for set 2 run: | echo "${PWD}" diff --git a/src/environment_manager.py b/src/environment_manager.py index 3f36b0251..df3b7ae33 100644 --- a/src/environment_manager.py +++ b/src/environment_manager.py @@ -331,8 +331,10 @@ def activate_env_commands(self, env_name): # conda_init for bash defines conda as a shell function; will get error # if we try to call the conda executable directly conda_prefix = os.path.join(self.conda_env_root, env_name) - + env_config_file = "" if os.path.split(self.conda_exe)[-1] == 'micromamba': + # micromamba appends env info to the shell config file + # that needs to be sourced in the sub-shell for each POD process home_dir = os.path.expanduser('~') if os.path.isfile(os.path.join(home_dir, '.bashrc')): env_config_file = os.path.join(home_dir, '.bashrc') @@ -344,8 +346,6 @@ def activate_env_commands(self, env_name): env_config_file = os.path.join(home_dir, '.tcshrc') elif os.path.isfile(os.path.join(home_dir, '.zshrc')): env_config_file = os.path.join(home_dir, '.zshrc') - else: - env_config_file = "" return [ f'source {self.conda_dir}/conda_init.sh {self.conda_root}', f'source {env_config_file}',