Skip to content

Commit

Permalink
Merge branch 'master' into zslade-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
zslade authored Apr 4, 2024
2 parents a614a23 + 4c9b2b9 commit cb9cb3e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/dev_guides/changing_splink/development_quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ From the directory where you have cloned the Splink repository, simply run:
./scripts/conda/development_setup_with_conda.sh
```

Then add the `mamba` CLI to your PATH by running `~/miniforge3/bin/mamba init`
for your shell -- e.g. `~/miniforge3/bin/mamba init` for Bash or `~/miniforge3/bin/mamba init zsh` for zsh.
If you use a shell besides bash, add the `mamba` CLI to your PATH by running `~/miniforge3/bin/mamba init <your_shell>`
-- e.g. `~/miniforge3/bin/mamba init zsh` for zsh.

If you've run this successfully, you can skip to the "Step 5: Activating your environment(s)" section.
If you've run this successfully, restart your terminal and skip to the "Step 5: Activating your environment(s)" section.

If you would prefer to manually go through the steps to have a better understanding of what you are installing, continue
to the next section.
Expand Down
10 changes: 9 additions & 1 deletion scripts/conda/development_setup_with_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@ cd "$(dirname "$0")"
set -e
set -x

if ! command -v mamba &> /dev/null
# Is mamba already available in an *interactive* shell?
if ! $SHELL -ic 'command -v mamba &> /dev/null'
then
# Instructions found here: https://github.com/conda-forge/miniforge?tab=readme-ov-file#downloading-the-installer-as-part-of-a-ci-pipeline
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh -b -p $HOME/miniforge3
source "${HOME}/miniforge3/etc/profile.d/conda.sh"
source "${HOME}/miniforge3/etc/profile.d/mamba.sh"
conda config --set auto_activate_base false
mamba init $(basename $SHELL)
rm ./Miniforge3-$(uname)-$(uname -m).sh
else
# Get location of conda installation used by default in an interactive shell,
# see https://github.com/conda/conda/issues/7980#issuecomment-472648567
CONDA_BASE=$($SHELL -ic 'conda info --base')
source "${CONDA_BASE}/etc/profile.d/conda.sh"
source "${CONDA_BASE}/etc/profile.d/mamba.sh"
fi

# NOTE: Unlike poetry, conda doesn't have great support for locking dependencies.
Expand Down

0 comments on commit cb9cb3e

Please sign in to comment.