diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 4f4596a7..00000000 --- a/.appveyor.yml +++ /dev/null @@ -1,45 +0,0 @@ -platform: - - x64 - -branches: - only: - - main - -environment: - matrix: - - PYVER: 38 - - PYVER: 37 - - PYVER: 36 - -install: - # If there is a newer build queued for the same PR, cancel this one. - - cmd: > - .gen_ci_support\\ff_ci_pr_build.py -v - --ci "appveyor" - "%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_SLUG%" - "%APPVEYOR_BUILD_NUMBER%" - "%APPVEYOR_PULL_REQUEST_NUMBER%" - - # Install Miniconda. - - cmd: call .appveyor_support\\install_miniconda.bat - - # Create the test environment. - - cmd: set "CONDA_ENV_TYPE=tst_py%PYVER%" - - cmd: call .appveyor_support\\create_env.bat - - # Install the package and dependencies. - - cmd: pip install -e . - -# Skip .NET project specific build phase. -build: off - -# Run tests and measure test coverage. -test_script: - - cmd: coverage erase - - cmd: coverage run --source . setup.py test - - cmd: coverage report -m - -on_success: - - cmd: set "CONDA_ENV_TYPE=dpl" - - cmd: .appveyor_support\\create_env.bat - - cmd: coveralls || exit 0 diff --git a/.appveyor_support/create_env.bat b/.appveyor_support/create_env.bat deleted file mode 100755 index 5ee1c0a0..00000000 --- a/.appveyor_support/create_env.bat +++ /dev/null @@ -1,31 +0,0 @@ -:: Show each command and output -@echo on - -:: Check CONDA_ENV_TYPE was set. -if "$%CONDA_ENV_TYPE%" == "" ( - echo "Set $CONDA_ENV_TYPE externally." - exit 1 -) - -:: Activate conda. -call "%MINICONDA_DIR%\Scripts\activate.bat" -if errorlevel 1 exit 1 - -:: Create a temporary directory for the environment. -python -c "import tempfile; print(tempfile.mkdtemp())" > tmp_dir.txt -if errorlevel 1 exit 1 -set /p CONDA_ENV_PREFIX= "%MINICONDA_INSTALLER%.md5" -if errorlevel 1 exit 1 -type "%MINICONDA_INSTALLER%.md5" -if errorlevel 1 exit 1 -set /p MINICONDA_MD5_FOUND=<%MINICONDA_INSTALLER%.md5 -if errorlevel 1 exit 1 -set "MINICONDA_MD5_FOUND=%MINICONDA_MD5_FOUND: =%" -if errorlevel 1 exit 1 -echo "%MINICONDA_MD5_FOUND%" | findstr /c:"%MINICONDA_MD5%" -if errorlevel 1 exit 1 -start /wait "" %MINICONDA_INSTALLER% /InstallationType=JustMe ^ - /AddToPath=0 ^ - /RegisterPython=0 ^ - /S ^ - /D=%MINICONDA_DIR% -if errorlevel 1 exit 1 -del "%MINICONDA_INSTALLER%" -if errorlevel 1 exit 1 -del "%MINICONDA_INSTALLER%.md5" -if errorlevel 1 exit 1 - -:: Activate conda. -call "%MINICONDA_DIR%\Scripts\activate.bat" -if errorlevel 1 exit 1 - -:: Configure conda. -conda.exe config --set show_channel_urls true -if errorlevel 1 exit 1 -conda.exe config --set auto_update_conda false -if errorlevel 1 exit 1 -conda.exe config --set add_pip_as_python_dependency true -if errorlevel 1 exit 1 - -:: Patch VS 2008 for 64-bit support. -conda.exe install --quiet --yes "conda-forge::vs2008_express_vc_python_patch" -call setup_x64 diff --git a/.circleci/checkout_merge_commit.sh b/.circleci/checkout_merge_commit.sh deleted file mode 100755 index 9528e4b3..00000000 --- a/.circleci/checkout_merge_commit.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - - -# Update PR refs for testing. -if [[ -n "${CIRCLE_PR_NUMBER}" ]] -then - FETCH_REFS="${FETCH_REFS} +refs/pull/${CIRCLE_PR_NUMBER}/head:pr/${CIRCLE_PR_NUMBER}/head" - FETCH_REFS="${FETCH_REFS} +refs/pull/${CIRCLE_PR_NUMBER}/merge:pr/${CIRCLE_PR_NUMBER}/merge" -fi - -# Retrieve the refs. -if [[ -n "${CIRCLE_PR_NUMBER}" ]] -then - git fetch -u origin ${FETCH_REFS} -fi - -# Checkout the PR merge ref. -if [[ -n "${CIRCLE_PR_NUMBER}" ]] -then - git checkout -qf "pr/${CIRCLE_PR_NUMBER}/merge" -fi - -# Check for merge conflicts. -if [[ -n "${CIRCLE_PR_NUMBER}" ]] -then - git branch --merged | grep "pr/${CIRCLE_PR_NUMBER}/head" > /dev/null -fi diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 62f7021a..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,142 +0,0 @@ -version: 2 - -jobs: - build_py38: - working_directory: ~/test - machine: true - environment: - - PYVER: "38" - steps: - - checkout - - run: - name: Fast finish outdated PRs and merge PRs - command: | - ./.circleci/fast_finish_ci_pr_build.sh - ./.circleci/checkout_merge_commit.sh - - run: - name: Install and Configure Miniconda - command: | - source .circleci/install_miniconda.sh - echo "MINICONDA_DIR=${MINICONDA_DIR}" >> "${BASH_ENV}" - - run: - name: Create the test environment - command: | - export CONDA_ENV_TYPE="tst_py${PYVER}" - source .circleci/create_env.sh - echo "CONDA_ENV_PATH=${CONDA_ENV_PATH}" >> "${BASH_ENV}" - - run: - name: Install the package and dependencies - command: | - source "${MINICONDA_DIR}/etc/profile.d/conda.sh" - conda activate "${CONDA_ENV_PATH}" - pip install -e . - - run: - name: Run tests and measure test coverage - command: | - source "${MINICONDA_DIR}/etc/profile.d/conda.sh" - conda activate "${CONDA_ENV_PATH}" - coverage erase - coverage run --source . setup.py test - coverage report -m - - run: - name: Report coverage - command: | - export CONDA_ENV_TYPE="dpl" - source .circleci/create_env.sh - coveralls - - build_py37: - working_directory: ~/test - machine: true - environment: - - PYVER: "37" - steps: - - checkout - - run: - name: Fast finish outdated PRs and merge PRs - command: | - ./.circleci/fast_finish_ci_pr_build.sh - ./.circleci/checkout_merge_commit.sh - - run: - name: Install and Configure Miniconda - command: | - source .circleci/install_miniconda.sh - echo "MINICONDA_DIR=${MINICONDA_DIR}" >> "${BASH_ENV}" - - run: - name: Create the test environment - command: | - export CONDA_ENV_TYPE="tst_py${PYVER}" - source .circleci/create_env.sh - echo "CONDA_ENV_PATH=${CONDA_ENV_PATH}" >> "${BASH_ENV}" - - run: - name: Install the package and dependencies - command: | - source "${MINICONDA_DIR}/etc/profile.d/conda.sh" - conda activate "${CONDA_ENV_PATH}" - pip install -e . - - run: - name: Run tests and measure test coverage - command: | - source "${MINICONDA_DIR}/etc/profile.d/conda.sh" - conda activate "${CONDA_ENV_PATH}" - coverage erase - coverage run --source . setup.py test - coverage report -m - - run: - name: Report coverage - command: | - export CONDA_ENV_TYPE="dpl" - source .circleci/create_env.sh - coveralls - - build_py36: - working_directory: ~/test - machine: true - environment: - - PYVER: "36" - steps: - - checkout - - run: - name: Fast finish outdated PRs and merge PRs - command: | - ./.circleci/fast_finish_ci_pr_build.sh - ./.circleci/checkout_merge_commit.sh - - run: - name: Install and Configure Miniconda - command: | - source .circleci/install_miniconda.sh - echo "MINICONDA_DIR=${MINICONDA_DIR}" >> "${BASH_ENV}" - - run: - name: Create the test environment - command: | - export CONDA_ENV_TYPE="tst_py${PYVER}" - source .circleci/create_env.sh - echo "CONDA_ENV_PATH=${CONDA_ENV_PATH}" >> "${BASH_ENV}" - - run: - name: Install the package and dependencies - command: | - source "${MINICONDA_DIR}/etc/profile.d/conda.sh" - conda activate "${CONDA_ENV_PATH}" - pip install -e . - - run: - name: Run tests and measure test coverage - command: | - source "${MINICONDA_DIR}/etc/profile.d/conda.sh" - conda activate "${CONDA_ENV_PATH}" - coverage erase - coverage run --source . setup.py test - coverage report -m - - run: - name: Report coverage - command: | - export CONDA_ENV_TYPE="dpl" - source .circleci/create_env.sh - coveralls - -workflows: - version: 2 - build_and_test: - jobs: - - build_py38 - - build_py37 - - build_py36 diff --git a/.circleci/create_env.sh b/.circleci/create_env.sh deleted file mode 100644 index 2f061ebc..00000000 --- a/.circleci/create_env.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -l - -# Some reasonable bash constraints. -set -xeuo pipefail - -# Check CONDA_ENV_TYPE was set. -if [ -z "${CONDA_ENV_TYPE}" ]; then - echo "Set $CONDA_ENV_TYPE externally." - exit 1 -fi - -# Activate conda. -source "${MINICONDA_DIR}/etc/profile.d/conda.sh" -conda activate - -# Create a temporary directory for the environment. -export SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -export CONDA_ENV_PREFIX="$(python -c 'import tempfile; print(tempfile.mkdtemp())')" -export CONDA_ENV_PATH="${CONDA_ENV_PREFIX}/${CONDA_ENV_TYPE}" -export CONDA_ENV_SPEC="${SCRIPT_DIR}/environments/${CONDA_ENV_TYPE}.yml" - -# Fill the temporary directory. -conda env create -p "${CONDA_ENV_PATH}" -f "${CONDA_ENV_SPEC}" -conda activate "${CONDA_ENV_PATH}" - -# Unset all bash constraints. -set +xeuo pipefail diff --git a/.circleci/environments/dpl.yml b/.circleci/environments/dpl.yml deleted file mode 100644 index 470a674d..00000000 --- a/.circleci/environments/dpl.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: dask_image_dpl_env - -channels: - - conda-forge - -dependencies: - - python=3.6.* - - pip==18.0 - - wheel==0.31.1 - - coverage==4.5.1 - - coveralls==1.3.0 diff --git a/.circleci/environments/tst_py36.yml b/.circleci/environments/tst_py36.yml deleted file mode 100644 index 34c69b6d..00000000 --- a/.circleci/environments/tst_py36.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: dask_image_py36_env - -channels: - - conda-forge - -dependencies: - - python=3.6.* - - pip==19.0.1 - - wheel==0.32.3 - - coverage==4.5.2 - - flake8==3.7.2 - - pytest==5.2.0 - - pytest-flake8==1.0.4 - - dask==2.8.1 - - numpy==1.16.0 - - scipy==1.2.0 - - scikit-image==0.14.2 - - pims==0.4.1 - - slicerator==0.9.8 - - pip: - - slicerator==0.9.8 diff --git a/.circleci/environments/tst_py37.yml b/.circleci/environments/tst_py37.yml deleted file mode 100644 index 07066d9e..00000000 --- a/.circleci/environments/tst_py37.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: dask_image_py37_env - -channels: - - conda-forge - -dependencies: - - python=3.7.* - - pip==19.0.1 - - wheel==0.32.3 - - coverage==4.5.2 - - flake8==3.7.2 - - pytest==5.2.0 - - pytest-flake8==1.0.4 - - dask==2.8.1 - - numpy==1.16.0 - - scipy==1.2.0 - - scikit-image==0.14.2 - - pims==0.4.1 - - slicerator==0.9.8 - - pip: - - slicerator==0.9.8 diff --git a/.circleci/fast_finish_ci_pr_build.sh b/.circleci/fast_finish_ci_pr_build.sh deleted file mode 100755 index 9aed092c..00000000 --- a/.circleci/fast_finish_ci_pr_build.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -python .gen_ci_support/ff_ci_pr_build.py -v \ - --ci "circle" \ - "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" \ - "${CIRCLE_BUILD_NUM}" \ - "${CIRCLE_PR_NUMBER}" diff --git a/.circleci/install_miniconda.sh b/.circleci/install_miniconda.sh deleted file mode 100755 index d7e1b85f..00000000 --- a/.circleci/install_miniconda.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Some reasonable bash constraints. -set -xeuo pipefail - -# Miniconda Config: -export MINICONDA_VERSION="4.8.2" -export MINICONDA_MD5="87e77f097f6ebb5127c77662dfc3165e" -export MINICONDA_INSTALLER="${HOME}/miniconda.sh" -export MINICONDA_DIR="${HOME}/miniconda" -export MINICONDA_URL="https://repo.continuum.io/miniconda/Miniconda3-py37_${MINICONDA_VERSION}-Linux-x86_64.sh" - -# Install Miniconda. -curl -L "${MINICONDA_URL}" > "${MINICONDA_INSTALLER}" -openssl md5 "${MINICONDA_INSTALLER}" | grep "${MINICONDA_MD5}" -bash "${MINICONDA_INSTALLER}" -b -p "${MINICONDA_DIR}" -rm -f "${MINICONDA_INSTALLER}" - -# Activate conda. -source "${MINICONDA_DIR}/etc/profile.d/conda.sh" -conda activate - -# Configure conda. -conda config --set show_channel_urls true -conda config --set auto_update_conda false -conda config --set add_pip_as_python_dependency true - -# Unset all bash constraints. -set +xeuo pipefail diff --git a/.coveragerc b/.coveragerc index 90ae2bc8..5f05b1d2 100644 --- a/.coveragerc +++ b/.coveragerc @@ -22,7 +22,6 @@ omit = */eggs/* */.eggs/* *tests/* - */travis_pypi_setup.py */versioneer.py */_version.py */_vendor/* diff --git a/.gen_ci_support/ff_ci_pr_build.py b/.gen_ci_support/ff_ci_pr_build.py deleted file mode 100755 index 10d7d277..00000000 --- a/.gen_ci_support/ff_ci_pr_build.py +++ /dev/null @@ -1,192 +0,0 @@ -#!/usr/bin/env python - -""" -Fast finish old PR builds on CIs - -Using various CI's (CircleCI, Travis CI, and AppVeyor) APIs and information -about the current build for the relevant CI, this script checks to see if the -current PR build is the most recent one. It does this by comparing the current -PR build's build number to other build numbers of builds for this PR. If it is -not the most recent build for the PR, then this script exits with a failure. -Thus it can fail the build; stopping it from proceeding further. However, if -it is the most recent build number or if it is not a PR (e.g. a build on a -normal branch), then the build proceeds without issues. -""" - -import argparse -import codecs -import contextlib -import json -import os -import sys - -try: - from urllib.request import ( - Request, - urlopen, - ) -except ImportError: - from urllib2 import ( - Request, - urlopen, - ) - - -def request_json(url, headers={}): - request = Request(url, headers=headers) - with contextlib.closing(urlopen(request)) as response: - reader = codecs.getreader("utf-8") - return json.load(reader(response)) - - -def circle_check_latest_pr_build(repo, pr, build_num): - # Not a PR so it is latest. - if pr is None: - return True - - headers = { - "Accept": "application/json", - } - url = "https://circleci.com/api/v1.1/project/github/{repo}/tree/pull/{pr}" - - builds = request_json(url.format(repo=repo, pr=pr), headers=headers) - - # Parse the response to get a list of build numbers for this PR. - job_name = os.environ.get("CIRCLE_JOB") - same_param_builds = [] - for b in builds: - b_params = b.get("build_parameters") or {} - if b_params.get("CIRCLE_JOB") == job_name: - same_param_builds.append(b) - pr_build_nums = set(map(lambda b: int(b["build_num"]), same_param_builds)) - pr_build_nums.add(build_num) - - # Check if our build number is the latest (largest) - # out of all of the builds for this PR. - if build_num < max(pr_build_nums): - return False - else: - return True - - -def travis_check_latest_pr_build(repo, pr, build_num): - # Not a PR so it is latest. - if pr is None: - return True - - headers = { - "Accept": "application/vnd.travis-ci.2+json", - } - url = "https://api.travis-ci.org/repos/{repo}/builds?event_type=pull_request" - - data = request_json(url.format(repo=repo), headers=headers) - - # Parse the response to get a list of build numbers for this PR. - builds = data["builds"] - pr_builds = filter(lambda b: b["pull_request_number"] == pr, builds) - pr_build_nums = set(map(lambda b: int(b["number"]), pr_builds)) - pr_build_nums.add(build_num) - - # Check if our build number is the latest (largest) - # out of all of the builds for this PR. - if build_num < max(pr_build_nums): - return False - else: - return True - - -def appveyor_check_latest_pr_build(repo, pr, build_num, total_builds=50): - # Not a PR so it is latest. - if pr is None: - return True - - headers = { - "Accept": "application/json", - } - url = "https://ci.appveyor.com/api/projects/{repo}/history?recordsNumber={total_builds}" - - data = request_json(url.format(repo=repo, total_builds=total_builds), headers=headers) - - # Parse the response to get a list of build numbers for this PR. - builds = data["builds"] - pr_builds = filter(lambda b: b.get("pullRequestId", "") == str(pr), builds) - pr_build_nums = set(map(lambda b: int(b["buildNumber"]), pr_builds)) - pr_build_nums.add(build_num) - - # Check if our build number is the latest (largest) - # out of all of the builds for this PR. - if build_num < max(pr_build_nums): - return False - else: - return True - - -def main(*args): - if not args: - args = sys.argv[1:] - - parser = argparse.ArgumentParser( - description=__doc__.strip().splitlines()[0] - ) - parser.add_argument( - "-v", - "--verbose", - action="store_true", - help="Whether to include output", - ) - parser.add_argument( - "--ci", - required=True, - choices=[ - "circle", - "travis", - "appveyor", - ], - help="Which CI to check for an outdated build", - ) - parser.add_argument( - "repo", - type=str, - help="GitHub repo name (e.g. `user/repo`.)", - ) - parser.add_argument( - "bld", - type=int, - help="CI build number for this pull request", - ) - parser.add_argument( - "pr", - nargs="?", - default="", - help="GitHub pull request number of this build", - ) - - params = parser.parse_args(args) - verbose = params.verbose - ci = params.ci - repo = params.repo - bld = params.bld - try: - pr = int(params.pr) - except ValueError: - pr = None - - if verbose: - print("Checking to see if this PR build is outdated.") - - exit_code = 0 - if ci == "circle": - exit_code = int(circle_check_latest_pr_build(repo, pr, bld) is False) - elif ci == "travis": - exit_code = int(travis_check_latest_pr_build(repo, pr, bld) is False) - elif ci == "appveyor": - exit_code = int(appveyor_check_latest_pr_build(repo, pr, bld) is False) - - if verbose and exit_code == 1: - print("Failing outdated PR build to end it.") - - return exit_code - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 31866987..3de40b01 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,6 +4,4 @@ Before you submit a pull request, check that it meets these guidelines: 2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst. -3. The pull request should work for Python 3.6, 3.7, and 3.8. Check - https://travis-ci.org/dask/dask-image/pull_requests - and make sure that the tests pass for all supported Python versions. +3. The pull request should work for Python 3.6, 3.7, and 3.8. diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..efb7f682 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,40 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: ["windows-latest", "ubuntu-latest", "macos-latest"] + python-version: ["3.6", "3.7", "3.8"] + + steps: + - name: Checkout source + uses: actions/checkout@v2 + + - name: Setup Conda Environment + uses: conda-incubator/setup-miniconda@v2 + with: + miniconda-version: "latest" + python-version: ${{ matrix.python-version }} + environment-file: continuous_integration/environment-${{ matrix.python-version }}.yml + activate-environment: dask-image-testenv + auto-activate-base: false + + - name: Install dask-image + shell: bash -l {0} + run: | + conda activate dask-image-testenv + python -m pip install -e . + conda list + + - name: Run tests + shell: bash -l {0} + run: pytest -v diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6ca8e97f..00000000 --- a/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -sudo: false - -language: generic - -os: osx -osx_image: xcode9.4 - -env: - - PYVER="38" - - PYVER="37" - - PYVER="36" - -install: - # Install and Configure Miniconda. - - source .travis_support/install_miniconda.sh - - # Create the test environment. - - export CONDA_ENV_TYPE="tst_py${PYVER}" - - source .travis_support/create_env.sh - - # Install the package and dependencies. - - pip install -e . - -# Run tests and measure test coverage. -script: - - coverage erase - - coverage run --source . setup.py test - - coverage report -m - -# Report coverage. -after_success: - - export CONDA_ENV_TYPE="dpl" - - source .travis_support/create_env.sh - - coveralls - -# Disable email notifications. -notifications: - email: false diff --git a/.travis_support/create_env.sh b/.travis_support/create_env.sh deleted file mode 100755 index 988a515c..00000000 --- a/.travis_support/create_env.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -# Some reasonable bash constraints. -set -xeuo pipefail - -# Check CONDA_ENV_TYPE was set. -if [ -z "${CONDA_ENV_TYPE}" ]; then - echo "Set $CONDA_ENV_TYPE externally." - exit 1 -fi - -# Activate conda. -conda activate - -# Create a temporary directory for the environment. -export CONDA_ENV_PREFIX="$(python -c 'import tempfile; print(tempfile.mkdtemp())')" -export CONDA_ENV_PATH="${CONDA_ENV_PREFIX}/${CONDA_ENV_TYPE}" -export CONDA_ENV_SPEC=".travis_support/environments/${CONDA_ENV_TYPE}.yml" - -# Fill the temporary directory. -conda env create -p "${CONDA_ENV_PATH}" -f "${CONDA_ENV_SPEC}" -conda activate "${CONDA_ENV_PATH}" - -# The Python library pims requres matplotlib with the 'Agg' backend -export MPLBACKEND='Agg' - -# Unset all bash constraints. -set +xeuo pipefail diff --git a/.travis_support/environments/dpl.yml b/.travis_support/environments/dpl.yml deleted file mode 100644 index 8dd0e200..00000000 --- a/.travis_support/environments/dpl.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: dask_image_dpl_env - -channels: - - defaults - - conda-forge - -dependencies: - - python=3.6.* - - pip==18.0 - - wheel==0.31.1 - - coverage==4.5.1 - - coveralls==1.3.0 diff --git a/.travis_support/environments/tst_py36.yml b/.travis_support/environments/tst_py36.yml deleted file mode 100644 index 81503b93..00000000 --- a/.travis_support/environments/tst_py36.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: dask_image_py36_env - -channels: - - conda-forge - -dependencies: - - python=3.6.* - - pip==19.0.1 - - wheel==0.32.3 - - coverage==4.5.2 - - flake8==3.7.2 - - numpy==1.16.0 - - scipy==1.2.0 - - pims==0.4.1 - - slicerator==0.9.8 - - pip: - - slicerator==0.9.8 - - pytest==5.2.0 - - pytest-flake8==1.0.4 - - dask==2.8.1 - - scikit-image==0.14.2 - diff --git a/.travis_support/environments/tst_py37.yml b/.travis_support/environments/tst_py37.yml deleted file mode 100644 index 779ba76a..00000000 --- a/.travis_support/environments/tst_py37.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: dask_image_py37_env - -channels: - - conda-forge - -dependencies: - - python=3.7.* - - pip==19.0.1 - - wheel==0.32.3 - - coverage==4.5.2 - - flake8==3.7.2 - - numpy==1.16.0 - - scipy==1.2.0 - - pims==0.4.1 - - slicerator==0.9.8 - - pip: - - slicerator==0.9.8 - - pytest==5.2.0 - - pytest-flake8==1.0.4 - - dask==2.8.1 - - scikit-image==0.14.2 diff --git a/.travis_support/install_miniconda.sh b/.travis_support/install_miniconda.sh deleted file mode 100755 index ca9677fa..00000000 --- a/.travis_support/install_miniconda.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Some reasonable bash constraints. -set -xeuo pipefail - -# Miniconda Config: -export MINICONDA_VERSION="4.8.2" -export MINICONDA_MD5="e0320c20ea13d04407424ecf57b70eaf" -export MINICONDA_INSTALLER="${HOME}/miniconda.sh" -export MINICONDA_DIR="${HOME}/miniconda" -export MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-py37_${MINICONDA_VERSION}-MacOSX-x86_64.sh" - -# Install Miniconda. -curl -L "${MINICONDA_URL}" > "${MINICONDA_INSTALLER}" -openssl md5 "${MINICONDA_INSTALLER}" | grep "${MINICONDA_MD5}" -bash "${MINICONDA_INSTALLER}" -b -p "${MINICONDA_DIR}" -rm -f "${MINICONDA_INSTALLER}" - -# Activate conda. -source "${MINICONDA_DIR}/etc/profile.d/conda.sh" -conda activate - -# Configure conda. -conda config --set show_channel_urls true -conda config --set auto_update_conda false -conda config --set add_pip_as_python_dependency true - -# Unset all bash constraints. -set +xeuo pipefail diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 1c530127..e5511b11 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -130,52 +130,32 @@ Running tests locally To setup a local testing environment that matches the test environments we use for our continuous integration services, you can use the ``.yml`` -conda environment files included in the dask-image repository. - -The test environment ``.yml`` files are included in hidden folders: - -- Linux test environment files are found in ``.circleci/environments`` -- MacOS test environment files are found in ``.travis_support/environments`` -- Windows test environment files are found in ``.appveyor_support\environments`` +conda environment files included in the ``continuous_integration`` folder +in the dask-image repository. There is a separate environment file for each supported Python version. -.. note:: - If you do not have Anaconda/miniconda installed, please follow - `these instructions `_. - - We will use conda to `create an environment from a file `_ (``conda env create -f name-of-environment-file.yml``). +.. note:: + If you do not have Anaconda/miniconda installed, please follow + `these instructions `_. -For example, to make a Python 3.8 test environment on Linux, MacOS, or Windows, -we would use the command shown in the table below: - -.. list-table:: Creating a test environment for dask-image with Python 3.8 - :widths: 20 50 - :header-rows: 1 - - * - OS - - conda command - * - Linux - - ``conda env create -f .circleci/environments/tst_py38.yml`` - * - MacOS - - ``conda env create -f .travis_support/environment/tst_py38.yml`` - * - Windows - - ``conda env create -f .appveyor_support\environments\tst_py38.yml`` +.. code-block:: console + $ conda env create -f continuous_integration/environment-latest.yml -This command will create a new conda test environment for Python 3.8, -called ``dask_image_py38_env`` with all the dependencies. +This command will create a new conda test environment +called ``dask-image-testenv`` with all required dependencies. Now you can activate your new testing environment with:: .. code-block:: console - $ conda activate dask_image_py38_env + $ conda activate dask-image-testenv Finally, install the development version of dask-image:: diff --git a/README.rst b/README.rst index 412d1cb5..e20e906f 100644 --- a/README.rst +++ b/README.rst @@ -11,9 +11,9 @@ dask-image :target: https://anaconda.org/conda-forge/dask-image :alt: conda-forge -.. image:: https://img.shields.io/travis/dask/dask-image/main.svg - :target: https://travis-ci.org/dask/dask-image - :alt: Travis CI +.. image:: https://github.com/dask/dask-image/workflows/CI/badge.svg + :target: https://github.com/dask/dask-image/actions + :alt: GitHub Actions CI .. image:: https://readthedocs.org/projects/dask-image/badge/?version=latest :target: https://dask-image.readthedocs.io/en/latest/?badge=latest diff --git a/.appveyor_support/environments/tst_py36.yml b/continuous_integration/environment-3.6.yml similarity index 76% rename from .appveyor_support/environments/tst_py36.yml rename to continuous_integration/environment-3.6.yml index 22b28ebb..9f173d68 100644 --- a/.appveyor_support/environments/tst_py36.yml +++ b/continuous_integration/environment-3.6.yml @@ -1,4 +1,4 @@ -name: dask_image_py36_env +name: dask-image-testenv channels: - conda-forge @@ -16,6 +16,4 @@ dependencies: - scipy==1.2.0 - scikit-image==0.14.2 - pims==0.4.1 - - slicerator==0.9.8 - - pip: - - slicerator==0.9.8 + - slicerator diff --git a/.appveyor_support/environments/tst_py37.yml b/continuous_integration/environment-3.7.yml similarity index 76% rename from .appveyor_support/environments/tst_py37.yml rename to continuous_integration/environment-3.7.yml index 88b6b810..b86e35bc 100644 --- a/.appveyor_support/environments/tst_py37.yml +++ b/continuous_integration/environment-3.7.yml @@ -1,4 +1,4 @@ -name: dask_image_py37_env +name: dask-image-testenv channels: - conda-forge @@ -16,6 +16,4 @@ dependencies: - scipy==1.2.0 - scikit-image==0.14.2 - pims==0.4.1 - - slicerator==0.9.8 - - pip: - - slicerator==0.9.8 + - slicerator diff --git a/.travis_support/environments/tst_py38.yml b/continuous_integration/environment-3.8-dev.yml similarity index 81% rename from .travis_support/environments/tst_py38.yml rename to continuous_integration/environment-3.8-dev.yml index 02be43bc..4f96c73b 100644 --- a/.travis_support/environments/tst_py38.yml +++ b/continuous_integration/environment-3.8-dev.yml @@ -1,4 +1,4 @@ -name: dask_image_py38_env +name: dask-image-testenv channels: - conda-forge @@ -16,4 +16,5 @@ dependencies: - scipy==1.3.2 - scikit-image==0.16.2 - pims==0.4.1 - - slicerator==1.0.0 + - slicerator + # dev dependencies diff --git a/.circleci/environments/tst_py38.yml b/continuous_integration/environment-3.8.yml similarity index 84% rename from .circleci/environments/tst_py38.yml rename to continuous_integration/environment-3.8.yml index 02be43bc..386b4368 100644 --- a/.circleci/environments/tst_py38.yml +++ b/continuous_integration/environment-3.8.yml @@ -1,4 +1,4 @@ -name: dask_image_py38_env +name: dask-image-testenv channels: - conda-forge @@ -16,4 +16,4 @@ dependencies: - scipy==1.3.2 - scikit-image==0.16.2 - pims==0.4.1 - - slicerator==1.0.0 + - slicerator diff --git a/.appveyor_support/environments/tst_py38.yml b/continuous_integration/environment-latest.yml similarity index 84% rename from .appveyor_support/environments/tst_py38.yml rename to continuous_integration/environment-latest.yml index 02be43bc..386b4368 100644 --- a/.appveyor_support/environments/tst_py38.yml +++ b/continuous_integration/environment-latest.yml @@ -1,4 +1,4 @@ -name: dask_image_py38_env +name: dask-image-testenv channels: - conda-forge @@ -16,4 +16,4 @@ dependencies: - scipy==1.3.2 - scikit-image==0.16.2 - pims==0.4.1 - - slicerator==1.0.0 + - slicerator