From af2d7fd2b58f3e7f69eb438b6cdeead0dd60eae3 Mon Sep 17 00:00:00 2001 From: Craig Jones Date: Mon, 12 Mar 2018 16:41:27 -0400 Subject: [PATCH 01/10] script with specific hashes for test environment --- scripts/update_cubeviz_test_env_pip | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 scripts/update_cubeviz_test_env_pip diff --git a/scripts/update_cubeviz_test_env_pip b/scripts/update_cubeviz_test_env_pip new file mode 100755 index 000000000..b1680d739 --- /dev/null +++ b/scripts/update_cubeviz_test_env_pip @@ -0,0 +1,28 @@ +#! /bin/sh + +glue_hash="cc1dc09bff7113ab679a75dd7617456c5f85e005" +spectral_cube_hash="cd06db6c5658baa2e182565b4fc6b337e383c8f1" +specviz_hash="437e5ca0d1da6b1099f89d2ee6230b19ff785796" +cubeviz_hash="029302d36722d765a8dea2f38638ff1856c23e65" +specutils_hash="legacy-specutils" +astropy_hash="46b59dddfba1e24f39e64dccbd9eb6488e1f8df0" + +set -eu + +if [ "$conda_env" != "test-cubeviz-conda" ]; then + echo "Must be in the test-cubeviz-conda conda environment" + exit 1 +fi + +# Remove anything installed by conda +conda remove astropy glue-core spectral-cube specviz cubeviz specutils + +# Install specific versions of each packages +pip install --upgrade \ + git+https://github.com/glue-viz/glue@${glue_hash} \ + git+https://github.com/radio-astro-tools/spectral-cube@${spectral_cube_hash} \ + git+https://github.com/spacetelescope/specviz@${specviz_hash} \ + git+https://github.com/spacetelescope/cubeviz@${cubeviz_hash} \ + git+https://github.com/astropy/specutils.git@${specutils_hash} \ + git+https://github.com/astropy/astropy@${astropy_hash}#egg=astropy + From 07f2a736f6dc1fa0e05a9511468a43424e16a48b Mon Sep 17 00:00:00 2001 From: Craig Jones Date: Tue, 13 Mar 2018 08:44:31 -0400 Subject: [PATCH 02/10] added download and modify of new script --- scripts/update_cubeviz_test_env | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/scripts/update_cubeviz_test_env b/scripts/update_cubeviz_test_env index 4f14651cd..dea66bd7d 100755 --- a/scripts/update_cubeviz_test_env +++ b/scripts/update_cubeviz_test_env @@ -1,5 +1,7 @@ #! /bin/sh +echo "Going to update conda environment test=cubeviz-conda" + set -eu conda_env=`conda env list | grep '*' | cut -d\ -f1` @@ -10,14 +12,10 @@ if [ "$conda_env" != "test-cubeviz-conda" ]; then exit 1 fi -conda_version=$(conda --version | cut -d\ -f2 | cut -d. -f1,2) -if [[ "$conda_version" < "$min_conda_version" ]]; then - echo "WARNING: your conda version is out of date ($(conda --version))." \ - "This may cause issues with installing the latest version of cubeviz" \ - "and its dependencies." -fi - -conda update --update-deps -c glueviz/label/dev -c glueviz -c http://ssb.stsci.edu/astroconda-dev cubeviz --yes +# Grab the script: +echo "Downloading the update script" +output_file=`mktemp` +wget -O - --no-check-certificate https://raw.githubusercontent.com/brechmos-stsci/cubeviz/tester-script/scripts/update_cubeviz_test_env_pip > $output_file -echo "CubeViz test environment has been updated to the following:" -conda list "cubeviz|glue-core|specviz|specutils|spectral-cube" +echo "Running the update script" +`sh $output` From 47d523bdf4b98181daa728de7d4ecf738de59f30 Mon Sep 17 00:00:00 2001 From: Craig Jones Date: Tue, 13 Mar 2018 08:45:54 -0400 Subject: [PATCH 03/10] fixed spelling --- scripts/update_cubeviz_test_env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update_cubeviz_test_env b/scripts/update_cubeviz_test_env index dea66bd7d..9c60ad89d 100755 --- a/scripts/update_cubeviz_test_env +++ b/scripts/update_cubeviz_test_env @@ -1,6 +1,6 @@ #! /bin/sh -echo "Going to update conda environment test=cubeviz-conda" +echo "Going to update conda environment test-cubeviz-conda" set -eu From d0c60e4dba65173cfc9de3557a85c53e2c9bfbd1 Mon Sep 17 00:00:00 2001 From: Craig Jones Date: Tue, 13 Mar 2018 08:47:41 -0400 Subject: [PATCH 04/10] updated tweaks and changes --- scripts/update_cubeviz_test_env | 4 ++-- scripts/update_cubeviz_test_env_pip | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/update_cubeviz_test_env b/scripts/update_cubeviz_test_env index 9c60ad89d..5acbf6daf 100755 --- a/scripts/update_cubeviz_test_env +++ b/scripts/update_cubeviz_test_env @@ -17,5 +17,5 @@ echo "Downloading the update script" output_file=`mktemp` wget -O - --no-check-certificate https://raw.githubusercontent.com/brechmos-stsci/cubeviz/tester-script/scripts/update_cubeviz_test_env_pip > $output_file -echo "Running the update script" -`sh $output` +echo "Running the update script $output_file" +`sh $output_file` diff --git a/scripts/update_cubeviz_test_env_pip b/scripts/update_cubeviz_test_env_pip index b1680d739..81d0125d3 100755 --- a/scripts/update_cubeviz_test_env_pip +++ b/scripts/update_cubeviz_test_env_pip @@ -9,6 +9,8 @@ astropy_hash="46b59dddfba1e24f39e64dccbd9eb6488e1f8df0" set -eu +conda_env=`conda env list | grep '*' | cut -d\ -f1` + if [ "$conda_env" != "test-cubeviz-conda" ]; then echo "Must be in the test-cubeviz-conda conda environment" exit 1 From 0fcb9e8dee03e340e47515429774c1af0a385f9f Mon Sep 17 00:00:00 2001 From: Craig Jones Date: Tue, 13 Mar 2018 09:16:14 -0400 Subject: [PATCH 05/10] more tweaks and comments --- scripts/update_cubeviz_test_env | 4 +++- scripts/update_cubeviz_test_env_pip | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/update_cubeviz_test_env b/scripts/update_cubeviz_test_env index 5acbf6daf..8259f339c 100755 --- a/scripts/update_cubeviz_test_env +++ b/scripts/update_cubeviz_test_env @@ -15,7 +15,9 @@ fi # Grab the script: echo "Downloading the update script" output_file=`mktemp` -wget -O - --no-check-certificate https://raw.githubusercontent.com/brechmos-stsci/cubeviz/tester-script/scripts/update_cubeviz_test_env_pip > $output_file + +# https://stackoverlfow.com/questions/14411103/check-for-existence-of-wget-curl +wget -O - --no-check-certificate https://raw.githubusercontent.com/brechmos-stsci/cubeviz/tester-script/scripts/update_cubeviz_test_env_pip > $output_file || curl -o $output_file https://raw.githubusercontent.com/brechmos-stsci/cubeviz/tester-script/scripts/update_cubeviz_test_env_pip echo "Running the update script $output_file" `sh $output_file` diff --git a/scripts/update_cubeviz_test_env_pip b/scripts/update_cubeviz_test_env_pip index 81d0125d3..bcdf3f155 100755 --- a/scripts/update_cubeviz_test_env_pip +++ b/scripts/update_cubeviz_test_env_pip @@ -16,8 +16,9 @@ if [ "$conda_env" != "test-cubeviz-conda" ]; then exit 1 fi -# Remove anything installed by conda -conda remove astropy glue-core spectral-cube specviz cubeviz specutils +# Remove anything installed by conda, if there is an error, i.e., no packages +# then continue processing +conda remove astropy glue-core spectral-cube specviz cubeviz specutils || true # Install specific versions of each packages pip install --upgrade \ From 5ebd4321af585be4420046cbd1204e7ec399b4a2 Mon Sep 17 00:00:00 2001 From: Craig Jones Date: Tue, 13 Mar 2018 09:56:25 -0400 Subject: [PATCH 06/10] added some comments --- scripts/update_cubeviz_test_env_pip | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/update_cubeviz_test_env_pip b/scripts/update_cubeviz_test_env_pip index bcdf3f155..c678d7286 100755 --- a/scripts/update_cubeviz_test_env_pip +++ b/scripts/update_cubeviz_test_env_pip @@ -9,8 +9,8 @@ astropy_hash="46b59dddfba1e24f39e64dccbd9eb6488e1f8df0" set -eu +echo "Checking to make sure we are in the right conda environment" conda_env=`conda env list | grep '*' | cut -d\ -f1` - if [ "$conda_env" != "test-cubeviz-conda" ]; then echo "Must be in the test-cubeviz-conda conda environment" exit 1 @@ -18,9 +18,11 @@ fi # Remove anything installed by conda, if there is an error, i.e., no packages # then continue processing +echo "Remove a few of the conda packages we want to replace" conda remove astropy glue-core spectral-cube specviz cubeviz specutils || true # Install specific versions of each packages +echo "pip install the packages based on the commit hashes" pip install --upgrade \ git+https://github.com/glue-viz/glue@${glue_hash} \ git+https://github.com/radio-astro-tools/spectral-cube@${spectral_cube_hash} \ From 11b329d298817b4114831e69f6b196a787334176 Mon Sep 17 00:00:00 2001 From: Craig Jones Date: Tue, 13 Mar 2018 10:20:56 -0400 Subject: [PATCH 07/10] removed the double source'ing. silly me --- scripts/update_cubeviz_test_env | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/update_cubeviz_test_env b/scripts/update_cubeviz_test_env index 8259f339c..73b9a45ce 100755 --- a/scripts/update_cubeviz_test_env +++ b/scripts/update_cubeviz_test_env @@ -19,5 +19,9 @@ output_file=`mktemp` # https://stackoverlfow.com/questions/14411103/check-for-existence-of-wget-curl wget -O - --no-check-certificate https://raw.githubusercontent.com/brechmos-stsci/cubeviz/tester-script/scripts/update_cubeviz_test_env_pip > $output_file || curl -o $output_file https://raw.githubusercontent.com/brechmos-stsci/cubeviz/tester-script/scripts/update_cubeviz_test_env_pip +echo "-------------" +cat $output_file +echo "-------------" + echo "Running the update script $output_file" -`sh $output_file` +sh $output_file From cd9f76e2613134c7b2bcf2c0a267105e19845262 Mon Sep 17 00:00:00 2001 From: Craig Jones Date: Tue, 13 Mar 2018 11:09:50 -0400 Subject: [PATCH 08/10] made download location a variable --- scripts/update_cubeviz_test_env | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/update_cubeviz_test_env b/scripts/update_cubeviz_test_env index 73b9a45ce..f7d664dcf 100755 --- a/scripts/update_cubeviz_test_env +++ b/scripts/update_cubeviz_test_env @@ -6,6 +6,7 @@ set -eu conda_env=`conda env list | grep '*' | cut -d\ -f1` min_conda_version="4.4" +download_location="https://raw.githubusercontent.com/brechmos-stsci/cubeviz/tester-script/scripts/update_cubeviz_test_env_pip" if [ "$conda_env" != "test-cubeviz-conda" ]; then echo "Must be in the test-cubeviz-conda conda environment" @@ -17,7 +18,7 @@ echo "Downloading the update script" output_file=`mktemp` # https://stackoverlfow.com/questions/14411103/check-for-existence-of-wget-curl -wget -O - --no-check-certificate https://raw.githubusercontent.com/brechmos-stsci/cubeviz/tester-script/scripts/update_cubeviz_test_env_pip > $output_file || curl -o $output_file https://raw.githubusercontent.com/brechmos-stsci/cubeviz/tester-script/scripts/update_cubeviz_test_env_pip +wget -O - --no-check-certificate $download_location > $output_file || curl -o $output_file $download_location echo "-------------" cat $output_file From 67388d9d953bf7ce504074922fb522fcbbf8209d Mon Sep 17 00:00:00 2001 From: Craig Jones Date: Tue, 13 Mar 2018 11:12:09 -0400 Subject: [PATCH 09/10] updated to point to master --- scripts/update_cubeviz_test_env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update_cubeviz_test_env b/scripts/update_cubeviz_test_env index f7d664dcf..7291a12eb 100755 --- a/scripts/update_cubeviz_test_env +++ b/scripts/update_cubeviz_test_env @@ -6,7 +6,7 @@ set -eu conda_env=`conda env list | grep '*' | cut -d\ -f1` min_conda_version="4.4" -download_location="https://raw.githubusercontent.com/brechmos-stsci/cubeviz/tester-script/scripts/update_cubeviz_test_env_pip" +download_location="https://raw.githubusercontent.com/spacetelescope/cubeviz/master/scripts/update_cubeviz_test_env_pip" if [ "$conda_env" != "test-cubeviz-conda" ]; then echo "Must be in the test-cubeviz-conda conda environment" From 30a2a35c154943b113e4330dc25c3682a1ba2a05 Mon Sep 17 00:00:00 2001 From: Craig Jones Date: Tue, 13 Mar 2018 11:14:02 -0400 Subject: [PATCH 10/10] removed debugging --- scripts/update_cubeviz_test_env | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/update_cubeviz_test_env b/scripts/update_cubeviz_test_env index 7291a12eb..576c2dce3 100755 --- a/scripts/update_cubeviz_test_env +++ b/scripts/update_cubeviz_test_env @@ -20,9 +20,5 @@ output_file=`mktemp` # https://stackoverlfow.com/questions/14411103/check-for-existence-of-wget-curl wget -O - --no-check-certificate $download_location > $output_file || curl -o $output_file $download_location -echo "-------------" -cat $output_file -echo "-------------" - echo "Running the update script $output_file" sh $output_file