From 5753affa628ecb93570b41ae4afb84b44c23a324 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 6 Jul 2016 08:34:58 -0700 Subject: [PATCH 1/7] double quotes --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index a512851c75..62ac95c82e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,7 +20,7 @@ install: # Prepend newly installed Python to the PATH of this build (this cannot be # done from inside the powershell script as it would require to restart # the parent CMD process). - - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" + - ""SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"" # Check that we have the expected version and architecture for Python - "python --version" From 1dedd496c523f4e32bd3dc2c2ead73f0214ebbfc Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 6 Jul 2016 08:38:36 -0700 Subject: [PATCH 2/7] different quotes --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 62ac95c82e..0fbe1e2f5d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,7 +20,7 @@ install: # Prepend newly installed Python to the PATH of this build (this cannot be # done from inside the powershell script as it would require to restart # the parent CMD process). - - ""SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"" + - "SET ""PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%""" # Check that we have the expected version and architecture for Python - "python --version" From e2962965b56a259ec00449658e3f4613ea4dddce Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 6 Jul 2016 08:41:58 -0700 Subject: [PATCH 3/7] escape quotes --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 0fbe1e2f5d..dc5deef7c4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,7 +20,7 @@ install: # Prepend newly installed Python to the PATH of this build (this cannot be # done from inside the powershell script as it would require to restart # the parent CMD process). - - "SET ""PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%""" + - "SET \"\"PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%\"\"" # Check that we have the expected version and architecture for Python - "python --version" From e579c7936cf4b72806b00df80be15050aa1b7009 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 6 Jul 2016 10:59:08 -0700 Subject: [PATCH 4/7] follow metpys example --- appveyor.yml | 51 +++++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index dc5deef7c4..7772280bf2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,40 +1,43 @@ # CI on Windows via appveyor -# This file was based on pandas' and xarray's appveyor.yml -# This file was based on Olivier Grisel's python-appveyor-demo +# This file was initially based on pandas' and xarray's appveyor.yml +# This file was initially based on Olivier Grisel's python-appveyor-demo +# As of 2016-07, this file was based on MetPy's appveyor.yml environment: + CONDA_PATH: "C:\\Miniconda" + matrix: - - PYTHON: "C:\\Python27-conda32" - PYTHON_VERSION: "2.7" - PYTHON_ARCH: "32" + - PYTHON_VERSION: "2.7" + - PYTHON_VERSION: "3.4" + #- PYTHON_VERSION: "3.5" - - PYTHON: "C:\\Python34-conda64" - PYTHON_VERSION: "3.4" - PYTHON_ARCH: "64" +platform: + - x86 + - x64 install: - # Install miniconda Python - - "powershell ./ci/install_python.ps1" - - # Prepend newly installed Python to the PATH of this build (this cannot be - # done from inside the powershell script as it would require to restart - # the parent CMD process). - - "SET \"\"PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%\"\"" - - # Check that we have the expected version and architecture for Python - - "python --version" - - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" + # Use the pre-installed Miniconda for the desired arch + - ps: if($env:PYTHON_VERSION -eq '3.5') + { $env:CONDA_PATH="$($env:CONDA_PATH)35" } + - ps: if($env:TARGET_ARCH -eq 'x64') + { $env:CONDA_PATH="$($env:CONDA_PATH)-x64" } + - ps: $env:path="$($env:CONDA_PATH);$($env:CONDA_PATH)\Scripts;$($env:CONDA_PATH)\Library\bin;C:\cygwin\bin;$($env:PATH)" + - cmd: conda config --set always_yes yes --set changeps1 no + - cmd: conda update -q conda + # Useful for debugging any issues with conda + - cmd: conda info -a # install depenencies - - "conda create -n test_env --yes --quiet python=%PYTHON_VERSION% pip numpy scipy=0.16.0 pandas nose pytz ephem numba" - - "activate test_env" - - "conda list" + - cmd: conda create -n test_env --yes --quiet python=%PYTHON_VERSION% pip numpy scipy=0.16.0 pandas nose pytz ephem numba + - cmd: activate test_env + - cmd: python --version + - cmd: conda list # install pvlib - - "python setup.py install" + - cmd: pip install -e . build: false test_script: - - "py.test -v pvlib" + - cmd: py.test -v pvlib From 795a3891b899887bea2212f3da194baeedea2d41 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 6 Jul 2016 11:04:52 -0700 Subject: [PATCH 5/7] add pytest. improve comments --- appveyor.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 7772280bf2..58ff958710 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,5 @@ # CI on Windows via appveyor -# This file was initially based on pandas' and xarray's appveyor.yml -# This file was initially based on Olivier Grisel's python-appveyor-demo -# As of 2016-07, this file was based on MetPy's appveyor.yml +# This file is based on MetPy's appveyor.yml environment: @@ -9,8 +7,8 @@ environment: matrix: - PYTHON_VERSION: "2.7" - - PYTHON_VERSION: "3.4" - #- PYTHON_VERSION: "3.5" + #- PYTHON_VERSION: "3.4" + - PYTHON_VERSION: "3.5" platform: - x86 @@ -29,7 +27,7 @@ install: - cmd: conda info -a # install depenencies - - cmd: conda create -n test_env --yes --quiet python=%PYTHON_VERSION% pip numpy scipy=0.16.0 pandas nose pytz ephem numba + - cmd: conda create -n test_env --yes --quiet python=%PYTHON_VERSION% pip numpy scipy=0.16.0 pandas nose pytest pytz ephem numba - cmd: activate test_env - cmd: python --version - cmd: conda list From 5fd3efb4e800b79605381830a538c9c0f3a9b99a Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 6 Jul 2016 11:34:27 -0700 Subject: [PATCH 6/7] remove install_python.ps1. add whatsnew note --- appveyor.yml | 4 +- ci/install_python.ps1 | 93 -------------------------- docs/sphinx/source/whatsnew/v0.4.0.txt | 2 + 3 files changed, 4 insertions(+), 95 deletions(-) delete mode 100644 ci/install_python.ps1 diff --git a/appveyor.yml b/appveyor.yml index 58ff958710..08c939e5f3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,8 +7,8 @@ environment: matrix: - PYTHON_VERSION: "2.7" - #- PYTHON_VERSION: "3.4" - - PYTHON_VERSION: "3.5" + - PYTHON_VERSION: "3.4" + #- PYTHON_VERSION: "3.5" platform: - x86 diff --git a/ci/install_python.ps1 b/ci/install_python.ps1 deleted file mode 100644 index 71b913ef20..0000000000 --- a/ci/install_python.ps1 +++ /dev/null @@ -1,93 +0,0 @@ -# Sample script to install Python and pip under Windows -# Authors: Olivier Grisel, Jonathan Helmus and Kyle Kastner -# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/ - -$MINICONDA_URL = "http://repo.continuum.io/miniconda/" -$BASE_URL = "https://www.python.org/ftp/python/" - - -function DownloadMiniconda ($python_version, $platform_suffix) { - $webclient = New-Object System.Net.WebClient - if ($python_version -like "3.*") { - $filename = "Miniconda3-latest-Windows-" + $platform_suffix + ".exe" - } else { - $filename = "Miniconda2-latest-Windows-" + $platform_suffix + ".exe" - } - $url = $MINICONDA_URL + $filename - - $basedir = $pwd.Path + "\" - $filepath = $basedir + $filename - if (Test-Path $filename) { - Write-Host "Reusing" $filepath - return $filepath - } - - # Download and retry up to 3 times in case of network transient errors. - Write-Host "Downloading" $filename "from" $url - $retry_attempts = 2 - for($i=0; $i -lt $retry_attempts; $i++){ - try { - $webclient.DownloadFile($url, $filepath) - break - } - Catch [Exception]{ - Start-Sleep 1 - } - } - if (Test-Path $filepath) { - Write-Host "File saved at" $filepath - } else { - # Retry once to get the error message if any at the last try - $webclient.DownloadFile($url, $filepath) - } - return $filepath -} - - -function InstallMiniconda ($python_version, $architecture, $python_home) { - Write-Host "Installing Python" $python_version "for" $architecture "bit architecture to" $python_home - if (Test-Path $python_home) { - Write-Host $python_home "already exists, skipping." - return $false - } - if ($architecture -eq "32") { - $platform_suffix = "x86" - } else { - $platform_suffix = "x86_64" - } - $filepath = DownloadMiniconda $python_version $platform_suffix - Write-Host "Installing" $filepath "to" $python_home - $install_log = $python_home + ".log" - $args = "/S /D=$python_home" - Write-Host $filepath $args - Start-Process -FilePath $filepath -ArgumentList $args -Wait -Passthru - if (Test-Path $python_home) { - Write-Host "Python $python_version ($architecture) installation complete" - } else { - Write-Host "Failed to install Python in $python_home" - Get-Content -Path $install_log - Exit 1 - } -} - - -function InstallMinicondaPip ($python_home) { - $pip_path = $python_home + "\Scripts\pip.exe" - $conda_path = $python_home + "\Scripts\conda.exe" - if (-not(Test-Path $pip_path)) { - Write-Host "Installing pip..." - $args = "install --yes pip" - Write-Host $conda_path $args - Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru - } else { - Write-Host "pip already installed." - } -} - - -function main () { - InstallMiniconda $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON - InstallMinicondaPip $env:PYTHON -} - -main diff --git a/docs/sphinx/source/whatsnew/v0.4.0.txt b/docs/sphinx/source/whatsnew/v0.4.0.txt index 8602ba79c7..5855f9d4d2 100644 --- a/docs/sphinx/source/whatsnew/v0.4.0.txt +++ b/docs/sphinx/source/whatsnew/v0.4.0.txt @@ -39,6 +39,8 @@ Other ~~~~~ * Switch to the py.test testing framework. (:issue:`204`) +* Reconfigure Appveyor CI builds and resolve an issue in which the command + line length was too long. (:issue:`205`) Code Contributors From b2a6675d6dc1f7cf9b7030dfe212cebf12e33014 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 6 Jul 2016 11:42:07 -0700 Subject: [PATCH 7/7] wrong issue number --- docs/sphinx/source/whatsnew/v0.4.0.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx/source/whatsnew/v0.4.0.txt b/docs/sphinx/source/whatsnew/v0.4.0.txt index 5855f9d4d2..618290693d 100644 --- a/docs/sphinx/source/whatsnew/v0.4.0.txt +++ b/docs/sphinx/source/whatsnew/v0.4.0.txt @@ -40,7 +40,7 @@ Other * Switch to the py.test testing framework. (:issue:`204`) * Reconfigure Appveyor CI builds and resolve an issue in which the command - line length was too long. (:issue:`205`) + line length was too long. (:issue:`207`) Code Contributors