@@ -51,7 +51,7 @@ stages:
5151 steps :
5252 - task : UsePythonVersion@0
5353 inputs :
54- versionSpec : ' 3.8.* '
54+ versionSpec : ' 3.8'
5555 displayName : ' use Python 3.8'
5656 - script : |
5757 python -m pip install isort==5.5.4
@@ -62,18 +62,18 @@ stages:
6262 steps :
6363 - task : UsePythonVersion@0
6464 inputs :
65- versionSpec : ' 3.8.* '
65+ versionSpec : ' 3.8'
6666 displayName : ' use Python 3.8'
6767 - script : |
68- python -m pip install black==20.8b1
68+ python -m pip install black==22.1
6969 python -m black --check .
7070 displayName: 'Run black'
7171 - job :
7272 displayName : ' flake8'
7373 steps :
7474 - task : UsePythonVersion@0
7575 inputs :
76- versionSpec : ' 3.8.* '
76+ versionSpec : ' 3.8'
7777 displayName : ' use Python 3.8'
7878 - script : |
7979 python -m pip install flake8==3.9.0 flake8-comprehensions flake8-import-order
@@ -84,10 +84,10 @@ stages:
8484 steps :
8585 - task : UsePythonVersion@0
8686 inputs :
87- versionSpec : ' 3.7.* '
88- displayName : ' use Python 3.7 '
87+ versionSpec : ' 3.8 '
88+ displayName : ' use Python 3.8 '
8989 - script : |
90- python -m pip install mypy~=0.931 numpy> =1.22
90+ python -m pip install mypy~=0.931 numpy~ =1.22
9191 python -m mypy src
9292 displayName: 'Run mypy'
9393
@@ -120,6 +120,8 @@ stages:
120120 build_changed=0
121121 echo "build config is unchanged";
122122 fi
123+ # set +x to prevent Azure from randomly appending a \' of the ## statement
124+ set +x
123125 echo "##vso[task.setvariable variable=conda_build_config_changed;isOutput=true]$build_changed"
124126
125127
@@ -140,8 +142,8 @@ stages:
140142 steps :
141143 - task : UsePythonVersion@0
142144 inputs :
143- versionSpec : ' 3.7.* '
144- displayName : ' use Python 3.7 '
145+ versionSpec : ' 3.8 '
146+ displayName : ' use Python 3.8 '
145147
146148 - checkout : self
147149
@@ -180,8 +182,8 @@ stages:
180182
181183 # conda env & tox build test
182184 # testing matrix of python & sklearn versions
183- # - for release branch: 3 build tests
184- # - otherwise: 1 build test
185+ # - for release branch: 9 build tests
186+ # - otherwise: 3 build tests
185187 - stage : conda_tox_build
186188 displayName : ' Conda/tox build & test'
187189 dependsOn : ' detect_build_config_changes'
@@ -190,7 +192,7 @@ stages:
190192
191193 jobs :
192194 - job :
193- displayName : ' single '
195+ displayName : ' essential '
194196 condition : >
195197 and(
196198 ne(variables.source_is_release_branch, 'True'),
@@ -203,12 +205,19 @@ stages:
203205 vmImage : ' ubuntu-latest'
204206 strategy :
205207 matrix :
208+ # We run three tests to cover conda/tox and maximum/minimum.
209+ # This comprises only one minimum dependencies test for tox,
210+ # which is usually faster than conda.
206211 maximum_dependencies_conda :
207- FACET_V_PYTHON_BUILD : ' =3.9.* '
212+ FACET_V_PYTHON_BUILD : ' =3.9'
208213 BUILD_SYSTEM : ' conda'
209214 PKG_DEPENDENCIES : ' max'
215+ minimum_dependencies_tox :
216+ FACET_V_PYTHON_BUILD : ' =3.7'
217+ BUILD_SYSTEM : ' tox'
218+ PKG_DEPENDENCIES : ' min'
210219 maximum_dependencies_tox :
211- FACET_V_PYTHON_BUILD : ' =3.9.* '
220+ FACET_V_PYTHON_BUILD : ' =3.9'
212221 BUILD_SYSTEM : ' tox'
213222 PKG_DEPENDENCIES : ' max'
214223
@@ -274,27 +283,27 @@ stages:
274283 strategy :
275284 matrix :
276285 default_dependencies_conda :
277- FACET_V_PYTHON_BUILD : ' =3.8.* '
286+ FACET_V_PYTHON_BUILD : ' =3.8'
278287 BUILD_SYSTEM : ' conda'
279288 PKG_DEPENDENCIES : ' default'
280289 minimum_dependencies_conda :
281- FACET_V_PYTHON_BUILD : ' =3.7.* '
290+ FACET_V_PYTHON_BUILD : ' =3.7'
282291 BUILD_SYSTEM : ' conda'
283292 PKG_DEPENDENCIES : ' min'
284293 maximum_dependencies_conda :
285- FACET_V_PYTHON_BUILD : ' =3.9.* '
294+ FACET_V_PYTHON_BUILD : ' =3.9'
286295 BUILD_SYSTEM : ' conda'
287296 PKG_DEPENDENCIES : ' max'
288297 default_dependencies_tox :
289- FACET_V_PYTHON_BUILD : ' =3.8.* '
298+ FACET_V_PYTHON_BUILD : ' =3.8'
290299 BUILD_SYSTEM : ' tox'
291300 PKG_DEPENDENCIES : ' default'
292301 minimum_dependencies_tox :
293- FACET_V_PYTHON_BUILD : ' =3.7.* '
302+ FACET_V_PYTHON_BUILD : ' =3.7'
294303 BUILD_SYSTEM : ' tox'
295304 PKG_DEPENDENCIES : ' min'
296305 maximum_dependencies_tox :
297- FACET_V_PYTHON_BUILD : ' =3.9.* '
306+ FACET_V_PYTHON_BUILD : ' =3.9'
298307 BUILD_SYSTEM : ' tox'
299308 PKG_DEPENDENCIES : ' max'
300309
@@ -398,7 +407,7 @@ stages:
398407 steps :
399408 - task : UsePythonVersion@0
400409 inputs :
401- versionSpec : ' 3.8.* '
410+ versionSpec : ' 3.8'
402411 displayName : ' use Python 3.8'
403412
404413 - checkout : pytools
@@ -463,7 +472,7 @@ stages:
463472 steps :
464473 - task : UsePythonVersion@0
465474 inputs :
466- versionSpec : ' 3.8.* '
475+ versionSpec : ' 3.8'
467476 displayName : ' use Python 3.8'
468477
469478 - checkout : pytools
@@ -476,14 +485,16 @@ stages:
476485 set -eux
477486 echo "Getting version"
478487 pip install packaging~=20.9
479- cd $(System.DefaultWorkingDirectory)/$(project_root)/src
488+ package_path= $(System.DefaultWorkingDirectory)/$(project_root)/src/$(project_name)
480489 export PYTHONPATH=$(System.DefaultWorkingDirectory)/pytools/sphinx/base
481- version=$(python -c "import make_base ; print(make_base .get_package_version())")
490+ version=$(python -c "import make_util ; print(make_util .get_package_version(package_path='$package_path' ))")
482491 echo "Current version: $version"
483492 echo "Detecting pre-release ('dev' or 'rc' in version)"
484493 prerelease=False
485494 [[ $version == *dev* ]] && prerelease=True && echo "Development release identified"
486495 [[ $version == *rc* ]] && prerelease=True && echo "Pre-release identified"
496+ # set +x to prevent Azure from randomly appending a \' of the ## statement
497+ set +x
487498 echo "##vso[task.setvariable variable=current_version]$version"
488499 echo "##vso[task.setvariable variable=is_prerelease]$prerelease"
489500 displayName : " Get package version"
@@ -504,6 +515,8 @@ stages:
504515 anaconda login --username "${CONDA_USERNAME}" --password "${CONDA_PASSWORD}"
505516 anaconda upload --user BCG_Gamma --force $(System.ArtifactsDirectory)/conda_default/conda/noarch/$(package_name)-*.tar.bz2
506517 anaconda logout
518+ # set +x to prevent Azure from randomly appending a \' of the ## statement
519+ set +x
507520 echo "##vso[task.setvariable variable=conda_published]True"
508521 displayName: 'Publish to Anaconda'
509522
@@ -518,6 +531,8 @@ stages:
518531 pip install flit
519532 flit install -s
520533 flit publish
534+ # set +x to prevent Azure from randomly appending a \' of the ## statement
535+ set +x
521536 echo "##vso[task.setvariable variable=pypi_published]True"
522537 displayName: 'Publish to PyPi'
523538 condition: eq(variables['source_is_release_branch'], 'True')
@@ -584,7 +599,7 @@ stages:
584599 steps :
585600 - task : UsePythonVersion@0
586601 inputs :
587- versionSpec : ' 3.8.* '
602+ versionSpec : ' 3.8'
588603 displayName : ' use Python 3.8'
589604
590605 - task : InstallSSHKey@0
0 commit comments