Skip to content

Commit

Permalink
ENH parse environment variables in conda prefix for fitvd step
Browse files Browse the repository at this point in the history
  • Loading branch information
sidneymau committed Jul 3, 2024
1 parent ea4edcc commit 7ffb68e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eastlake/steps/fitvd.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,11 @@ def __init__(self, config, base_dir, name="fitvd",

# fitvd relies on an older version of ngmix; here, we use a separate conda
# environment to run these codes.
if (CONDA_PREFIX := self.config.get("conda_prefix", None)) is not None:
if (_conda_prefix := self.config.get("conda_prefix", None)) is not None:
conda_prefix = os.path.expanduser(os.path.expandvars(_conda_prefix))
CMD_PREFIX = [
"conda", "run",
"--prefix", CONDA_PREFIX,
"--prefix", conda_prefix,
]
else:
CMD_PREFIX = []
Expand Down

0 comments on commit 7ffb68e

Please sign in to comment.