Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Reorganize azure testing #1080

Merged
merged 90 commits into from
Feb 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
23d1019
reorganize azure testing
Feb 19, 2020
bad778c
rename the folder
Feb 19, 2020
059a71f
update pipelines
Feb 19, 2020
392c4b5
task versions to 0
Feb 19, 2020
d6f7fae
update azure
Feb 19, 2020
45f1a7e
rename jobs
Feb 19, 2020
ef26439
rename jobs
Feb 19, 2020
21325a6
update pytest.ini
Feb 19, 2020
17c9ec6
update pydocstyle
Feb 19, 2020
c117802
pytest-select
Feb 19, 2020
3dd3358
fixes
Feb 19, 2020
869e3f6
debug
Feb 19, 2020
7d71e23
fixes
Feb 19, 2020
d870784
precompile models
Feb 19, 2020
de6c491
bash inline
Feb 19, 2020
7408f60
list files with bash
Feb 19, 2020
2b08050
target type
Feb 19, 2020
e69d387
path
Feb 19, 2020
f8b4484
select tests
Feb 19, 2020
a518e94
fixes
Feb 19, 2020
65ceee0
change task to script
Feb 19, 2020
67207de
check input
Feb 19, 2020
b4bef63
fix select tests
Feb 19, 2020
5b262f1
fix things
Feb 19, 2020
10cf7cb
add rest of the script
Feb 19, 2020
d5c1901
test
Feb 19, 2020
92471ca
fix
ahartikainen Feb 19, 2020
0e7f061
debug
Feb 19, 2020
7a3dd7d
changes
Feb 19, 2020
2926d58
fixes
Feb 19, 2020
05f7117
precompile
Feb 19, 2020
742fb8a
fix precompile
Feb 19, 2020
e5122a9
reorganize tests
Feb 19, 2020
981765a
add init
Feb 19, 2020
75caf94
fixes
Feb 19, 2020
d524e04
fixes
Feb 19, 2020
829091d
filter warnings in pytests
Feb 19, 2020
7add17a
change test file location
Feb 19, 2020
f2f8bf2
update
Feb 19, 2020
9b39f16
fix
Feb 19, 2020
04339a2
fix
Feb 19, 2020
b80fec7
fix
Feb 19, 2020
72864ec
fix tests
Feb 19, 2020
20de945
fix typo
Feb 19, 2020
8d82a37
fixes
Feb 19, 2020
0407881
fix import error
Feb 19, 2020
0e55056
fix
Feb 19, 2020
c1f85e5
remove debug file
Feb 19, 2020
7cb2ab5
free pydocstyle
Feb 19, 2020
20dfa46
changes
ahartikainen Feb 19, 2020
4a04a00
fix
ahartikainen Feb 19, 2020
762bd0d
build wheel for tags
Feb 20, 2020
1e63fce
remove dependency
Feb 20, 2020
0158fdc
fix wheel building
Feb 20, 2020
126df9f
add debug
Feb 20, 2020
b071571
install wheel
Feb 20, 2020
5c5e03a
fix location
Feb 20, 2020
57fb160
wheel file
Feb 20, 2020
8ea9390
add benchmarks
Feb 20, 2020
f3ad7db
activate benchmarks
Feb 20, 2020
08c3fe7
fix
Feb 20, 2020
a408c28
machine yes
Feb 20, 2020
e559457
hash
Feb 20, 2020
1f67a9f
Fix typo
ahartikainen Feb 20, 2020
eb24666
fix
Feb 20, 2020
bb90f96
remove badge
Feb 20, 2020
0cbaa20
fix
Feb 20, 2020
ee12151
remove performance publish
Feb 20, 2020
74eb5c7
fix python
Feb 20, 2020
07c33d2
update wheel name
Feb 20, 2020
2e42228
Cobertura
Feb 20, 2020
6a1fb31
add docs
Feb 20, 2020
3e07fa2
remove stuff
Feb 20, 2020
8c59ed2
build docs
Feb 20, 2020
4514608
rename build
Feb 20, 2020
bddae6b
add codecov
Feb 20, 2020
d2139bf
fix phantomjs install
Feb 20, 2020
b1727ee
needs codecov secret key
Feb 20, 2020
a6a31e7
Install pandoc
ahartikainen Feb 20, 2020
128badb
add conditions
Feb 20, 2020
220d358
update durations to 15
Feb 20, 2020
894591b
test msg
ahartikainen Feb 21, 2020
732318b
add gh_user
Feb 21, 2020
1d70720
change ref
Feb 21, 2020
3a4a7f8
change
Feb 21, 2020
61890b8
prepare to merge
Feb 21, 2020
4c6bca8
update changelog
Feb 21, 2020
2dd4c98
remove pydocstyle from docs requirements
Feb 21, 2020
0a89c5b
add pydocstyle back and remove the condition
Feb 21, 2020
3a6aae8
ingore tests in code coverage
OriolAbril Feb 21, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .azure-pipelines/azure-pipelines-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
jobs:
- job: BaseTests
pool:
vmImage: 'ubuntu-latest'
variables:
- name: NUMBA_DISABLE_JIT
value: 1
timeoutInMinutes: 360
strategy:
matrix:
Python_38:
python.version: 3.8
name: "Python 3.8"
Python_37:
python.version: 3.7
name: "Python 3.7"
Python_36:
python.version: 3.6
name: "Python 3.6"

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

