forked from spacetelescope/crds
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored and improved crds_setup_env into 3 pieces:
crds_setup_all -- installs both base conda and CRDS s/w + dependencies crds_setup_env -- installs base conda and creates crds-env crds_setup_crds -- installs CRDS + dependencies into current env The new setup scripts normally require no parameters. The new env setup enables selection of OS shell (bash,csh,zsh) and ienstall location. The new env setup enables selection of the install directory. Pip installs now also --upgrade. Refectored dependency groups some to streamline submission+test install. Added bandit and jupyterlab as test + dev dependencies. Updated README.rst
- Loading branch information
1 parent
f329bed
commit ab77b76
Showing
5 changed files
with
145 additions
and
76 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
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,10 @@ | ||
#! /bin/bash | ||
|
||
./crds_setup_env $* || exit -1 | ||
|
||
|
||
export WHERE=${3:-"$HOME/miniconda3"} | ||
source $WHERE/etc/profile.d/conda.sh | ||
conda activate crds-env | ||
|
||
source ./crds_setup_crds |
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,11 @@ | ||
#! /bin/bash | ||
|
||
pip install --upgrade numpy | ||
pip install --upgrade git+https://github.com/spacetelescope/jwst | ||
pip uninstall --yes crds | ||
|
||
# pip install git+https://github.com/spacetelescope/crds.git#egg=crds["submission","test"] | ||
pip install --upgrade .["submission","test"] | ||
|
||
conda config --add channels http://ssb.stsci.edu/astroconda | ||
conda install --yes fitsverify |
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 |
---|---|---|
@@ -1,31 +1,47 @@ | ||
#! /bin/bash | ||
|
||
if [ "$1" == "os-x" ]; then | ||
export CONDA_INSTALLER=Miniconda3-latest-MacOSX-x86_64.sh | ||
elif [ "$1" == "linux" ]; then | ||
export CONDA_INSTALLER=Miniconda3-latest-Linux-x86_64.sh | ||
else | ||
echo "usage: crds_setup_env [os-x|linux]" | ||
exit -1 | ||
fi | ||
echo "Installing $CONDA_INSTALLER" | ||
export OS=${1:-`uname -s`} | ||
export SHELL=${2:-bash} | ||
export WHERE=${3:-"$HOME/miniconda3"} | ||
|
||
case $OS in | ||
Darwin) | ||
export CONDA_INSTALLER=Miniconda3-latest-MacOSX-x86_64.sh | ||
;; | ||
Linux) | ||
export CONDA_INSTALLER=Miniconda3-latest-Linux-x86_64.sh | ||
;; | ||
*) | ||
echo "usage: $0 [Darwin|Linux] [bash|csh|zsh] [path_to_install_dir]" | ||
exit -1 | ||
;; | ||
esac | ||
|
||
case $SHELL in | ||
bash) | ||
;; | ||
csh) | ||
;; | ||
zsh) | ||
;; | ||
*) | ||
echo "Invalid SHELL selected = $SHELL" | ||
exit -1 | ||
;; | ||
esac | ||
|
||
echo "Installing OS=$OS SHELL=$SHELL WHERE=$WHERE" | ||
|
||
rm -rf $WHERE | ||
rm -f ${CONDA_INSTALLER}* | ||
wget --no-check-certificate https://repo.anaconda.com/miniconda/${CONDA_INSTALLER} | ||
|
||
bash ${CONDA_INSTALLER} -b -p $HOME/miniconda3 | ||
bash ${CONDA_INSTALLER} -b -p $WHERE | ||
rm -f ${CONDA_INSTALLER} | ||
|
||
conda update --yes -n base -c conda | ||
conda config --add channels http://ssb.stsci.edu/astroconda | ||
source $WHERE/etc/profile.d/conda.sh | ||
conda update --yes -n base -c defaults conda | ||
conda init $SHELL | ||
|
||
conda create --yes -n crds-env python=3.7 # conda | ||
conda activate crds-env | ||
|
||
pip install numpy | ||
pip install git+https://github.com/spacetelescope/jwst | ||
|
||
pip uninstall --yes crds | ||
# pip install git+https://github.com/spacetelescope/crds.git#egg=crds["submission","test","dev","docs"] | ||
pip install .["submission","test","dev","docs"] | ||
|
||
conda install --yes fitsverify |
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