Skip to content

Commit

Permalink
Remove non-API docs and tutorials (#11352)
Browse files Browse the repository at this point in the history
* Remove non-API docs and tutorials

* Remove sphinx-design

* Fix bad reference

* Fix bad deploy step

* Remove translatable strings script

(cherry picked from commit c75af15)

# Conflicts:
#	docs/api_redirects.txt
#	docs/conf.py
#	docs/getting_started.rst
#	docs/index.rst
#	docs/legacy_release_notes.rst
#	docs/migration_guides/opflow_migration.rst
#	docs/tutorials.rst
#	docs/tutorials/circuits_advanced/06_building_pulse_schedules.ipynb
#	releasenotes/notes/platform-support-f7f693aaf5dec044.yaml
#	tools/deploy_translatable_strings.sh
  • Loading branch information
Eric-Arellano authored and mergify[bot] committed Dec 11, 2023
1 parent 908e555 commit 1ce2bc2
Show file tree
Hide file tree
Showing 49 changed files with 185 additions and 21,824 deletions.
42 changes: 0 additions & 42 deletions .azure/tutorials-linux.yml

This file was deleted.

61 changes: 1 addition & 60 deletions .github/workflows/docs_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ on:
description: "Push to qiskit.org?"
required: false
type: boolean
do_translatables:
description: "Push translatable strings?"
required: false
type: boolean

jobs:
build:
Expand Down Expand Up @@ -53,33 +49,8 @@ jobs:
- name: Install dependencies
run: tools/install_ubuntu_docs_dependencies.sh

# This is just to have tox create the environment, so we can use it to execute the tutorials.
# We want to re-use it later for the build, hence 'tox run --notest' instead of 'tox devenv'.
- name: Prepare Python environment
run: tox run -e docs --notest

# The reason to use the custom script rather than letting 'nbsphinx' do its thing normally
# within the Sphinx build is so that the execution process is the same as in the test CI.
- name: Execute tutorials in place
run: .tox/docs/bin/python tools/execute_tutorials.py docs/tutorials
env:
QISKIT_CELL_TIMEOUT: "300"

- name: Build documentation
# We can skip re-installing the package, since we just did it a couple of steps ago.
run: tox run -e docs --skip-pkg-install
env:
QISKIT_ENABLE_ANALYTICS: "true"
# We've already built them.
QISKIT_DOCS_BUILD_TUTORIALS: "never"
DOCS_PROD_BUILD: "true"

- name: Build translatable strings
run: tox run -e gettext
env:
# We've already built them.
QISKIT_DOCS_BUILD_TUTORIALS: "never"
DOCS_PROD_BUILD: "true"
run: tox run -e docs

- name: Store built documentation artifact
uses: actions/upload-artifact@v3
Expand All @@ -91,13 +62,6 @@ jobs:
!**/.buildinfo
if-no-files-found: error

- name: Store translatable strings artifact
uses: actions/upload-artifact@v3
with:
name: qiskit-translatables
path: ./docs/locale/en/*
if-no-files-found: error

deploy:
if: github.event_name != 'workflow_dispatch' || inputs.do_deployment
name: Deploy to qiskit.org
Expand Down Expand Up @@ -198,26 +162,3 @@ jobs:
JOINED_PREFIXES: ${{ steps.choose.outputs.joined_prefixes }}
RCLONE_KEY: ${{ secrets.ENCRYPTED_RCLONE_KEY}}
RCLONE_IV: ${{ secrets.ENCRYPTED_RCLONE_IV }}

deploy_translatables:
if: (github.event_name == 'workflow_dispatch' && inputs.do_translatables) || (github.event_name == 'push' && github.ref_type == 'tag' && github.ref_name == needs.build.outputs.latest_tag)
name: Push translatable strings
needs: [build]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
path: 'qiskit'

- uses: actions/download-artifact@v3
with:
name: qiskit-translatables
path: 'deploy'

- name: Deploy translations
id: ssh_key
run: qiskit/tools/deploy_translatable_strings.sh "${{ github.workspace }}/deploy"
env:
encrypted_deploy_po_branch_key: ${{ secrets.ENCRYPTED_DEPLOY_PO_BRANCH_KEY }}
encrypted_deploy_po_branch_iv: ${{ secrets.ENCRYPTED_DEPLOY_PO_BRANCH_IV }}
14 changes: 2 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ parameters:
type: string
default: "3.9"

- name: "tutorialsPythonVersion"
displayName: "Version of Python to use to run the tutorials job"
type: string
default: "3.8"

# Sync with 'python-version' in '.github/workflows/docs_deploy.yml'.
- name: "documentationPythonVersion"
displayName: "Version of Python to use to build Sphinx documentation"
Expand Down Expand Up @@ -162,18 +157,13 @@ stages:
testImages: true

# The rest of the PR pipeline is to test the oldest and newest supported
# versions of Python, along with the integration tests (via the tutorials).
# It's very rare for a failure to be specific to an intermediate version of
# versions of Python. It's very rare for a failure to be specific to an intermediate version of
# Python, so we just catch those in the cron-job pipeline to reduce the
# amount of resources used.
- stage: "Tutorials_and_Tests"
- stage: "Tests"
displayName: "Main tests"
dependsOn: "Lint_Docs_Prelim_Tests"
jobs:
- template: ".azure/tutorials-linux.yml"
parameters:
pythonVersion: ${{ parameters.tutorialsPythonVersion }}

- template: ".azure/test-linux.yml"
parameters:
pythonVersion: ${{ parameters.maximumPythonVersion }}
Expand Down
Binary file removed docs/_static/images/1xp.png
Binary file not shown.
Binary file removed docs/_static/images/ibm_qlab.png
Binary file not shown.
Binary file removed docs/_static/images/strangeworks.png
Binary file not shown.
61 changes: 5 additions & 56 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@

import datetime
import doctest
import os
import subprocess
from pathlib import Path

project = "Qiskit"
project_copyright = f"2017-{datetime.date.today().year}, Qiskit Development Team"
Expand All @@ -44,16 +41,10 @@
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.mathjax",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx.ext.doctest",
"nbsphinx",
"matplotlib.sphinxext.plot_directive",
"qiskit_sphinx_theme",
"reno.sphinxext",
"sphinx_design",
"sphinx_remove_toctrees",
"sphinx_reredirects",
]

templates_path = ["_templates"]
Expand All @@ -63,31 +54,9 @@
# Available keys are 'figure', 'table', 'code-block' and 'section'. '%s' is the number.
numfig_format = {"table": "Table %s"}

# Translations configuration.
translations_list = [
("en", "English"),
("bn_BN", "Bengali"),
("fr_FR", "French"),
("de_DE", "German"),
("ja_JP", "Japanese"),
("ko_KR", "Korean"),
("pt_UN", "Portuguese"),
("es_UN", "Spanish"),
("ta_IN", "Tamil"),
]
locale_dirs = ["locale/"]
gettext_compact = False

# Relative to source directory, affects general discovery, and html_static_path and html_extra_path.
exclude_patterns = ["_build", "**.ipynb_checkpoints"]

pygments_style = "colorful"

panels_css_variables = {
"tabs-color-label-active": "rgb(138, 63, 252)",
"tabs-color-label-inactive": "rgb(221, 225, 230)",
}


# This adds the module name to e.g. function API docs. We use the default of True because our
# module pages sometimes have functions from submodules on the page, and we want to make clear
Expand All @@ -102,17 +71,8 @@
modindex_common_prefix = ["qiskit."]

# ----------------------------------------------------------------------------------
# Extlinks
# Intersphinx
# ----------------------------------------------------------------------------------
# Refer to https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html
extlinks = {
"pull_terra": ("https://github.com/Qiskit/qiskit-terra/pull/%s", "qiskit-terra #%s"),
"pull_aer": ("https://github.com/Qiskit/qiskit-aer/pull/%s", "qiskit-aer #%s"),
"pull_ibmq-provider": (
"https://github.com/Qiskit/qiskit-ibmq-provider/pull/%s",
"qiskit-ibmq-provider #%s",
),
}

intersphinx_mapping = {
"rustworkx": ("https://qiskit.org/ecosystem/rustworkx/", None),
Expand All @@ -127,22 +87,8 @@
# HTML theme
# ----------------------------------------------------------------------------------

html_theme = "qiskit"
html_favicon = "images/favicon.ico"
html_theme = "alabaster"
html_last_updated_fmt = "%Y/%m/%d"
html_context = {
# Enable segment analytics for qiskit.org/documentation
"analytics_enabled": bool(os.getenv("QISKIT_ENABLE_ANALYTICS", "")),
"theme_announcement": "🎉 Starting on November 29, 2023, Qiskit Documentation will only live on IBM Quantum",
"announcement_url": "https://medium.com/qiskit/important-changes-to-qiskit-documentation-and-learning-resources-7f4e346b19ab",
"announcement_url_text": "Learn More",
}
html_static_path = ["_static"]

# This speeds up the docs build because it works around the Furo theme's slowdown from the left
# sidebar when the site has lots of HTML pages. But, it results in a much worse user experience,
# so we only use it in dev/CI builds.
remove_from_toctrees = ["stubs/*"]

# ----------------------------------------------------------------------------------
# Autodoc
Expand Down Expand Up @@ -211,6 +157,7 @@
# ----------------------------------------------------------------------------------

plot_html_show_formats = False
<<<<<<< HEAD


# ----------------------------------------------------------------------------------
Expand Down Expand Up @@ -306,3 +253,5 @@ def add_versions_to_config(_app, config):

def setup(app):
app.connect("config-inited", add_versions_to_config)
=======
>>>>>>> c75af150f (Remove non-API docs and tutorials (#11352))
98 changes: 0 additions & 98 deletions docs/configuration.rst

This file was deleted.

Loading

0 comments on commit 1ce2bc2

Please sign in to comment.