From 801c802f7e0567806383310e48ed83bb4650af27 Mon Sep 17 00:00:00 2001 From: Pey Lian Lim <2090236+pllim@users.noreply.github.com> Date: Tue, 20 Oct 2020 16:34:38 -0400 Subject: [PATCH 1/2] MNT: Appveyor no longer supported --- README.md | 104 ++++++++------------------------------------- appveyor.yml | 94 ---------------------------------------- appveyor/README.md | 85 ++++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+), 180 deletions(-) delete mode 100644 appveyor.yml create mode 100644 appveyor/README.md diff --git a/README.md b/README.md index 08d0e1e..53b7525 100644 --- a/README.md +++ b/README.md @@ -2,19 +2,27 @@ About ----- [![Build Status](https://travis-ci.org/astropy/ci-helpers.svg?branch=master)](https://travis-ci.org/astropy/ci-helpers) -[![Build status](https://ci.appveyor.com/api/projects/status/4mqtucv6ks4peakf/branch/master?svg=true)](https://ci.appveyor.com/project/Astropy/ci-helpers/branch/master) This repository contains a set of scripts that are used by the -``.travis.yml`` and ``appveyor.yml`` files of astropy packages for the -[Travis](https://travis-ci.org) and [AppVeyor](https://www.appveyor.com/) -services respectively. +``.travis.yml`` file of Astropy packages for the +[Travis](https://travis-ci.com) service. The idea is to clone these at the last minute when the continuous integration is about to be run. This is better than including this -repository as a sub-module, because this allows updates to this repository -to take effect immediately, and not have to update the sub-module every time +repository as a Git sub-module, because this allows updates to this repository +to take effect immediately, and not have to update the Git sub-module every time a change is made. +Important notice +---------------- + +Scripts for ``appveyor.yml`` for the [AppVeyor](https://www.appveyor.com/) +service are no longer supported. Please use the +[Windows build on Travis](https://docs.travis-ci.com/user/reference/windows/) +instead. + +Also see [Appveyor scripts README](https://github.com/astropy/ci-helpers/blob/master/appveyor/README.md). + How to use ---------- @@ -168,8 +176,7 @@ environment variables will default to ``RETRY_ERRORS="CondaHTTPError"``. When package installation via conda fails, the respective command's output (stdout and stderr) is searched for the strings in ``RETRY_ERRORS``. If any of these is found, the - installation will be automatically retried. Setting ``RETRY_ERRORS`` - in ``appveyor.yml`` will *overwrite* the default. + installation will be automatically retried. * ``RETRY_MAX``: an integer specifying the maximum number of automatic retries. If not set, this will default to ``RETRY_MAX=3``. Setting ``RETRY_MAX`` to @@ -213,78 +220,6 @@ Python and Numpy versions stay fixed to those requested, e.g. - $CONDA_INSTALL another_package ``` -### AppVeyor - -Include the following lines at the start of the ``install`` section in -``appveyor.yml``: - -```yaml -install: - - "git clone --depth 1 git://github.com/astropy/ci-helpers.git" - - "powershell ci-helpers/appveyor/install-miniconda.ps1" - - "conda activate test" -``` - -This does the following: - -- Set up Miniconda. -- Set up the PATH appropriately. -- Set up a conda environment named 'test' and switch to it. -- Set the ``always_yes`` config option for conda to ``true`` so that you don't - need to include ``--yes``. - -Following this, various dependencies are installed depending on the following -environment variables: - -* ``NUMPY_VERSION``: if set to ``dev`` or ``development``, the latest - developer version of Numpy is installed along with Cython. If set to a - version number, that version is installed. If set to ``stable``, install - the latest stable version of Numpy. - -* ``ASTROPY_VERSION``: if set to ``dev`` or ``development``, the latest - developer version of Astropy is installed, along with Cython and jinja2, - which are compile-time dependencies. If set to a version number, that - version is installed. If set to ``stable``, install the latest stable - version of Astropy. If set to ``lts`` the latest long term support (LTS) - version is installed (more info about LTS can be found - [here](https://github.com/astropy/astropy-APEs/blob/master/APE2.rst#version-numbering)). - -* ``SUNPY_VERSION``: if set to ``dev`` or ``development``, the latest - developer version of Sunpy is installed. If set to a - version number, that version is installed. If set to ``stable``, install - the latest stable version of Sunpy. - -* ``MINICONDA_VERSION``: this sets the version of Miniconda that will be - installed. Use this to override a pinned version if necessary. - -* ``CONDA_DEPENDENCIES``: this should be a space-separated string of package - names that will be installed with conda. - -* ``CONDA_CHANNELS``: this should be a space-separated string of conda - channel names. We don't add any channel by default. - -* ``DEBUG``: if `True` this turns on the shell debug mode in the install - scripts, and provides information on the current conda install and - switches off the ``-q`` conda flag for verbose output. - -* ``PIP_FALLBACK``: the default behaviour is to fall back to try to pip - install a package if installing it with conda fails for any reason. Set - this variable to ``false`` to opt out of this. - -* ``RETRY_ERRORS``: a comma-separated string array containing error names. - If not set, this will default to ``$RETRY_ERRORS="CondaHTTPError"``. When - package installation via conda fails, the respective command's error output - (stderr) is searched for the strings in ``RETRY_ERRORS``. If any of these is - found, the installation will be automatically retried. Setting - ``RETRY_ERRORS`` in ``appveyor.yml`` will *overwrite* the default. - -* ``RETRY_MAX``: an integer specifying the maximum number of automatic retries. - If not set, this will default to ``$RETRY_MAX=3``. Setting ``RETRY_MAX`` to - zero will disable automatic retries. - -* ``RETRY_DELAY``: a positive integer specifying the number of seconds to wait - before retrying. If not set, this will default to ``$RETRY_DELAY=2``. - ### pip pinnings We also provide a file called @@ -310,8 +245,6 @@ Details The scripts include: -* ``appveyor/install-miniconda.ps1`` - set up conda on Windows -* ``appveyor/windows_sdk.cmd`` - set up the compiler environment on Windows * ``travis/setup_dependencies_common.sh`` - set up conda packages on Linux and MacOS X * ``travis/setup_conda.sh`` - set up conda on MacOS X or Linux, users should use @@ -319,7 +252,6 @@ The scripts include: * ``travis/setup_conda_linux.sh`` - set up conda on Linux * ``travis/setup_conda_osx.sh`` - set up conda on MacOS X - -This repository can be cloned directly from the ``.travis.yml`` and -``appveyor.yml`` files when about to run tests and does not need to be included -as a sub-module in repositories. +This repository can be cloned directly from the ``.travis.yml`` +file when about to run tests and does not need to be included +as a Git sub-module in repositories. diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 96a3208..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,94 +0,0 @@ -# AppVeyor.com is a Continuous Integration service to build and run tests under -# Windows - -environment: - - global: - PYTHON: "C:\\conda" - MINICONDA_VERSION: "latest" - CONDA_VERSION: "4.7" - CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci-helpers\\appveyor\\windows_sdk.cmd" - PYTHON_ARCH: "64" # needs to be set for CMD_IN_ENV to succeed. If a mix - # of 32 bit and 64 bit builds are needed, move this - # to the matrix section. - TEST_CMD: "py.test test_env.py" - - matrix: - # Note that setting CONDA_CHANNEL_PRIORITY in the next two builds is - # unrelated to the rest of the builds and won't change anything, except - # that we can make sure the conda config was correctly updated. - - - PYTHON_VERSION: "2.7" - DEBUG: "True" - PYTEST_VERSION: "=3" - TEST_CMD: "python -c \"import pytest; assert int(pytest.__version__[0])<4\"" - - - PYTHON_VERSION: "3.6" - NUMPY_VERSION: "1.16" - PYTEST_VERSION: "=3.6.4" - ASTROPY_VERSION: "lts" - - - PYTHON_VERSION: "3.7" - NUMPY_VERSION: "development" - CONDA_DEPENDENCIES: "scipy glymur" - CONDA_CHANNELS: "conda-forge astrofrog" - PIP_DEPENDENCIES: "requests pyparsing" - CONDA_CHANNEL_PRIORITY: "flexible" - DEBUG: "True" - - - PYTHON_VERSION: "3.6" - NUMPY_VERSION: "stable" - ASTROPY_VERSION: "stable" - CONDA_DEPENDENCIES: "matplotlib h5py" - PIP_DEPENDENCIES: "astrodendro" - CONDA_CHANNEL_PRIORITY: "disabled" - DEBUG: "True" - - # For the Numpy dev build, we also specify a conda package that depends - # on Numpy to make sure that Numpy dev is used (because conda will also - # install Numpy stable) - - - PYTHON_VERSION: "3.7" - NUMPY_VERSION: "1.9" - - # We deliberately test with Numpy 1.16 to check that installing Astropy - # dev doesn't upgrade Numpy. - - PYTHON_VERSION: "3.7" - NUMPY_VERSION: "1.16" - ASTROPY_VERSION: "development" - - # Have to supply "PYTHON_VERSION" only because of windows_sdk.cmd code - - PYTHON_VERSION: "3.5" - CONDA_ENVIRONMENT: "conda_environment.yml" - TEST_CMD: "python -c \"import matplotlib\"" - - - PYTHON_VERSION: "3.6" - ASTROPY_VERSION: "3.0" - SUNPY_VERSION: "0.9" - PIP_FALLBACK: "False" - CONDA_CHANNELS: "conda-forge" - -matrix: - fast_finish: false - -platform: - -x64 - -install: - - # Install Miniconda - - "git clone . ci-helpers" - - "powershell ci-helpers/appveyor/install-miniconda.ps1" - - "conda activate test" - - # Test that PATH is set correctly - - "conda --version" - - "python --version" - -# Not a .NET project, we build ci-helpers in the install step instead -build: false - -test_script: - - "conda info -a" - - conda list - - "%CMD_IN_ENV% %TEST_CMD%" diff --git a/appveyor/README.md b/appveyor/README.md new file mode 100644 index 0000000..28420c1 --- /dev/null +++ b/appveyor/README.md @@ -0,0 +1,85 @@ +About +----- + +Appveyor is no longer supported. The scripts are provided as-is. +They will be removed at some point in the future. + +### AppVeyor + +Include the following lines at the start of the ``install`` section in +``appveyor.yml``: + +```yaml +install: + - "git clone --depth 1 git://github.com/astropy/ci-helpers.git" + - "powershell ci-helpers/appveyor/install-miniconda.ps1" + - "conda activate test" +``` + +This does the following: + +- Set up Miniconda. +- Set up the PATH appropriately. +- Set up a conda environment named 'test' and switch to it. +- Set the ``always_yes`` config option for conda to ``true`` so that you don't + need to include ``--yes``. + +Following this, various dependencies are installed depending on the following +environment variables: + +* ``NUMPY_VERSION``: if set to ``dev`` or ``development``, the latest + developer version of Numpy is installed along with Cython. If set to a + version number, that version is installed. If set to ``stable``, install + the latest stable version of Numpy. + +* ``ASTROPY_VERSION``: if set to ``dev`` or ``development``, the latest + developer version of Astropy is installed, along with Cython and jinja2, + which are compile-time dependencies. If set to a version number, that + version is installed. If set to ``stable``, install the latest stable + version of Astropy. If set to ``lts`` the latest long term support (LTS) + version is installed (more info about LTS can be found + [here](https://github.com/astropy/astropy-APEs/blob/master/APE2.rst#version-numbering)). + +* ``SUNPY_VERSION``: if set to ``dev`` or ``development``, the latest + developer version of Sunpy is installed. If set to a + version number, that version is installed. If set to ``stable``, install + the latest stable version of Sunpy. + +* ``MINICONDA_VERSION``: this sets the version of Miniconda that will be + installed. Use this to override a pinned version if necessary. + +* ``CONDA_DEPENDENCIES``: this should be a space-separated string of package + names that will be installed with conda. + +* ``CONDA_CHANNELS``: this should be a space-separated string of conda + channel names. We don't add any channel by default. + +* ``DEBUG``: if `True` this turns on the shell debug mode in the install + scripts, and provides information on the current conda install and + switches off the ``-q`` conda flag for verbose output. + +* ``PIP_FALLBACK``: the default behaviour is to fall back to try to pip + install a package if installing it with conda fails for any reason. Set + this variable to ``false`` to opt out of this. + +* ``RETRY_ERRORS``: a comma-separated string array containing error names. + If not set, this will default to ``$RETRY_ERRORS="CondaHTTPError"``. When + package installation via conda fails, the respective command's error output + (stderr) is searched for the strings in ``RETRY_ERRORS``. If any of these is + found, the installation will be automatically retried. Setting + ``RETRY_ERRORS`` in ``appveyor.yml`` will *overwrite* the default. + +* ``RETRY_MAX``: an integer specifying the maximum number of automatic retries. + If not set, this will default to ``$RETRY_MAX=3``. Setting ``RETRY_MAX`` to + zero will disable automatic retries. + +* ``RETRY_DELAY``: a positive integer specifying the number of seconds to wait + before retrying. If not set, this will default to ``$RETRY_DELAY=2``. + +Details +------- + +The scripts include: + +* ``appveyor/install-miniconda.ps1`` - set up conda on Windows +* ``appveyor/windows_sdk.cmd`` - set up the compiler environment on Windows From 1100c5925a26c41fbbd93e5cd7571a5e6b55129b Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Tue, 20 Oct 2020 17:27:47 -0400 Subject: [PATCH 2/2] Improve wording MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Brigitta Sipőcz --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 53b7525..9dc6865 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ service are no longer supported. Please use the [Windows build on Travis](https://docs.travis-ci.com/user/reference/windows/) instead. -Also see [Appveyor scripts README](https://github.com/astropy/ci-helpers/blob/master/appveyor/README.md). +For the usage of the deprecated scripts see [Appveyor scripts README](https://github.com/astropy/ci-helpers/blob/master/appveyor/README.md). How to use ----------