From 14b7fae5527dbad6e73c373be993a4965132b8a6 Mon Sep 17 00:00:00 2001 From: Joseph Hamman Date: Tue, 13 Feb 2018 10:28:44 -0800 Subject: [PATCH 01/10] test sphinx doc build on travis --- .travis.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 068ea3cc788..5664e9eb3fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,6 +45,8 @@ matrix: env: CONDA_ENV=py36-rasterio1.0alpha - python: 3.6 env: CONDA_ENV=py36-zarr-dev + - python: 3.5 + env: CONDA_ENV=docs allow_failures: - python: 3.6 env: @@ -86,16 +88,23 @@ before_install: - conda info -a install: - - conda env create --file ci/requirements-$CONDA_ENV.yml + - if [[ "$CONDA_ENV" == "docs" ]]; then + conda env create --file doc/environment.yml; + else + conda env create --file ci/requirements-$CONDA_ENV.yml; + fi - source activate test_env - conda list - - python setup.py install + - pip install --no-deps -e . - python xarray/util/print_versions.py script: - flake8 -j auto xarray - python -OO -c "import xarray" - py.test xarray --cov=xarray --cov-config ci/.coveragerc --cov-report term-missing --verbose $EXTRA_FLAGS + - if [[ "$CONDA_ENV" == "docs" ]]; then + sphinx-build -nW -b html -d _build/doctrees doc _build/html + fi after_success: - coveralls From 5018f837805537b5f6e7308ecc9218e9243bea79 Mon Sep 17 00:00:00 2001 From: Joseph Hamman Date: Tue, 13 Feb 2018 11:36:31 -0800 Subject: [PATCH 02/10] test_env name for all environments --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5664e9eb3fe..c67edba3f5b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -89,9 +89,9 @@ before_install: install: - if [[ "$CONDA_ENV" == "docs" ]]; then - conda env create --file doc/environment.yml; + conda env create -n test_env --file doc/environment.yml; else - conda env create --file ci/requirements-$CONDA_ENV.yml; + conda env create -n test_env --file ci/requirements-$CONDA_ENV.yml; fi - source activate test_env - conda list From 7122332c916830e415b1503be9ad18af46cbcceb Mon Sep 17 00:00:00 2001 From: Joseph Hamman Date: Tue, 13 Feb 2018 11:37:53 -0800 Subject: [PATCH 03/10] don't run unit tests on doc build --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c67edba3f5b..d3e53b3f30b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -101,9 +101,10 @@ install: script: - flake8 -j auto xarray - python -OO -c "import xarray" - - py.test xarray --cov=xarray --cov-config ci/.coveragerc --cov-report term-missing --verbose $EXTRA_FLAGS - if [[ "$CONDA_ENV" == "docs" ]]; then sphinx-build -nW -b html -d _build/doctrees doc _build/html + else: + py.test xarray --cov=xarray --cov-config ci/.coveragerc --cov-report term-missing --verbose $EXTRA_FLAGS fi after_success: From 80d203e97e962912744c5ec27b6545518370f31d Mon Sep 17 00:00:00 2001 From: Joseph Hamman Date: Tue, 13 Feb 2018 13:19:58 -0800 Subject: [PATCH 04/10] fix travis yaml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d3e53b3f30b..89a204e6875 100644 --- a/.travis.yml +++ b/.travis.yml @@ -103,7 +103,7 @@ script: - python -OO -c "import xarray" - if [[ "$CONDA_ENV" == "docs" ]]; then sphinx-build -nW -b html -d _build/doctrees doc _build/html - else: + else py.test xarray --cov=xarray --cov-config ci/.coveragerc --cov-report term-missing --verbose $EXTRA_FLAGS fi From 0684307743f567bc5e22ed86ba663bffb384a624 Mon Sep 17 00:00:00 2001 From: Joseph Hamman Date: Tue, 13 Feb 2018 13:49:25 -0800 Subject: [PATCH 05/10] semicolons --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 89a204e6875..21fc03b96e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -102,9 +102,9 @@ script: - flake8 -j auto xarray - python -OO -c "import xarray" - if [[ "$CONDA_ENV" == "docs" ]]; then - sphinx-build -nW -b html -d _build/doctrees doc _build/html + sphinx-build -nW -b html -d _build/doctrees doc _build/html; else - py.test xarray --cov=xarray --cov-config ci/.coveragerc --cov-report term-missing --verbose $EXTRA_FLAGS + py.test xarray --cov=xarray --cov-config ci/.coveragerc --cov-report term-missing --verbose $EXTRA_FLAGS; fi after_success: From 1abfdbc314e6d85994539ba1ac507c627a5fd3e2 Mon Sep 17 00:00:00 2001 From: Joseph Hamman Date: Tue, 13 Feb 2018 14:07:43 -0800 Subject: [PATCH 06/10] sphinx_rtd_theme --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 21fc03b96e6..045a445f030 100644 --- a/.travis.yml +++ b/.travis.yml @@ -90,6 +90,7 @@ before_install: install: - if [[ "$CONDA_ENV" == "docs" ]]; then conda env create -n test_env --file doc/environment.yml; + conda install -c conda-forge sphinx_rtd_theme; else conda env create -n test_env --file ci/requirements-$CONDA_ENV.yml; fi From 7587747af8a03b2e78616a480aaf1974767b7cff Mon Sep 17 00:00:00 2001 From: Joseph Hamman Date: Tue, 13 Feb 2018 14:42:10 -0800 Subject: [PATCH 07/10] install theme after the activating environment --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 045a445f030..19419790f17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -90,7 +90,6 @@ before_install: install: - if [[ "$CONDA_ENV" == "docs" ]]; then conda env create -n test_env --file doc/environment.yml; - conda install -c conda-forge sphinx_rtd_theme; else conda env create -n test_env --file ci/requirements-$CONDA_ENV.yml; fi @@ -103,6 +102,7 @@ script: - flake8 -j auto xarray - python -OO -c "import xarray" - if [[ "$CONDA_ENV" == "docs" ]]; then + conda install -c conda-forge sphinx_rtd_theme; sphinx-build -nW -b html -d _build/doctrees doc _build/html; else py.test xarray --cov=xarray --cov-config ci/.coveragerc --cov-report term-missing --verbose $EXTRA_FLAGS; From 300a07f9f6661717b5d9327f26ff8df494d5e11c Mon Sep 17 00:00:00 2001 From: Joseph Hamman Date: Thu, 15 Feb 2018 07:29:02 -0800 Subject: [PATCH 08/10] fix list formatting in installing.rst --- doc/installing.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/installing.rst b/doc/installing.rst index b6ec2bd841f..b9a1fff59cc 100644 --- a/doc/installing.rst +++ b/doc/installing.rst @@ -78,6 +78,7 @@ Testing ------- To run the test suite after installing xarray, first install (via pypi or conda) + - `py.test `__: Simple unit testing library - `mock `__: additional testing library required for python version 2 From 5de90bc59cad25a0114430ea3f9809764c314b94 Mon Sep 17 00:00:00 2001 From: Joseph Hamman Date: Thu, 15 Feb 2018 07:30:01 -0800 Subject: [PATCH 09/10] fail travis doc build only when full errors (not warnings) are found --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 19419790f17..ee8ffcc4d5e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -103,7 +103,7 @@ script: - python -OO -c "import xarray" - if [[ "$CONDA_ENV" == "docs" ]]; then conda install -c conda-forge sphinx_rtd_theme; - sphinx-build -nW -b html -d _build/doctrees doc _build/html; + sphinx-build -n -b html -d _build/doctrees doc _build/html; else py.test xarray --cov=xarray --cov-config ci/.coveragerc --cov-report term-missing --verbose $EXTRA_FLAGS; fi From 0f669670f864a52d046786069e4e62bc7859d635 Mon Sep 17 00:00:00 2001 From: Joseph Hamman Date: Thu, 15 Feb 2018 08:41:21 -0800 Subject: [PATCH 10/10] flake8 for docs build --- doc/environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/environment.yml b/doc/environment.yml index b14fba351c1..2758612c139 100644 --- a/doc/environment.yml +++ b/doc/environment.yml @@ -18,3 +18,4 @@ dependencies: - sphinx-gallery - zarr - iris + - flake8