-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ Add conda environment setup scripts for fish and zsh shells
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |