Skip to content

Commit

Permalink
Merge branch 'master' into singleaxis_tracking_wslope
Browse files Browse the repository at this point in the history
  • Loading branch information
mikofski committed Aug 27, 2020
2 parents 4fdc94d + 75369dc commit 91f3405
Show file tree
Hide file tree
Showing 122 changed files with 63,983 additions and 22,591 deletions.
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,17 @@ coverage.xml
*.h5


#Datafiles
# Datafiles
*.csv
# Ignore some csv
!pvlib/data/*.csv

# vi
*.swp

#Ignore some notebooks
# Ignore some notebooks
*.ipynb
!docs/tutorials/*.ipynb

#Ignore Mac DS_store files
# Ignore Mac DS_store files
*.DS_Store
2 changes: 1 addition & 1 deletion .stickler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ linters:
flake8:
python: 3
max-line-length: 79
ignore: E201,E241,E226
ignore: E201,E241,E226,W503,W504
files:
ignore:
- 'pvlib/_version.py'
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ install:
- pip install -e .

script:
- pytest pvlib --cov=pvlib --cov-report term-missing
- pytest pvlib --remote-data --cov=pvlib --cov-report term-missing

after_script:
- if [[ $TASK == "coverage" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
<tr>
<td>Publications</td>
<td>
<a href="https://doi.org/10.5281/zenodo.2554311">
<img src="https://zenodo.org/badge/DOI/10.5281/zenodo.2554311.svg" alt="zenodo reference" />
<a href="https://doi.org/10.5281/zenodo.3762635">
<img src="https://zenodo.org/badge/DOI/10.5281/zenodo.3762635.svg" alt="zenodo reference">
</a>
<a href="http://joss.theoj.org/papers/41187535cad22dd4b076c89b72f874b1">
<img src="http://joss.theoj.org/papers/41187535cad22dd4b076c89b72f874b1/status.svg" alt="JOSS reference" />
Expand Down
173 changes: 16 additions & 157 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,169 +6,28 @@ trigger:

jobs:

- job: 'Test_bare_linux'
- template: ci/azure/posix.yml
parameters:
name: Test_bare_Linux
vmImage: ubuntu-16.04

pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
Python35:
python.version: '3.5'
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'

- script: |
pip install pytest pytest-cov pytest-mock pytest-timeout pytest-azurepipelines
pip install -e .
pytest pvlib --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
displayName: 'Test with pytest'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-*.xml'
testRunTitle: 'Publish test results for Python $(python.version)'

- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'

- template: ci/azure/posix.yml
parameters:
name: Test_bare_macOS
vmImage: macOS-10.14

- job: 'Test_conda_linux'

pool:
vmImage: 'ubuntu-16.04'
- template: ci/azure/conda_linux.yml
parameters:
name: Test_conda_linux
vmImage: ubuntu-16.04

strategy:
matrix:
Python35:
python.version: '35'
Python36:
python.version: '36'
coverage: true
Python37:
python.version: '37'

steps:
- bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin"
displayName: Add conda to PATH
- script: conda env create --quiet --file ci/requirements-py$(python.version).yml
displayName: Create Anaconda environment
- script: |
source activate test_env
pip install pytest-azurepipelines
pip install -e .
displayName: 'pip dependencies'
- script: |
source activate test_env
conda list
displayName: 'List installed dependencies'
- script: |
source activate test_env
pytest pvlib --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-report=html
displayName: 'pytest'
# - script: |
# source activate test_env
# flake8 pvlib
# displayName: 'flake8'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Linux $(python.version)'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'
condition: eq(variables['coverage'], true)
- script: |
bash <(curl https://codecov.io/bash) -t bbc2bdbe-5e67-4fef-9cb7-f52fe0b703a8 -f coverage.xml -F adder -F subtractor -F conda
displayName: 'codecov'
condition: eq(variables['coverage'], true)
- job: 'Test_conda_windows'

pool:
vmImage: 'vs2017-win2016'

strategy:
matrix:
Python35-windows:
python.version: '35'
Python36-windows:
python.version: '36'
Python37-windows:
python.version: '37'

steps:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH
- script: conda env create --quiet --file ci/requirements-py$(python.version).yml
displayName: Create Anaconda environment
- script: |
call activate test_env
pip install pytest-azurepipelines
pip install -e .
displayName: 'pip dependencies'
- script: |
call activate test_env
conda list
displayName: 'List installed dependencies'
- script: |
call activate test_env
pytest pvlib --junitxml=junit/test-results.xml
displayName: 'pytest'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Windows $(python.version)'


- job: 'Test_bare_macOS_Mojave'

pool:
vmImage: 'macOS-10.14'
strategy:
matrix:
Python35:
python.version: '3.5'
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'

- script: |
pip install pytest pytest-cov pytest-mock pytest-timeout pytest-azurepipelines
pip install -e .
pytest pvlib --junitxml=junit/test-results.xml --cov=pvlib --cov-report=xml --cov-report=html
displayName: 'Test with pytest'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-*.xml'
testRunTitle: 'Publish test results for Python $(python.version)'

- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'
- template: ci/azure/conda_windows.yml
parameters:
name: Test_conda_windows
vmImage: vs2017-win2016


- job: 'Publish'
Expand Down
56 changes: 56 additions & 0 deletions ci/azure/conda_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
parameters:
name: ''
vmImage: ''

jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
Python35:
python.version: '35'
Python35-min:
python.version: '35'
suffix: '-min'
Python36:
python.version: '36'
coverage: true
Python37:
python.version: '37'
Python38:
python.version: '38'

steps:
- bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin"
displayName: Add conda to PATH
- script: conda env create --quiet --file ci/requirements-py$(python.version)$(suffix).yml
displayName: Create Anaconda environment
- script: |
source activate test_env
pip install pytest-azurepipelines
pip install -e .
displayName: 'pip dependencies'
- script: |
source activate test_env
conda list
displayName: 'List installed dependencies'
- script: |
source activate test_env
export NREL_API_KEY=$(nrelApiKey)
pytest pvlib --remote-data --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-report=html
displayName: 'pytest'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Linux $(python.version)'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'
condition: eq(variables['coverage'], true)
- script: |
bash <(curl https://codecov.io/bash) -t bbc2bdbe-5e67-4fef-9cb7-f52fe0b703a8 -f coverage.xml -F adder -F subtractor -F conda
displayName: 'codecov'
condition: eq(variables['coverage'], true)
41 changes: 41 additions & 0 deletions ci/azure/conda_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
parameters:
name: ''
vmImage: ''

jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
Python35-windows:
python.version: '35'
Python36-windows:
python.version: '36'
Python37-windows:
python.version: '37'
Python38-windows:
python.version: '38'

steps:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH
- script: conda env create --quiet --file ci/requirements-py$(python.version).yml
displayName: Create Anaconda environment
- script: |
call activate test_env
pip install pytest-azurepipelines
pip install -e .
displayName: 'pip dependencies'
- script: |
call activate test_env
conda list
displayName: 'List installed dependencies'
- script: |
call activate test_env
pytest pvlib --junitxml=junit/test-results.xml
displayName: 'pytest'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Windows $(python.version)'
41 changes: 41 additions & 0 deletions ci/azure/posix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
parameters:
name: ''
vmImage: ''

jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
Python35:
python.version: '3.5'
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'

- script: |
pip install pytest pytest-cov pytest-mock pytest-timeout pytest-azurepipelines pytest-rerunfailures pytest-remotedata
pip install -e .
pytest pvlib --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
displayName: 'Test with pytest'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-*.xml'
testRunTitle: 'Publish test results for Python $(python.version)'

- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'
4 changes: 3 additions & 1 deletion ci/requirements-py35-min.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ dependencies:
- requests
- pip:
- numpy==1.12.0
- pandas==0.18.1
- pandas==0.22.0
- pytest-rerunfailures # conda version is >3.6
- pytest-remotedata # conda package is 0.3.0, needs > 0.3.1
4 changes: 3 additions & 1 deletion ci/requirements-py35.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ dependencies:
- siphon # conda-forge
- pip:
- nrel-pysam>=2.0
- pvfactors==1.0.1
- pvfactors==1.4.1
- pytest-rerunfailures # conda version is >3.6
- pytest-remotedata # needs > 0.3.1

0 comments on commit 91f3405

Please sign in to comment.