- script: |
sudo apt-get update
sudo apt-get install -y ffmpeg
displayName: 'Install external libraries'

- script: |
ls -ahl
env
pwd
gcc --version
python --version
displayName: 'Debug information'

- script: |
python -m pip install --no-cache-dir -r requirements.txt
python -m pip install --no-cache-dir -r requirements-optional.txt
python -m pip install --no-cache-dir -r requirements-dev.txt
python -m pip install pytest-azurepipelines codecov
displayName: 'Install requirements'

- script: |
python -m pip install .
displayName: 'Install ArviZ package'

- script: |
python -m pip freeze
displayName: 'Print packages'

- script: |
python -m pytest arviz/tests/base_tests --cov arviz --cov-report=xml
displayName: 'pytest'

- script: |
ls -ahl
env
displayName: 'Debug information 2'

- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '$(System.DefaultWorkingDirectory)/test-*.xml'
testRunTitle: 'Publish test results for Python $(python.version)'
displayName: 'Publish Test Results'

- script: |
python -m codecov --token=$(CODECOV_TOKEN)
displayName: 'upload coverage'
54 changes: 54 additions & 0 deletions .azure-pipelines/azure-pipelines-benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
jobs:
- job: Benchmarks
pool:
vmImage: 'ubuntu-latest'
timeoutInMinutes: 360
strategy:
matrix:
Python_38:
python.version: 3.8
name: "Python 3.8 - benchmarks"

steps:

- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'

- script: |
ls -ahl
env
pwd
gcc --version
python --version
displayName: 'Debug information'

- script: |
python -m pip install --upgrade pip
python -m pip install --no-cache-dir -r requirements.txt
python -m pip install --no-cache-dir -r requirements-optional.txt
python -m pip install asv
displayName: 'Install requirements'

- script: |
python -m pip freeze
displayName: 'Debug information 2'

- script: |
python -m asv machine --yes
git log --pretty=format:'%h' -n 1 > hashestobenchmark.txt
cat hashestobenchmark.txt
python -m asv run HASHFILE:hashestobenchmark.txt
displayName: 'Run the benchmarks'

- script: |
git log --pretty=format:'%h' -n 1 | xargs python -m asv show
git log --pretty=format:'%h' -n 1 | xargs python -m asv show > benchmark_results.txt
displayName: 'Print and save results'

- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: 'benchmark_results.txt'
artifactName: 'Benchmarks'
displayName: 'Publish the benchmarks'
60 changes: 60 additions & 0 deletions .azure-pipelines/azure-pipelines-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
jobs:
- job: BuildDocs
dependsOn:
- BaseTests
- ExternalTests
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'master'))
pool:
vmImage: 'ubuntu-latest'
variables:
- name: NUMBA_DISABLE_JIT
value: 1
timeoutInMinutes: 360
strategy:
matrix:
Python_38:
python.version: 3.8
name: "Python 3.8 - docs"

steps:

- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'

- script: |
ls -ahl
env
pwd
gcc --version
python --version
displayName: 'Debug information'

- script: |
sudo apt-get update
sudo apt-get install -y pandoc
displayName: 'Install external libraries'

- script: |
python -m pip install --upgrade pip
python -m pip install --no-cache-dir -r requirements.txt
python -m pip install --no-cache-dir -r requirements-dev.txt
python -m pip install --no-cache-dir -r requirements-optional.txt
python -m pip install --no-cache-dir -r requirements-docs.txt
conda install --channel conda-forge -y phantomjs
displayName: 'Install requirements'

- script: |
python -msphinx -M clean doc doc/build
sphinx-build doc doc/build -b html
displayName: 'Build a docs'

- script: |
ls -ahl
env
displayName: 'Debug information 2'

