-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set up infrastructure for qiskit-tutorials migration #10443
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,7 @@ jobs: | |
pool: {vmImage: 'ubuntu-latest'} | ||
|
||
variables: | ||
QISKIT_SUPPRESS_PACKAGING_WARNINGS: Y | ||
PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip | ||
QISKIT_CELL_TIMEOUT: 300 | ||
|
||
steps: | ||
- task: UsePythonVersion@0 | ||
|
@@ -20,40 +18,31 @@ jobs: | |
|
||
- bash: | | ||
set -e | ||
git clone https://github.com/Qiskit/qiskit-tutorials --depth=1 | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip install -U \ | ||
-c constraints.txt \ | ||
-r requirements.txt \ | ||
-r requirements-dev.txt \ | ||
-r requirements-optional.txt \ | ||
-r requirements-tutorials.txt \ | ||
-e . | ||
python -m pip install -U "tox<4.4.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There have been ~20 releases of tox since 4.4.0 in late January of this year. Is this pin still needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably not, but the pin is just inherited because we haven't reverted #9460 yet. Maybe best do that in one go in a follow-up? |
||
sudo apt-get update | ||
sudo apt-get install -y graphviz pandoc | ||
pip check | ||
displayName: 'Install dependencies' | ||
env: | ||
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" | ||
|
||
- bash: | | ||
set -e | ||
cd qiskit-tutorials | ||
sphinx-build -b html . _build/html | ||
env: | ||
QISKIT_PARALLEL: False | ||
- bash: tools/prepare_tutorials.bash algorithms circuits circuits_advanced operators | ||
displayName: 'Download current tutorials' | ||
|
||
- bash: tox -e tutorials | ||
displayName: "Execute tutorials" | ||
|
||
- task: ArchiveFiles@2 | ||
inputs: | ||
rootFolderOrFile: 'qiskit-tutorials/_build/html' | ||
rootFolderOrFile: 'executed_tutorials' | ||
archiveType: tar | ||
archiveFile: '$(Build.ArtifactStagingDirectory)/html_tutorials.tar.gz' | ||
archiveFile: '$(Build.ArtifactStagingDirectory)/executed_tutorials.tar.gz' | ||
verbose: true | ||
condition: succeededOrFailed() | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish docs' | ||
displayName: 'Publish updated tutorials' | ||
inputs: | ||
pathtoPublish: '$(Build.ArtifactStagingDirectory)' | ||
artifactName: 'html_tutorials' | ||
artifactName: 'executed_tutorials' | ||
Parallel: true | ||
ParallelCount: 8 | ||
condition: succeededOrFailed() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.. _tutorials: | ||
|
||
========= | ||
Tutorials | ||
========= | ||
|
||
Quantum circuits | ||
================ | ||
|
||
.. nbgallery:: | ||
:glob: | ||
|
||
tutorials/circuits/* | ||
|
||
Advanced circuits | ||
================= | ||
|
||
.. nbgallery:: | ||
:glob: | ||
|
||
tutorials/circuits_advanced/* | ||
|
||
Algorithms | ||
========== | ||
|
||
.. nbgallery:: | ||
:glob: | ||
|
||
tutorials/algorithms/* | ||
|
||
Operators | ||
========= | ||
|
||
.. nbgallery:: | ||
:glob: | ||
|
||
tutorials/operators/* |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Placeholder", | ||
"\n", | ||
"This is only here to test the infrastructure for tutorials. It will be removed with our actual tutorials from qiskit-tutorials once finishing the metapackage migration." | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.9.16" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Placeholder", | ||
"\n", | ||
"This is only here to test the infrastructure for tutorials. It will be removed with our actual tutorials from qiskit-tutorials once finishing the metapackage migration." | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.9.16" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Placeholder", | ||
"\n", | ||
"This is only here to test the infrastructure for tutorials. It will be removed with our actual tutorials from qiskit-tutorials once finishing the metapackage migration." | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.9.16" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Placeholder", | ||
"\n", | ||
"This is only here to test the infrastructure for tutorials. It will be removed with our actual tutorials from qiskit-tutorials once finishing the metapackage migration." | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.9.16" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,9 +31,10 @@ ddt>=1.2.0,!=1.4.0,!=1.4.3 | |
# components of Terra use some of its optional dependencies in order to document | ||
# themselves. These are the requirements that are _only_ required for the docs | ||
# build, and are not used by Terra itself. | ||
|
||
Sphinx>=6.0 | ||
qiskit-sphinx-theme~=1.13.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that this bumps the theme version from 1.11 |
||
sphinx-design>=0.2.0 | ||
nbsphinx~=0.9.2 | ||
nbconvert~=7.7.1 | ||
# TODO: switch to stable release when 4.1 is released | ||
reno @ git+https://github.com/openstack/reno.git@81587f616f17904336cdc431e25c42b46cd75b8f | ||
Sphinx>=5.0 | ||
qiskit-sphinx-theme~=1.11.0 | ||
sphinx-design>=0.2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find what the deleted variables were used for. Didn't show up in search.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You (accidentally?) removed it in Qiskit/qiskit-tutorials#1459.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For posterity: my comment above is referring to
QISKIT_CELL_TIMEOUT
.QISKIT_SUPPRESS_PACKAGING_WARNINGS
disappeared in #5619.