From c8024cd5b6b21a0ae4ffb676a55f920dccd0ded5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 18:40:39 -0800 Subject: [PATCH] Deploy docs to GitHub Pages (backport #1356) (#1365) This is an automatic backport of pull request #1356 done by [Mergify](https://mergify.com). Cherry-pick of b60547299cdaec5d6c1e90b35b3f0c4a921b09f1 has failed: ``` On branch mergify/bp/stable/0.5/pr-1356 Your branch is up to date with 'origin/stable/0.5'. You are currently cherry-picking commit b605472. (fix conflicts and run "git cherry-pick --continue") (use "git cherry-pick --skip" to skip this patch) (use "git cherry-pick --abort" to cancel the cherry-pick operation) Changes to be committed: modified: .github/workflows/docs_dev.yml renamed: .github/workflows/docs.yml -> .github/workflows/docs_release.yml new file: .github/workflows/docs_stable.yml deleted: tools/rclone.conf.enc Unmerged paths: (use "git add/rm ..." as appropriate to mark resolution) both modified: docs/conf.py deleted by them: tools/deploy_documentation.sh deleted by them: tools/deploy_documentation_dev.sh ``` To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally ---
Mergify commands and options
More conditions and actions can be found in the [documentation](https://docs.mergify.com/). You can also trigger Mergify actions by commenting on this pull request: - `@Mergifyio refresh` will re-evaluate the rules - `@Mergifyio rebase` will rebase this PR on its base branch - `@Mergifyio update` will merge the base branch into this PR - `@Mergifyio backport ` will backport this PR on `` branch Additionally, on Mergify [dashboard](https://dashboard.mergify.com) you can: - look at your merge queues - generate the Mergify configuration with the config editor. Finally, you can contact us on https://mergify.com
--------- Co-authored-by: Arnau Casau <47946624+arnaucasau@users.noreply.github.com> Co-authored-by: Helena Zhang --- .github/workflows/docs_dev.yml | 15 ++++--- .../workflows/{docs.yml => docs_release.yml} | 16 +++++--- .github/workflows/docs_stable.yml | 38 ++++++++++++++++++ docs/conf.py | 7 +++- docs/tutorials/calibrations.rst | 2 +- docs/tutorials/getting_started.rst | 2 +- docs/tutorials/index.rst | 4 +- requirements-dev.txt | 2 - requirements.txt | 2 +- tools/rclone.conf.enc | Bin 304 -> 0 bytes 10 files changed, 69 insertions(+), 19 deletions(-) rename .github/workflows/{docs.yml => docs_release.yml} (57%) create mode 100644 .github/workflows/docs_stable.yml delete mode 100644 tools/rclone.conf.enc diff --git a/.github/workflows/docs_dev.yml b/.github/workflows/docs_dev.yml index 36ddde86ae..aa7eee469f 100644 --- a/.github/workflows/docs_dev.yml +++ b/.github/workflows/docs_dev.yml @@ -19,9 +19,12 @@ jobs: python -m pip install --upgrade pip pip install -U virtualenv setuptools wheel tox sudo apt-get install graphviz pandoc - - name: Build and publish - env: - encrypted_rclone_key: ${{ secrets.encrypted_rclone_key }} - encrypted_rclone_iv: ${{ secrets.encrypted_rclone_iv }} - run: | - tools/deploy_documentation_dev.sh \ No newline at end of file + - name: Build docs dev + run: EXPERIMENTS_DEV_DOCS=1 PROD_BUILD=1 RELEASE_STRING=`git describe` tox -edocs + - name: Bypass Jekyll Processing # Necessary for setting the correct css path + run: touch docs/_build/html/.nojekyll + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: docs/_build/html/ + target-folder: dev/ diff --git a/.github/workflows/docs.yml b/.github/workflows/docs_release.yml similarity index 57% rename from .github/workflows/docs.yml rename to .github/workflows/docs_release.yml index 26aed14338..e83628d314 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs_release.yml @@ -20,10 +20,16 @@ jobs: python -m pip install --upgrade pip pip install -U virtualenv setuptools wheel tox sudo apt-get install graphviz pandoc - - name: Build and publish + - name: Build docs env: - encrypted_rclone_key: ${{ secrets.encrypted_rclone_key }} - encrypted_rclone_iv: ${{ secrets.encrypted_rclone_iv }} QISKIT_DOCS_BUILD_TUTORIALS: 'always' - run: | - tools/deploy_documentation.sh + run: EXPERIMENTS_DEV_DOCS=1 PROD_BUILD=1 tox -edocs + - name: Bypass Jekyll Processing # Necessary for setting the correct css path + run: touch docs/_build/html/.nojekyll + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: docs/_build/html/ + clean-exclude: | + stable/* + dev/* diff --git a/.github/workflows/docs_stable.yml b/.github/workflows/docs_stable.yml new file mode 100644 index 0000000000..58a2767d90 --- /dev/null +++ b/.github/workflows/docs_stable.yml @@ -0,0 +1,38 @@ +name: Stable Docs Publish +on: + workflow_dispatch: + push: + tags: + - "*" + +jobs: + deploy: + if: github.repository_owner == 'Qiskit-Extensions' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.8' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U virtualenv setuptools wheel tox + sudo apt-get install graphviz pandoc + - name: Build docs stable + env: + QISKIT_DOCS_BUILD_TUTORIALS: 'always' + run: EXPERIMENTS_DEV_DOCS=1 PROD_BUILD=1 tox -e docs + - name: Bypass Jekyll Processing # Necessary for setting the correct css path + run: touch docs/_build/html/.nojekyll + - name: Set current version + run: | + echo "version=$(git describe --abbrev=0 | cut -d'.' -f1,2)" >> "$GITHUB_ENV" + - name: Deploy stable + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: docs/_build/html + target-folder: stable/${{ env.version }} \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index a3f298910a..f0cbfa3ae7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -145,6 +145,11 @@ "expandable_sidebar": True, } + +html_title = f"{project} {release}" + +docs_url_prefix = "qiskit-experiments" + html_last_updated_fmt = "%Y/%m/%d" html_theme_options = { @@ -160,7 +165,7 @@ "matplotlib": ("https://matplotlib.org/stable/", None), "qiskit": ("https://qiskit.org/documentation/", None), "uncertainties": ("https://pythonhosted.org/uncertainties", None), - "qiskit_ibm_provider": ("https://qiskit.org/documentation/partners/qiskit_ibm_provider", None), + "qiskit_ibm_provider": ("https://docs.quantum.ibm.com/api/qiskit-ibm-provider", None), } diff --git a/docs/tutorials/calibrations.rst b/docs/tutorials/calibrations.rst index 63b35f68b6..f22a3a25d2 100644 --- a/docs/tutorials/calibrations.rst +++ b/docs/tutorials/calibrations.rst @@ -15,7 +15,7 @@ backend, :class:`.SingleTransmonTestBackend`, a backend that simulates the under pulses with `Qiskit Dynamics `_ on a three-level model of a transmon. You can also run these experiments on any real backend with Pulse enabled (see -:external+qiskit:doc:`tutorials/circuits_advanced/08_gathering_system_information`). +:class:`qiskit.providers.models.BackendConfiguration`). We will run experiments to find the qubit frequency, calibrate the amplitude of DRAG pulses, and choose the value diff --git a/docs/tutorials/getting_started.rst b/docs/tutorials/getting_started.rst index e0ddfaa48b..b2a57ab541 100644 --- a/docs/tutorials/getting_started.rst +++ b/docs/tutorials/getting_started.rst @@ -6,7 +6,7 @@ Installation ============ Qiskit Experiments is built on top of Qiskit, so we recommend that you first install -Qiskit following its :external+qiskit:doc:`installation guide `. Qiskit +Qiskit following its `installation guide `__. Qiskit Experiments supports the same platforms and Python versions (currently **3.7+**) as Qiskit itself. diff --git a/docs/tutorials/index.rst b/docs/tutorials/index.rst index 310c4fdfea..e31f08ffd9 100644 --- a/docs/tutorials/index.rst +++ b/docs/tutorials/index.rst @@ -1,8 +1,8 @@ Tutorials ========= -These tutorials assume some familiarity with Qiskit (on the level of the -:external+qiskit:doc:`introductory tutorials `) but no knowledge of Qiskit Experiments. +These tutorials assume some familiarity with Qiskit (on the level of +`IBM Quantum Documentation's introductory guides `__) but no knowledge of Qiskit Experiments. They're suitable for beginners who want to get started with the package. .. _basics: diff --git a/requirements-dev.txt b/requirements-dev.txt index 4ac3de7dd2..94a4a54192 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -24,6 +24,4 @@ sphinx-copybutton # Pin versions below because of build errors ipykernel<=6.21.3 jupyter-client<=8.0.3 -# Pin symengine because there are no wheels for 0.10 for Python 3.7 -symengine<=0.9.2;python_version<'3.8' ipython<8.13.0 ; python_version<"3.9" # for python 3.8 compatibility diff --git a/requirements.txt b/requirements.txt index 32238bc6c1..37dddfda42 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ numpy>=1.17 scipy>=1.4 -qiskit-terra>=0.22 +qiskit-terra>0.22,<0.25 qiskit-ibm-experiment>=0.2.5 qiskit_dynamics>=0.3.0 matplotlib>=3.4 diff --git a/tools/rclone.conf.enc b/tools/rclone.conf.enc deleted file mode 100644 index 985bd728abc0a83d8ea98cd4d9561b7fa124842f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 304 zcmV-00nh$7&RTYTNLa46ND6UrOuMoPNp}L^N21;+KWICI2ddxLf?x*g*GAzexAhvW z5rTO-?xi4$c>vaY~!DfD~lI0H5)o5;H>qj7M~)ZT{14Fvc91%J)Ycl~B`S zR;dTAK}Qz7!C#ExhwZKgVKh_&DPch2pvl7`Df`TB7^fDm2w+?}@Ltb_s9A^-JfyD- zcV@+wP8bfhSO=k!OfNS+tVO*B2xkEIky>2YRz;z0Ar#-=dP|4$ar~If5$=F}D=bc3 C!HCcR