- script: |
ghp-import -pfnr https://$(GH_USER):$(GH_TOKEN)@github.com/${BUILD_REPOSITORY_NAME}.git doc/build
displayName: 'Deploy docs'
132 changes: 132 additions & 0 deletions .azure-pipelines/azure-pipelines-external.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
jobs:
- job: ExternalTests
pool:
vmImage: 'ubuntu-latest'
variables:
- name: NUMBA_DISABLE_JIT
value: 1
timeoutInMinutes: 360
strategy:
matrix:
Python_37_Latest:
python.version: 3.7
pystan.version: "latest"
pyro.version: "latest"
emcee.version: "latest"
name: "External latest"
Python_37_PyStan_3_Pyro_1_Emcee_2_TF_1:
python.version: 3.7
pystan.version: "preview"
pyro.version: 1.0.0
pytorch.version: 1.3.0
emcee.version: 2
tensorflow.version: 1
name: "External special"

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

- script: |
ls
env
pwd
gcc --version
python --version
displayName: 'Debug information'

- script: |
python -m pip install --upgrade pip

if [ "$(pytorch.version)" = "latest" ]; then
python -m pip --no-cache-dir install torch torchvision -f https://download.pytorch.org/whl/cpu/torch_stable.html
else
python -m pip --no-cache-dir install torch==${pytorch.version} torchvision -f https://download.pytorch.org/whl/cpu/torch_stable.html
fi

if [ "$(pystan.version)" = "latest" ]; then
python -m pip --no-cache-dir install pystan
else
if [ "$(pystan.version)" = "preview" ]; then
# try to skip other pre-releases than pystan
python -m pip --no-cache-dir install numpy uvloop marshmallow==3.0.0rc6 PyYAML
python -m pip --no-cache-dir install --pre pystan
else
python -m pip --no-cache-dir install pystan==${pystan.version}
fi
fi

if [ "$(pyro.version)" = "latest" ]; then
python -m pip --no-cache-dir install pyro-ppl
else
python -m pip --no-cache-dir install pyro-ppl==${pyro.version}
fi

if [ "$(emcee.version)" = "latest" ]; then
python -m pip --no-cache-dir install emcee
else
python -m pip --no-cache-dir install "emcee<3"
fi

if [ "$(tensorflow.version)" = "latest" ]; then
python -m pip --no-cache-dir install tensorflow
else
python -m pip --no-cache-dir install tensorflow==1.14 tensorflow_probability==0.7
fi

if [ "$(pymc3.version)" = "latest" ]; then
python -m pip --no-cache-dir install git+https://github.com/pymc-devs/pymc3
else
python -m pip --no-cache-dir install pymc3==${pymc3.version}
fi

python -m pip install --no-cache-dir -r requirements-external.txt
displayName: 'Install packages'

- script: |
python -m pip install --no-cache-dir -r requirements.txt
python -m pip install --no-cache-dir -r requirements-dev.txt
python -m pip install --no-cache-dir -r requirements-optional.txt
python -m pip install pytest-azurepipelines codecov
displayName: 'Install requirements'

- script: |
python -m pip install .
displayName: 'Install ArviZ package'

- script: |
python -m pip freeze
displayName: 'Print packages'

- script: |
pytest arviz/tests/helpers.py
displayName: 'precompile models'

- script: |
python -m pytest arviz/tests/external_tests --cov arviz --cov-report=xml
displayName: 'pytest'

- script: |
python -m pylint arviz
displayName: 'pylint'

- script: |
python -m pydocstyle arviz
displayName: 'pydocstyle'

- script: |
python -m black arviz
python -m black examples
displayName: 'black'

- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '$(System.DefaultWorkingDirectory)/test-*.xml'
testRunTitle: 'Publish test results for Python $(python.version)'

- script: |
python -m codecov --token=$(CODECOV_TOKEN)
displayName: 'upload coverage'
62 changes: 62 additions & 0 deletions .azure-pipelines/azure-pipelines-wheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
jobs:
- job: BuildWheel
dependsOn:
- BaseTests
- ExternalTests
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
pool:
vmImage: 'ubuntu-latest'
variables:
- name: NUMBA_DISABLE_JIT
value: 1
timeoutInMinutes: 360
strategy:
matrix:
Python_38:
python.version: 3.8
name: "Python 3.8 - wheel"

steps:

- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'

- script: |
ls -ahl
env
pwd
gcc --version
python --version
displayName: 'Debug information'

- script: |
python -m pip install --upgrade pip
python -m pip install --no-cache-dir -r requirements.txt
pip install wheel
displayName: 'Install requirements'

- script: |
python setup.py sdist bdist_wheel
ls -lh dist
displayName: 'Build a wheel'

- script: |
cd dist
ls -lh
ls | grep *.whl | xargs python -m pip install
python -c "import arviz as az; print(az);print(az.summary(az.load_arviz_data('non_centered_eight')))"
cd ..
displayName: 'Install and test the wheel'

- script: |
ls -ahl
env
displayName: 'Debug information 2'

- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: 'dist'
artifactName: 'arviz_wheel_dist'
displayName: 'Publish the wheel'
2 changes: 2 additions & 0 deletions .pydocstyle.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[pydocstyle]
convention = numpy
Loading