Skip to content

Commit

Permalink
comment out debugging lines in mdtf_tests
Browse files Browse the repository at this point in the history
add comments to environment_manager
  • Loading branch information
wrongkindofdoctor committed Oct 27, 2023
1 parent 37dd031 commit 0b77632
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/mdtf_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}"
Expand Down
6 changes: 3 additions & 3 deletions src/environment_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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}',
Expand Down

0 comments on commit 0b77632

Please sign in to comment.