From 5cabf29951224fc77199696ae96f49c10510c529 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Tue, 7 May 2019 20:12:01 -0700 Subject: [PATCH 01/13] windows? --- azure-pipelines.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f651be72fb..992592daac 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,11 +6,22 @@ trigger: - master +strategy: + matrix: + linux: + imageName: 'ubuntu-16.04' + # mac: + # imageName: 'macos-10.13' + windows: + imageName: 'vs2017-win2016' + +pool: + vmImage: $(imageName) + jobs: - job: 'Test_conda' - pool: - vmImage: 'ubuntu-latest' + strategy: matrix: Python27: From 5ce596a18a1c40297b67f189be21e36f6ffa0fe2 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Tue, 7 May 2019 20:27:43 -0700 Subject: [PATCH 02/13] single matrix --- azure-pipelines.yml | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 992592daac..ef006f4935 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,17 +6,6 @@ trigger: - master -strategy: - matrix: - linux: - imageName: 'ubuntu-16.04' - # mac: - # imageName: 'macos-10.13' - windows: - imageName: 'vs2017-win2016' - -pool: - vmImage: $(imageName) jobs: @@ -26,12 +15,31 @@ jobs: matrix: Python27: python.version: '27' + imageName: 'ubuntu-16.04' + Python27-windows: + python.version: '27' + imageName: 'vs2017-win2016' Python35: python.version: '35' + imageName: 'ubuntu-16.04' + Python35-windows: + python.version: '35' + imageName: 'vs2017-win2016' Python36: python.version: '36' + imageName: 'ubuntu-16.04' + Python35-windows: + python.version: '36' + imageName: 'vs2017-win2016' Python37: python.version: '37' + imageName: 'ubuntu-16.04' + Python37-windows: + python.version: '37' + imageName: 'vs2017-win2016' + + pool: + vmImage: $(imageName) steps: - bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin" From f6a2742c60168665dc82e5f2cbf4d7a35a626c73 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Tue, 7 May 2019 20:29:01 -0700 Subject: [PATCH 03/13] fix build name --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ef006f4935..a913b894a7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,7 +28,7 @@ jobs: Python36: python.version: '36' imageName: 'ubuntu-16.04' - Python35-windows: + Python36-windows: python.version: '36' imageName: 'vs2017-win2016' Python37: From 8581243d1a3cd7400b5c2041fd5089427d7e2d4e Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 8 May 2019 07:41:52 -0700 Subject: [PATCH 04/13] move windows into separate job. too many differences for one --- azure-pipelines.yml | 74 ++++++++++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 27 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a913b894a7..822fc38c49 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,6 +1,3 @@ -# Python package -# Create and test a Python package on multiple Python versions. -# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/python trigger: @@ -9,34 +6,21 @@ trigger: jobs: -- job: 'Test_conda' +- job: 'Test_conda_linux' + + variables: + - imageName: 'ubuntu-16.04' strategy: matrix: Python27: python.version: '27' - imageName: 'ubuntu-16.04' - Python27-windows: - python.version: '27' - imageName: 'vs2017-win2016' Python35: python.version: '35' - imageName: 'ubuntu-16.04' - Python35-windows: - python.version: '35' - imageName: 'vs2017-win2016' Python36: python.version: '36' - imageName: 'ubuntu-16.04' - Python36-windows: - python.version: '36' - imageName: 'vs2017-win2016' Python37: python.version: '37' - imageName: 'ubuntu-16.04' - Python37-windows: - python.version: '37' - imageName: 'vs2017-win2016' pool: vmImage: $(imageName) @@ -44,15 +28,12 @@ jobs: 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 pytest-azurepipelines displayName: 'pip dependencies' - - script: | source activate test_env conda list @@ -68,21 +49,60 @@ jobs: - task: PublishTestResults@2 inputs: testResultsFiles: '**/test-results.xml' - testRunTitle: 'Python $(python.version)' - + testRunTitle: 'Linux $(python.version)' - task: PublishCodeCoverageResults@1 inputs: codeCoverageTool: Cobertura summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml' reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov' - - script: | bash <(curl https://codecov.io/bash) -t bbc2bdbe-5e67-4fef-9cb7-f52fe0b703a8 -f coverage.xml -F adder -F subtractor -F conda displayName: 'codecov' + job: 'Test_conda_windows' + variables: + - imageName: 'vs2017-win2016' + + strategy: + matrix: + Python27-windows: + python.version: '27' + Python35-windows: + python.version: '35' + Python36-windows: + python.version: '36' + Python37-windows: + python.version: '37' + + pool: + vmImage: $(imageName) + + 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 myEnvironment + pip install pytest pytest-azurepipelines + displayName: 'pip dependencies' + - script: | + call activate myEnvironment + conda list + displayName: 'List installed dependencies' + - script: | + call activate myEnvironment + pytest pvlib --junitxml=junit/test-results.xml + displayName: 'pytest' + - task: PublishTestResults@2 + inputs: + testResultsFiles: '**/test-results.xml' + testRunTitle: 'Windows $(python.version)' + + - job: 'Publish' - dependsOn: 'Test_conda' + dependsOn: 'Test_conda_linux' pool: vmImage: 'ubuntu-latest' From f0f776e79b89ccb2ca4b284ef91a406c45ba0149 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 8 May 2019 07:50:37 -0700 Subject: [PATCH 05/13] hardcode pool --- azure-pipelines.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 822fc38c49..72719c056d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -8,8 +8,8 @@ jobs: - job: 'Test_conda_linux' - variables: - - imageName: 'ubuntu-16.04' + pool: + vmImage: 'ubuntu-16.04' strategy: matrix: @@ -22,9 +22,6 @@ jobs: Python37: python.version: '37' - pool: - vmImage: $(imageName) - steps: - bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin" displayName: Add conda to PATH @@ -60,9 +57,10 @@ jobs: displayName: 'codecov' - job: 'Test_conda_windows' - variables: - - imageName: 'vs2017-win2016' +- job: 'Test_conda_windows' + + pool: + vmImage: 'vs2017-win2016' strategy: matrix: @@ -75,9 +73,6 @@ jobs: Python37-windows: python.version: '37' - pool: - vmImage: $(imageName) - steps: - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" displayName: Add conda to PATH From eeaaf703037b1c1e7e31bc24925df3eaa82a25bf Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 8 May 2019 08:13:32 -0700 Subject: [PATCH 06/13] deps --- azure-pipelines.yml | 2 ++ ci/requirements-py27.yml | 1 + ci/requirements-py35.yml | 1 + ci/requirements-py36.yml | 1 + ci/requirements-py37.yml | 1 + 5 files changed, 6 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 72719c056d..4f9a762bbb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -30,6 +30,7 @@ jobs: - script: | source activate test_env pip install pytest pytest-azurepipelines + pip install -e . displayName: 'pip dependencies' - script: | source activate test_env @@ -81,6 +82,7 @@ jobs: - script: | call activate myEnvironment pip install pytest pytest-azurepipelines + pip install -e . displayName: 'pip dependencies' - script: | call activate myEnvironment diff --git a/ci/requirements-py27.yml b/ci/requirements-py27.yml index cb77db8ca4..95e0afff69 100644 --- a/ci/requirements-py27.yml +++ b/ci/requirements-py27.yml @@ -16,6 +16,7 @@ dependencies: - pytest-cov - pytest-mock - nose + - shapely # pvfactors dependency - pip: - coveralls - pytest-timeout diff --git a/ci/requirements-py35.yml b/ci/requirements-py35.yml index 7c4d0ff35f..93a1b4d9dc 100644 --- a/ci/requirements-py35.yml +++ b/ci/requirements-py35.yml @@ -16,6 +16,7 @@ dependencies: - pytest-cov - pytest-mock - nose + - shapely # pvfactors dependency - pip: - coveralls - pytest-timeout diff --git a/ci/requirements-py36.yml b/ci/requirements-py36.yml index 068e0bd534..55024aef7e 100644 --- a/ci/requirements-py36.yml +++ b/ci/requirements-py36.yml @@ -16,6 +16,7 @@ dependencies: - pytest-cov - pytest-mock - nose + - shapely # pvfactors dependency - pip: - coveralls - pvfactors==0.1.5 diff --git a/ci/requirements-py37.yml b/ci/requirements-py37.yml index 11378ba272..cfb00f8557 100644 --- a/ci/requirements-py37.yml +++ b/ci/requirements-py37.yml @@ -16,6 +16,7 @@ dependencies: - pytest-cov - pytest-mock - nose + - shapely # pvfactors dependency - pip: - coveralls - pvfactors==0.1.5 From 65fd279b3a659fc790784bb459933d4a1a004632 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 8 May 2019 08:26:02 -0700 Subject: [PATCH 07/13] no flake8, pip install pytest-mock --- azure-pipelines.yml | 8 ++++---- ci/requirements-py27.yml | 2 +- ci/requirements-py34.yml | 2 +- ci/requirements-py35.yml | 2 +- ci/requirements-py36.yml | 2 +- ci/requirements-py37.yml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4f9a762bbb..cb299e47f8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -40,10 +40,10 @@ jobs: 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' + # - script: | + # source activate test_env + # flake8 pvlib + # displayName: 'flake8' - task: PublishTestResults@2 inputs: testResultsFiles: '**/test-results.xml' diff --git a/ci/requirements-py27.yml b/ci/requirements-py27.yml index 95e0afff69..12dde97000 100644 --- a/ci/requirements-py27.yml +++ b/ci/requirements-py27.yml @@ -14,10 +14,10 @@ dependencies: - siphon - pytest - pytest-cov - - pytest-mock - nose - shapely # pvfactors dependency - pip: - coveralls + - pytest-mock - pytest-timeout - pvfactors==0.1.5 diff --git a/ci/requirements-py34.yml b/ci/requirements-py34.yml index 870ddebd39..93efa85ebf 100644 --- a/ci/requirements-py34.yml +++ b/ci/requirements-py34.yml @@ -14,8 +14,8 @@ dependencies: - siphon - pytest - pytest-cov - - pytest-mock - nose - pip: - coveralls + - pytest-mock - pytest-timeout diff --git a/ci/requirements-py35.yml b/ci/requirements-py35.yml index 93a1b4d9dc..fdbde57f58 100644 --- a/ci/requirements-py35.yml +++ b/ci/requirements-py35.yml @@ -14,10 +14,10 @@ dependencies: - siphon - pytest - pytest-cov - - pytest-mock - nose - shapely # pvfactors dependency - pip: - coveralls + - pytest-mock - pytest-timeout - pvfactors==0.1.5 diff --git a/ci/requirements-py36.yml b/ci/requirements-py36.yml index 55024aef7e..dfcff39773 100644 --- a/ci/requirements-py36.yml +++ b/ci/requirements-py36.yml @@ -14,9 +14,9 @@ dependencies: - siphon - pytest - pytest-cov - - pytest-mock - nose - shapely # pvfactors dependency - pip: - coveralls + - pytest-mock - pvfactors==0.1.5 diff --git a/ci/requirements-py37.yml b/ci/requirements-py37.yml index cfb00f8557..527bf91142 100644 --- a/ci/requirements-py37.yml +++ b/ci/requirements-py37.yml @@ -14,9 +14,9 @@ dependencies: # - siphon - pytest - pytest-cov - - pytest-mock - nose - shapely # pvfactors dependency - pip: - coveralls + - pytest-mock - pvfactors==0.1.5 From 8bab978ea0f35409236d569bd10b3c8ea17df618 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 8 May 2019 09:31:19 -0700 Subject: [PATCH 08/13] update conda --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cb299e47f8..e36892344c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -77,6 +77,9 @@ jobs: steps: - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" displayName: Add conda to PATH + - script: | + call activate myEnvironment + conda update conda --yes --quiet - script: conda env create --quiet --file ci/requirements-py$(python.version).yml displayName: Create Anaconda environment - script: | From fc9fa47754e8296acfcd6c7fb7a65c25f0646b09 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 8 May 2019 10:30:13 -0700 Subject: [PATCH 09/13] explicit windows pip install pytest-mock --- azure-pipelines.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e36892344c..8d7b7cb015 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -77,14 +77,11 @@ jobs: steps: - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" displayName: Add conda to PATH - - script: | - call activate myEnvironment - conda update conda --yes --quiet - script: conda env create --quiet --file ci/requirements-py$(python.version).yml displayName: Create Anaconda environment - script: | call activate myEnvironment - pip install pytest pytest-azurepipelines + pip install pytest pytest-azurepipelines pytest-mock pip install -e . displayName: 'pip dependencies' - script: | From 8c3539be744903ad3c5e2b80c4ee8900a7e1c384 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 8 May 2019 17:38:14 -0700 Subject: [PATCH 10/13] limit coverage steps --- azure-pipelines.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8d7b7cb015..dfafd07cf6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,6 +19,7 @@ jobs: python.version: '35' Python36: python.version: '36' + coverage: true Python37: python.version: '37' @@ -38,7 +39,7 @@ jobs: displayName: 'List installed dependencies' - script: | source activate test_env - pytest pvlib --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-report=html + pytest pvlib --junitxml=junit/test-results.xml --napoleon-docstrings --cov --cov-report=xml --cov-report=html displayName: 'pytest' # - script: | # source activate test_env @@ -53,9 +54,11 @@ jobs: codeCoverageTool: Cobertura summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml' reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov' + condition: $(coverage) - 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: $(coverage) - job: 'Test_conda_windows' @@ -90,7 +93,7 @@ jobs: displayName: 'List installed dependencies' - script: | call activate myEnvironment - pytest pvlib --junitxml=junit/test-results.xml + pytest pvlib --junitxml=junit/test-results.xml --napoleon-docstrings displayName: 'pytest' - task: PublishTestResults@2 inputs: From 08c145d87d9f89de72faaaf44726faa016164e2a Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 8 May 2019 18:02:47 -0700 Subject: [PATCH 11/13] try brackets --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index dfafd07cf6..83a8e6eda5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -54,11 +54,11 @@ jobs: codeCoverageTool: Cobertura summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml' reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov' - condition: $(coverage) + condition: $[coverage] - 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: $(coverage) + condition: $[coverage] - job: 'Test_conda_windows' From dec0dccca5e00ec881cfac863fd301351206f9c3 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 8 May 2019 18:04:14 -0700 Subject: [PATCH 12/13] eq --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 83a8e6eda5..766bac0f70 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -54,11 +54,11 @@ jobs: codeCoverageTool: Cobertura summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml' reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov' - condition: $[coverage] + 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: $[coverage] + condition: eq(variables['coverage'], true) - job: 'Test_conda_windows' From 0e9fd8787f416ec829792c40223a6ed7afd4b8ef Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 8 May 2019 18:17:18 -0700 Subject: [PATCH 13/13] no napoleon --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 766bac0f70..6d9e4b5800 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -39,7 +39,7 @@ jobs: displayName: 'List installed dependencies' - script: | source activate test_env - pytest pvlib --junitxml=junit/test-results.xml --napoleon-docstrings --cov --cov-report=xml --cov-report=html + pytest pvlib --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-report=html displayName: 'pytest' # - script: | # source activate test_env @@ -93,7 +93,7 @@ jobs: displayName: 'List installed dependencies' - script: | call activate myEnvironment - pytest pvlib --junitxml=junit/test-results.xml --napoleon-docstrings + pytest pvlib --junitxml=junit/test-results.xml displayName: 'pytest' - task: PublishTestResults@2 inputs: