From 840c3b8d6e58663e3ca43d87f123507063361072 Mon Sep 17 00:00:00 2001 From: Cameron Stark Date: Fri, 24 Jan 2020 15:56:36 -0700 Subject: [PATCH 1/4] tryout only doc build --- azure-pipelines.yml | 322 +++++++++++++++++++++++--------------------- 1 file changed, 165 insertions(+), 157 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2ad18ae1b8..ffe81df8ba 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,163 +24,171 @@ jobs: 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' - - -- job: 'Test_conda_linux' - - pool: - 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)' + # 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' - 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' - - -- job: 'Publish' - dependsOn: 'Test_conda_linux' - pool: - vmImage: 'ubuntu-latest' - - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.x' - architecture: 'x64' - - - script: python setup.py sdist - displayName: 'Build sdist' + source activate pandas-dev + # Next we should simply have `doc/make.py --warnings-are-errors`, everything else is required because the ipython directive doesn't fail the build on errors (https://github.com/ipython/ipython/issues/11547) + doc/make.py --warnings-are-errors | tee sphinx.log ; SPHINX_RET=${PIPESTATUS[0]} + grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log ; IPY_RET=$(( $? != 1 )) + exit $(( $SPHINX_RET + $IPY_RET )) + displayName: 'Build documentation' + + # - 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' + + +# - job: 'Test_conda_linux' + +# pool: +# 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' + + +# - job: 'Publish' +# dependsOn: 'Test_conda_linux' +# pool: +# vmImage: 'ubuntu-latest' + +# steps: +# - task: UsePythonVersion@0 +# inputs: +# versionSpec: '3.x' +# architecture: 'x64' + +# - script: python setup.py sdist +# displayName: 'Build sdist' From d6e707d1361a1e8c0368b33c8211b02bf6324b60 Mon Sep 17 00:00:00 2001 From: Cameron Stark Date: Fri, 24 Jan 2020 16:01:43 -0700 Subject: [PATCH 2/4] fix build command --- azure-pipelines.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ffe81df8ba..a916fce714 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -31,11 +31,8 @@ jobs: # displayName: 'Test with pytest' - script: | - source activate pandas-dev # Next we should simply have `doc/make.py --warnings-are-errors`, everything else is required because the ipython directive doesn't fail the build on errors (https://github.com/ipython/ipython/issues/11547) - doc/make.py --warnings-are-errors | tee sphinx.log ; SPHINX_RET=${PIPESTATUS[0]} - grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log ; IPY_RET=$(( $? != 1 )) - exit $(( $SPHINX_RET + $IPY_RET )) + sphinx-build -b html source build displayName: 'Build documentation' # - task: PublishTestResults@2 From 7d88a666003313780566ec85673c1ceccbf39dd5 Mon Sep 17 00:00:00 2001 From: Cameron Stark Date: Fri, 24 Jan 2020 16:04:40 -0700 Subject: [PATCH 3/4] ensure environment is set --- azure-pipelines.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a916fce714..44e7191d7e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,10 +12,6 @@ jobs: vmImage: 'ubuntu-16.04' strategy: matrix: - Python35: - python.version: '3.5' - Python36: - python.version: '3.6' Python37: python.version: '3.7' @@ -32,6 +28,7 @@ jobs: - script: | # Next we should simply have `doc/make.py --warnings-are-errors`, everything else is required because the ipython directive doesn't fail the build on errors (https://github.com/ipython/ipython/issues/11547) + pip install -e ".[doc]" sphinx-build -b html source build displayName: 'Build documentation' From 02d002f50df625eb93b805518abd762e8feca322 Mon Sep 17 00:00:00 2001 From: Cameron Stark Date: Fri, 24 Jan 2020 16:08:41 -0700 Subject: [PATCH 4/4] provide correct paths from base directory --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 44e7191d7e..3d0a8795c7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -29,7 +29,7 @@ jobs: - script: | # Next we should simply have `doc/make.py --warnings-are-errors`, everything else is required because the ipython directive doesn't fail the build on errors (https://github.com/ipython/ipython/issues/11547) pip install -e ".[doc]" - sphinx-build -b html source build + sphinx-build -b html docs/sphinx/source docs/sphinx/build displayName: 'Build documentation' # - task: PublishTestResults@2