Skip to content

Commit 38c0082

Browse files
author
dacoex
committed
Merge remote-tracking branch 'refs/remotes/pvlib/master'
2 parents 612e9ea + 35b6e7b commit 38c0082

31 files changed

+204
-5307
lines changed

.travis.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,8 @@ matrix:
1414
env: CONDA_ENV=py27
1515
- python: 3.4
1616
env: CONDA_ENV=py34
17-
addons:
18-
apt:
19-
packages:
20-
- libatlas-dev
21-
- libatlas-base-dev
22-
- liblapack-dev
23-
- gfortran
24-
- libgmp-dev
25-
- libmpfr-dev
2617
- python: 3.5
2718
env: CONDA_ENV=py35
28-
addons:
29-
apt:
30-
packages:
31-
- libatlas-dev
32-
- libatlas-base-dev
33-
- liblapack-dev
34-
- gfortran
35-
- libgmp-dev
36-
- libmpfr-dev
3719

3820
addons:
3921
apt:
@@ -68,7 +50,7 @@ install:
6850
- echo $PATH
6951
- ls -l /home/travis/miniconda/envs/test_env/lib
7052
#- pip install . # use pip to automatically install anything not in the yml files (i.e. numpy/scipy/pandas for py3*)
71-
- pip install scipy # won't do anything if already installed
53+
#- pip install scipy # won't do anything if already installed
7254
- python setup.py install
7355

7456
script:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ pvlib-python
22
============
33

44
[![TravisCI](https://travis-ci.org/pvlib/pvlib-python.svg?branch=master)](https://travis-ci.org/pvlib/pvlib-python)
5+
[![Build status](https://ci.appveyor.com/api/projects/status/gr2eyhc84tvtkopk?svg=true)](https://ci.appveyor.com/project/wholmgren/pvlib-python-fv2to)
56
[![Coverage Status](https://img.shields.io/coveralls/pvlib/pvlib-python.svg)](https://coveralls.io/r/pvlib/pvlib-python)
67
[![Documentation Status](https://readthedocs.org/projects/pvlib-python/badge/?version=latest)](http://pvlib-python.readthedocs.org/en/latest/)
78
[![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.20562.svg)](http://dx.doi.org/10.5281/zenodo.20562)

appveyor.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# CI on Windows via appveyor
2+
# This file was based on pandas' and xarray's appveyor.yml
3+
# This file was based on Olivier Grisel's python-appveyor-demo
4+
5+
environment:
6+
global:
7+
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
8+
# /E:ON and /V:ON options are not enabled in the batch script intepreter
9+
# See: http://stackoverflow.com/a/13751649/163740
10+
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
11+
12+
matrix:
13+
- PYTHON: "C:\\Python27-conda32"
14+
PYTHON_VERSION: "2.7"
15+
PYTHON_ARCH: "32"
16+
17+
- PYTHON: "C:\\Python34-conda64"
18+
PYTHON_VERSION: "3.4"
19+
PYTHON_ARCH: "64"
20+
21+
install:
22+
# Install miniconda Python
23+
- "powershell ./ci/install_python.ps1"
24+
25+
# Prepend newly installed Python to the PATH of this build (this cannot be
26+
# done from inside the powershell script as it would require to restart
27+
# the parent CMD process).
28+
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
29+
30+
# Check that we have the expected version and architecture for Python
31+
- "python --version"
32+
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
33+
34+
# install xray and depenencies
35+
- "conda install --yes --quiet pip numpy scipy pandas nose pytz ephem numba"
36+
- "python setup.py install"
37+
38+
build: false
39+
40+
test_script:
41+
- "nosetests -v pvlib"

ci/install_python.ps1

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Sample script to install Python and pip under Windows
2+
# Authors: Olivier Grisel, Jonathan Helmus and Kyle Kastner
3+
# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
4+
5+
$MINICONDA_URL = "http://repo.continuum.io/miniconda/"
6+
$BASE_URL = "https://www.python.org/ftp/python/"
7+
8+
9+
function DownloadMiniconda ($python_version, $platform_suffix) {
10+
$webclient = New-Object System.Net.WebClient
11+
if ($python_version -eq "3.4") {
12+
$filename = "Miniconda3-3.7.3-Windows-" + $platform_suffix + ".exe"
13+
} else {
14+
$filename = "Miniconda-3.7.3-Windows-" + $platform_suffix + ".exe"
15+
}
16+
$url = $MINICONDA_URL + $filename
17+
18+
$basedir = $pwd.Path + "\"
19+
$filepath = $basedir + $filename
20+
if (Test-Path $filename) {
21+
Write-Host "Reusing" $filepath
22+
return $filepath
23+
}
24+
25+
# Download and retry up to 3 times in case of network transient errors.
26+
Write-Host "Downloading" $filename "from" $url
27+
$retry_attempts = 2
28+
for($i=0; $i -lt $retry_attempts; $i++){
29+
try {
30+
$webclient.DownloadFile($url, $filepath)
31+
break
32+
}
33+
Catch [Exception]{
34+
Start-Sleep 1
35+
}
36+
}
37+
if (Test-Path $filepath) {
38+
Write-Host "File saved at" $filepath
39+
} else {
40+
# Retry once to get the error message if any at the last try
41+
$webclient.DownloadFile($url, $filepath)
42+
}
43+
return $filepath
44+
}
45+
46+
47+
function InstallMiniconda ($python_version, $architecture, $python_home) {
48+
Write-Host "Installing Python" $python_version "for" $architecture "bit architecture to" $python_home
49+
if (Test-Path $python_home) {
50+
Write-Host $python_home "already exists, skipping."
51+
return $false
52+
}
53+
if ($architecture -eq "32") {
54+
$platform_suffix = "x86"
55+
} else {
56+
$platform_suffix = "x86_64"
57+
}
58+
$filepath = DownloadMiniconda $python_version $platform_suffix
59+
Write-Host "Installing" $filepath "to" $python_home
60+
$install_log = $python_home + ".log"
61+
$args = "/S /D=$python_home"
62+
Write-Host $filepath $args
63+
Start-Process -FilePath $filepath -ArgumentList $args -Wait -Passthru
64+
if (Test-Path $python_home) {
65+
Write-Host "Python $python_version ($architecture) installation complete"
66+
} else {
67+
Write-Host "Failed to install Python in $python_home"
68+
Get-Content -Path $install_log
69+
Exit 1
70+
}
71+
}
72+
73+
74+
function InstallMinicondaPip ($python_home) {
75+
$pip_path = $python_home + "\Scripts\pip.exe"
76+
$conda_path = $python_home + "\Scripts\conda.exe"
77+
if (-not(Test-Path $pip_path)) {
78+
Write-Host "Installing pip..."
79+
$args = "install --yes pip"
80+
Write-Host $conda_path $args
81+
Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru
82+
} else {
83+
Write-Host "pip already installed."
84+
}
85+
}
86+
87+
88+
function main () {
89+
InstallMiniconda $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON
90+
InstallMinicondaPip $env:PYTHON
91+
}
92+
93+
main

ci/requirements-py34.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: test_env
22
dependencies:
33
- python=3.4
4+
- numpy
5+
- scipy
6+
- pandas
47
- nose
58
- pytz
69
- ephem
7-
#- numba
10+
- numba
811
- pip:
9-
- numpy
10-
- pandas
1112
- coveralls

ci/requirements-py35.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: test_env
22
dependencies:
33
- python=3.5
4+
- numpy
5+
- scipy
6+
- pandas
47
- nose
58
- pytz
69
- ephem
7-
# - numba
10+
- numba
811
- pip:
9-
- numpy
10-
- pandas
1112
- coveralls

docs/environment.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: pvlib
2+
dependencies:
3+
- python=2.7
4+
- numpy
5+
- scipy
6+
- pandas
7+
- pytz
8+
- ephem
9+
- numba
10+
- ipython
11+
- sphinx
12+
- numpydoc
13+
- matplotlib
14+
- seaborn

docs/sphinx/source/conf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ class Mock(MagicMock):
2626
def __getattr__(cls, name):
2727
return Mock()
2828

29-
MOCK_MODULES = ['scipy', 'scipy.io', 'numpy', 'ephem', 'pandas',
30-
'pvlib.spa_c_files.spa_py', 'dateutil']
29+
MOCK_MODULES = []
3130
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
3231

3332
# If extensions (or modules to document with autodoc) are in another directory,
@@ -50,7 +49,9 @@ def __getattr__(cls, name):
5049
'sphinx.ext.viewcode',
5150
'sphinx.ext.extlinks',
5251
'numpydoc',
53-
'sphinx.ext.autosummary'
52+
'sphinx.ext.autosummary',
53+
'IPython.sphinxext.ipython_directive',
54+
'IPython.sphinxext.ipython_console_highlighting',
5455
]
5556

5657
# Add any paths that contain templates here, relative to this directory.

docs/sphinx/sphinxext/README.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/sphinx/sphinxext/ipython_console_highlighting.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)