From dc63c817c5b1053b00f194c535334d91f8743e55 Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Wed, 28 Apr 2021 16:00:39 +0200 Subject: [PATCH 01/14] Replace mamba with micromamba in AppVeyor config --- appveyor.yml | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b0379c5..6accfe8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,52 +15,41 @@ for: only: - image: macos install: - - curl -L https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh > miniconda.sh - - bash miniconda.sh -b -p $HOME/miniconda + - curl -Ls https://micromamba.snakepit.net/api/micromamba/osx-64/latest | tar -xvj bin/micromamba + - mv bin/micromamba ./micromamba - matrix: only: - image: Ubuntu2004 install: - - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh - - bash miniconda.sh -b -p $HOME/miniconda + - wget -qO- https://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj bin/micromamba --strip-components=1 build_script: - - export PATH="$HOME/miniconda/bin:$PATH" + - ./micromamba shell init -s bash -p ~/micromamba + - source ~/.bashrc + - source ~/.bash_profile - hash -r - - conda config --set always_yes yes --set changeps1 no - # - conda update -q conda # makes travis build fail - - conda info -a # Useful for debugging any issues with conda - - conda init bash - - export CONDA_BASE=$(conda info --base) - - source $CONDA_BASE/etc/profile.d/conda.sh - - # Install mamba as a dramatically faster conda replacement. Specifying a - # fixed version makes the installation of mamba itself much faster, and - # avoids potential breakage due to changes in mamba behaviour. - - conda install mamba=0.7.3 -c conda-forge - - # Environments created by mamba can't be referenced by name from conda - # (presumably a bug), so we use an explicit path instead. + - mkdir -p ~/micromamba/pkgs/ + - export MAMBA_ROOT_PREFIX=~/micromamba + - export MAMBA_EXE=$(pwd)/micromamba + - . $MAMBA_ROOT_PREFIX/etc/profile.d/mamba.sh # Install the packages required by xcube-cds (including xcube and its # dependencies), as well as the pytest package (needed for testing). - - mamba env create --prefix $HOME/mamba-env --file environment.yml - - mamba install --prefix $HOME/mamba-env pytest + - micromamba create --yes --file environment.yml + - micromamba install --channel conda-forge pytest # Clone the xcube repository and install its dependencies using its conda # environment file - git clone https://github.com/dcs4cop/xcube $HOME/xcube - - mamba env update --prefix $HOME/mamba-env --file $HOME/xcube/environment.yml + - micromamba update --file $HOME/xcube/environment.yml # Remove the xcube conda package itself, because we want to install xcube # directly from its repository instead. - - mamba remove --prefix $HOME/mamba-env xcube + - micromamba remove --prefix $HOME/mamba-env xcube - # Activate the conda environment and list the installed packages (useful for - # debugging). - - conda activate $HOME/mamba-env - - conda list + # List the installed packages (useful for debugging). + - micromamba list # Install xcube from its repository using setuptools. - cd $HOME/xcube @@ -72,4 +61,3 @@ build_script: # Run the test suite. - pytest - From e7d0e06af0528dc8fdaa0a6dafd93f9ff4a9c50a Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Wed, 28 Apr 2021 16:23:09 +0200 Subject: [PATCH 02/14] Fix AppVeyor config bug --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 6accfe8..9e675bd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,6 +37,7 @@ build_script: # Install the packages required by xcube-cds (including xcube and its # dependencies), as well as the pytest package (needed for testing). - micromamba create --yes --file environment.yml + - micromamba activate xcube-cds - micromamba install --channel conda-forge pytest # Clone the xcube repository and install its dependencies using its conda From 8abb7514357de4618ce4c0e2ff575610f9e2b9da Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Wed, 28 Apr 2021 16:35:49 +0200 Subject: [PATCH 03/14] Fix AppVeyor config bug --- appveyor.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9e675bd..bd1482f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -36,18 +36,18 @@ build_script: # Install the packages required by xcube-cds (including xcube and its # dependencies), as well as the pytest package (needed for testing). - - micromamba create --yes --file environment.yml + - micromamba create --yes --name xcube --file environment.yml - micromamba activate xcube-cds - - micromamba install --channel conda-forge pytest + - micromamba install --yes --name xcube --channel conda-forge pytest # Clone the xcube repository and install its dependencies using its conda # environment file - git clone https://github.com/dcs4cop/xcube $HOME/xcube - - micromamba update --file $HOME/xcube/environment.yml + - micromamba update --name xcube --file $HOME/xcube/environment.yml # Remove the xcube conda package itself, because we want to install xcube # directly from its repository instead. - - micromamba remove --prefix $HOME/mamba-env xcube + - micromamba remove --name xcube xcube # List the installed packages (useful for debugging). - micromamba list From 4330410e6b45bf28c608fc868bf2766f37e35711 Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Wed, 28 Apr 2021 16:40:12 +0200 Subject: [PATCH 04/14] Fix AppVeyor config bug --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index bd1482f..eeb031a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,7 +37,7 @@ build_script: # Install the packages required by xcube-cds (including xcube and its # dependencies), as well as the pytest package (needed for testing). - micromamba create --yes --name xcube --file environment.yml - - micromamba activate xcube-cds + - micromamba activate xcube - micromamba install --yes --name xcube --channel conda-forge pytest # Clone the xcube repository and install its dependencies using its conda From 7898a961ae63f24b72d014fa4accdc25f4f982d6 Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Wed, 28 Apr 2021 16:53:59 +0200 Subject: [PATCH 05/14] Fix AppVeyor config bug --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index eeb031a..df17fd7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -61,4 +61,4 @@ build_script: - python setup.py install # Run the test suite. - - pytest + - py.test From 17e48249fdbc8eeb5551d99994208452912baa8e Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Wed, 28 Apr 2021 16:54:19 +0200 Subject: [PATCH 06/14] Fix AppVeyor config bug --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index df17fd7..2f779f7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -61,4 +61,4 @@ build_script: - python setup.py install # Run the test suite. - - py.test + - python -m pytest From 5f5cc58e109df5d244fe9fe35ec3608500e312fa Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Wed, 28 Apr 2021 17:11:23 +0200 Subject: [PATCH 07/14] Fix AppVeyor config bug --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 2f779f7..33209cb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -38,7 +38,7 @@ build_script: # dependencies), as well as the pytest package (needed for testing). - micromamba create --yes --name xcube --file environment.yml - micromamba activate xcube - - micromamba install --yes --name xcube --channel conda-forge pytest + - micromamba install --yes --name xcube --channel conda-forge pytest attr # Clone the xcube repository and install its dependencies using its conda # environment file From 9cdbc5cbcd627bb51c31891789a4b8717fa8c0d9 Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Wed, 28 Apr 2021 17:19:58 +0200 Subject: [PATCH 08/14] Fix AppVeyor config bug --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 33209cb..861d641 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -35,10 +35,9 @@ build_script: - . $MAMBA_ROOT_PREFIX/etc/profile.d/mamba.sh # Install the packages required by xcube-cds (including xcube and its - # dependencies), as well as the pytest package (needed for testing). + # dependencies) - micromamba create --yes --name xcube --file environment.yml - micromamba activate xcube - - micromamba install --yes --name xcube --channel conda-forge pytest attr # Clone the xcube repository and install its dependencies using its conda # environment file @@ -61,4 +60,5 @@ build_script: - python setup.py install # Run the test suite. + - micromamba install --yes --name xcube --channel conda-forge pytest attrs - python -m pytest From bb9fb9b59adcc5e052c24def380d4a0aedbc0851 Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Thu, 29 Apr 2021 08:33:43 +0200 Subject: [PATCH 09/14] Fix AppVeyor config bug --- appveyor.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 861d641..feb8259 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -61,4 +61,7 @@ build_script: # Run the test suite. - micromamba install --yes --name xcube --channel conda-forge pytest attrs + - micromamba activate xcube + - python -c "import sys; print(sys.path)" + - ls $HOME/micromamba/envs/xcube/lib/python3.9/site-packages/ - python -m pytest From b74e29ce08249d792eb77a19a68f4123627bf43c Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Thu, 29 Apr 2021 08:45:57 +0200 Subject: [PATCH 10/14] Fix AppVeyor config bug --- appveyor.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index feb8259..3d8b7a6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -38,6 +38,7 @@ build_script: # dependencies) - micromamba create --yes --name xcube --file environment.yml - micromamba activate xcube + - micromamba install -vvv --yes --name xcube --channel conda-forge attrs # Clone the xcube repository and install its dependencies using its conda # environment file @@ -60,8 +61,8 @@ build_script: - python setup.py install # Run the test suite. - - micromamba install --yes --name xcube --channel conda-forge pytest attrs - micromamba activate xcube + - micromamba install --yes --name xcube --channel conda-forge pytest attrs - python -c "import sys; print(sys.path)" - - ls $HOME/micromamba/envs/xcube/lib/python3.9/site-packages/ + - ls -1 $HOME/micromamba/envs/xcube/lib/python3.9/site-packages/ - python -m pytest From 7642e016e2a9380ca15d2d24ebff8e88b4ac2875 Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Thu, 29 Apr 2021 08:53:55 +0200 Subject: [PATCH 11/14] Fix AppVeyor config bug --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 3d8b7a6..dfa398d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -51,6 +51,7 @@ build_script: # List the installed packages (useful for debugging). - micromamba list + - micromamba list --name xcube # Install xcube from its repository using setuptools. - cd $HOME/xcube From 7988a91b9958f2503130dc83e98c74cc14f969af Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Thu, 29 Apr 2021 09:12:37 +0200 Subject: [PATCH 12/14] Fix AppVeyor config bug --- appveyor.yml | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index dfa398d..eac73b2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,36 +34,20 @@ build_script: - export MAMBA_EXE=$(pwd)/micromamba - . $MAMBA_ROOT_PREFIX/etc/profile.d/mamba.sh - # Install the packages required by xcube-cds (including xcube and its - # dependencies) - - micromamba create --yes --name xcube --file environment.yml - - micromamba activate xcube - - micromamba install -vvv --yes --name xcube --channel conda-forge attrs - - # Clone the xcube repository and install its dependencies using its conda - # environment file - git clone https://github.com/dcs4cop/xcube $HOME/xcube - - micromamba update --name xcube --file $HOME/xcube/environment.yml - - # Remove the xcube conda package itself, because we want to install xcube - # directly from its repository instead. - - micromamba remove --name xcube xcube - - # List the installed packages (useful for debugging). - - micromamba list - - micromamba list --name xcube - - # Install xcube from its repository using setuptools. + - micromamba create --name xc --file $HOME/xcube/environment.yml + - micromamba activate xc - cd $HOME/xcube - python setup.py install - # Install xcube-cds from its repository using setuptools. - cd $APPVEYOR_BUILD_FOLDER + - grep -v "^ - xcube" environment.yml > env_no_xcube.yml + - micromamba update --yes --name xc --file env_no_xcube.yml - python setup.py install # Run the test suite. - - micromamba activate xcube - - micromamba install --yes --name xcube --channel conda-forge pytest attrs + - micromamba activate xc + - micromamba install --yes --name xc --channel conda-forge pytest attrs - python -c "import sys; print(sys.path)" - - ls -1 $HOME/micromamba/envs/xcube/lib/python3.9/site-packages/ + - ls -1 $HOME/micromamba/envs/xc/lib/python3.9/site-packages/ - python -m pytest From c0fac6525d5a03d10dccdc6ac42256097a934b45 Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Thu, 29 Apr 2021 10:20:28 +0200 Subject: [PATCH 13/14] Tidy up and comment AppVeyor config --- appveyor.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index eac73b2..2c338cc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,8 +1,8 @@ version: '{build}' image: - - macos - Ubuntu2004 + - macos configuration: Release @@ -25,6 +25,7 @@ for: - wget -qO- https://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj bin/micromamba --strip-components=1 build_script: + # Set up micromamba - ./micromamba shell init -s bash -p ~/micromamba - source ~/.bashrc - source ~/.bash_profile @@ -34,20 +35,21 @@ build_script: - export MAMBA_EXE=$(pwd)/micromamba - . $MAMBA_ROOT_PREFIX/etc/profile.d/mamba.sh + # Clone xcube repository, install xcube dependencies with micromamba, + # and install the latest version of xcube with setup.py. - git clone https://github.com/dcs4cop/xcube $HOME/xcube - micromamba create --name xc --file $HOME/xcube/environment.yml - micromamba activate xc - cd $HOME/xcube - python setup.py install + # Use micromamba to install all xcube-cds dependencies *except* xcube + # (already manually installed), then install xcube-cds itself with setup.py. - cd $APPVEYOR_BUILD_FOLDER - grep -v "^ - xcube" environment.yml > env_no_xcube.yml - micromamba update --yes --name xc --file env_no_xcube.yml - python setup.py install - # Run the test suite. - - micromamba activate xc + # Make sure pytest is installed and run the test suite. - micromamba install --yes --name xc --channel conda-forge pytest attrs - - python -c "import sys; print(sys.path)" - - ls -1 $HOME/micromamba/envs/xc/lib/python3.9/site-packages/ - python -m pytest From e0154aaac1758ee98d1aec2dfccbb32fd1d80958 Mon Sep 17 00:00:00 2001 From: Pontus Lurcock Date: Thu, 29 Apr 2021 10:39:07 +0200 Subject: [PATCH 14/14] AppVeyor config: add some diagnostics --- appveyor.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 2c338cc..651a2be 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,6 +50,13 @@ build_script: - micromamba update --yes --name xc --file env_no_xcube.yml - python setup.py install - # Make sure pytest is installed and run the test suite. + # Make sure pytest is installed - micromamba install --yes --name xc --channel conda-forge pytest attrs + + # Print some diagnostics (useful for debugging) + - micromamba list + - xcube --version + - python -c "from xcube_cds.version import version; print(f'xcube_cds version {version}')" + + # Run the test suite - python -m pytest