Skip to content

Commit

Permalink
feat: ✨ Add conda environment setup scripts for fish and zsh shells
Browse files Browse the repository at this point in the history
  • Loading branch information
Anselmoo committed Jan 24, 2024
1 parent 7142ebe commit 3d5cbae
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tools/conda_env.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env fish

set ENV_NAME $argv[1]
set PACKAGE_NAME $argv[2]
set PYTHON_VERSION $argv[3]

if test -z "$PYTHON_VERSION"
set PYTHON_VERSION 3.11
end

conda create -n $ENV_NAME python=$PYTHON_VERSION --no-default-packages -y
conda activate $ENV_NAME
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install mamba -y

# Install spectrafit-all package
mamba install spectrafit-all -y
# Install an dditional package if provided
if test -n "$PACKAGE_NAME"
mamba install $PACKAGE_NAME -y
end
18 changes: 18 additions & 0 deletions tools/conda_env.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env zsh

ENV_NAME=$1
PACKAGE_NAME=$2
PYTHON_VERSION=${3:-3.11}

conda create -n $ENV_NAME python=$PYTHON_VERSION --no-default-packages
conda activate $ENV_NAME
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install mamba -y

# Install spectrafit-all package
mamba install spectrafit-all -y
# Install an dditional package if provided
if [[ -n $PACKAGE_NAME ]]; then
mamba install $PACKAGE_NAME -y
fi

0 comments on commit 3d5cbae

Please sign in to comment.