diff --git a/.dockerignore b/.dockerignore index 4632948fb46..fbdd8682a3d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -19,10 +19,6 @@ __pycache__ # packaging *.egg-info/ -# Sphinx -_build -rtd_docs/generated - # swap files *.swp diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 012b20475d1..5a7e45c8fe7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -185,20 +185,6 @@ jobs: - name: Test dependencies with pip-compile run: | pip-compile --resolver=backtracking dev_tools/requirements/deps/cirq-all.txt -o- - build_docs: - name: Build docs - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.9' - architecture: 'x64' - - name: Install requirements - run: | - pip install -r rtd_docs/requirements.txt - - name: Build docs - run: dev_tools/docs/build-rtd-docs.sh build_protos: name: Build protos runs-on: ubuntu-20.04 diff --git a/.gitignore b/.gitignore index 91874362c50..cc52e694c56 100644 --- a/.gitignore +++ b/.gitignore @@ -20,10 +20,6 @@ __pycache__ *.egg-info/ build/ -# Sphinx -_build -rtd_docs/generated - # API docs docs/api_docs diff --git a/.readthedocs.yml b/.readthedocs.yml deleted file mode 100644 index 14fae040391..00000000000 --- a/.readthedocs.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: 2 -build: - image: latest -python: - version: 3.9 - install: - - requirements: rtd_docs/requirements.txt -sphinx: - configuration: rtd_docs/conf.py \ No newline at end of file diff --git a/README.rst b/README.rst index 2d7d3a23c03..5576492564d 100644 --- a/README.rst +++ b/README.rst @@ -16,10 +16,6 @@ circuits and running them against quantum computers and simulators. .. image:: https://badge.fury.io/py/cirq.svg :target: https://badge.fury.io/py/cirq -.. image:: https://readthedocs.org/projects/cirq/badge/?version=latest - :target: https://readthedocs.org/projects/cirq/versions/ - :alt: Documentation Status - Installation and Documentation ------------------------------ diff --git a/dev_tools/docs/build-rtd-docs.sh b/dev_tools/docs/build-rtd-docs.sh deleted file mode 100755 index 93065b61719..00000000000 --- a/dev_tools/docs/build-rtd-docs.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2018 The Cirq Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -################################################################################ -# Generates a local copy of Cirq's documentation, using Sphinx. -# -# Output currently goes into [REPO_ROOT]/rtd_docs/_build -# -# Temporary files generated by Sphinx (e.g. by the Napoleon extension -# translating google-style docstrings) are put into [REPO_ROOT]/docs/generated, -# which is cleared before and after this command runs. -# -# Usage: -# dev_tools/docs/build-rtd-docs.sh [fast] -# -# fast: sets the concurrency to the number of CPUs (not recommended on Github -# Actions as it sometimes makes the build hung) -################################################################################ - -set -e -trap "{ echo -e '\033[31mFAILED\033[0m'; }" ERR - -[[ $1 == 'fast' ]] && cpus=( -j auto ) || cpus=( ) - -# Get the working directory to the repo root. -cd "$(git rev-parse --show-toplevel)"/rtd_docs - -docs_conf_dir="." -out_dir="${docs_conf_dir}/_build" - -# Cleanup pre-existing temporary generated files. -rm -rf "${docs_conf_dir}/generated" - -# Cleanup previous output. -rm -rf "${out_dir}" - -# Regenerate docs. -sphinx-build -M html "${docs_conf_dir}" "${out_dir}" -W --keep-going "${cpus[@]}" - -# Cleanup newly generated temporary files. -rm -rf "${docs_conf_dir}/generated" - -echo -echo Index Page: -echo "file://${PWD}/${out_dir}/html/index.html" -echo diff --git a/dev_tools/incremental_coverage.py b/dev_tools/incremental_coverage.py index 71f2c53d1d9..044ac8e8411 100644 --- a/dev_tools/incremental_coverage.py +++ b/dev_tools/incremental_coverage.py @@ -21,7 +21,6 @@ IGNORED_FILE_PATTERNS = [ r'^dev_tools/.+', # Environment-heavy code. - r'^rtd_docs/.+', # Environment-heavy code. r'^.+_pb2(_grpc)?\.py$', # Auto-generated protobuf code. r'^(.+/)?setup\.py$', # Installation code. r'^(.+/)?_version\.py$', # Installation code. diff --git a/rtd_docs/.gitignore b/rtd_docs/.gitignore deleted file mode 100644 index a555631fec7..00000000000 --- a/rtd_docs/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -docs -generated -.benchmarks \ No newline at end of file diff --git a/rtd_docs/404.md b/rtd_docs/404.md deleted file mode 100644 index 2cd583625fd..00000000000 --- a/rtd_docs/404.md +++ /dev/null @@ -1,7 +0,0 @@ -![](./Cirq_logo_color.png) - -# Cirq - -We moved to a new site: [https://quantumai.google](https://quantumai.google). - -You will be automatically redirected shortly... \ No newline at end of file diff --git a/rtd_docs/Cirq_logo_color.png b/rtd_docs/Cirq_logo_color.png deleted file mode 100644 index 5547b739926..00000000000 Binary files a/rtd_docs/Cirq_logo_color.png and /dev/null differ diff --git a/rtd_docs/Cirq_logo_notext.png b/rtd_docs/Cirq_logo_notext.png deleted file mode 100644 index ad0fcb7c9cd..00000000000 Binary files a/rtd_docs/Cirq_logo_notext.png and /dev/null differ diff --git a/rtd_docs/Makefile b/rtd_docs/Makefile deleted file mode 100644 index d4bb2cbb9ed..00000000000 --- a/rtd_docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/rtd_docs/__init__.py b/rtd_docs/__init__.py deleted file mode 100644 index 0c8b04cb4b7..00000000000 --- a/rtd_docs/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2018 The Cirq Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/rtd_docs/_templates/autosummary/class.rst b/rtd_docs/_templates/autosummary/class.rst deleted file mode 100644 index dda61dd7fb0..00000000000 --- a/rtd_docs/_templates/autosummary/class.rst +++ /dev/null @@ -1,33 +0,0 @@ -{{ fullname | escape | underline}} - -.. currentmodule:: {{ module }} - -.. autoclass:: {{ objname }} - - {% block methods %} - .. automethod:: __init__ - {% if methods %} - .. rubric:: Methods - - {# Generates docs for the listed functions. #} - .. autosummary:: - :toctree: . - {% for item in methods %} - {% if item != '__init__' %} - ~{{ name }}.{{ item }} - {% endif %} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block attributes %} - {% if attributes %} - .. rubric:: Attributes - - .. autosummary:: - :toctree: . - {% for item in attributes %} - ~{{ name }}.{{ item }} - {%- endfor %} - {% endif %} - {% endblock %} diff --git a/rtd_docs/_templates/autosummary/module.rst b/rtd_docs/_templates/autosummary/module.rst deleted file mode 100644 index 3abee6f3632..00000000000 --- a/rtd_docs/_templates/autosummary/module.rst +++ /dev/null @@ -1,41 +0,0 @@ -{{ fullname | escape | underline}} - -.. automodule:: {{ fullname }} - - {% block functions %} - {% if functions %} - .. rubric:: Functions - - {# Customized from original by adding toctree. This generates docs for the - listed functions. #} - .. autosummary:: - :toctree: . - {% for item in functions %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block classes %} - {% if classes %} - .. rubric:: Classes - - .. autosummary:: - :toctree: . - {% for item in classes %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block exceptions %} - {% if exceptions %} - .. rubric:: Exceptions - - .. autosummary:: - :toctree: . - {% for item in exceptions %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} diff --git a/rtd_docs/_templates/breadcrumbs.html b/rtd_docs/_templates/breadcrumbs.html deleted file mode 100644 index e4d1526e945..00000000000 --- a/rtd_docs/_templates/breadcrumbs.html +++ /dev/null @@ -1,3 +0,0 @@ -{%- extends "sphinx_rtd_theme/breadcrumbs.html" %} -{% block breadcrumbs_aside %} -{% endblock %} diff --git a/rtd_docs/_templates/layout.html b/rtd_docs/_templates/layout.html deleted file mode 100644 index cfb4bce4f60..00000000000 --- a/rtd_docs/_templates/layout.html +++ /dev/null @@ -1,6 +0,0 @@ -{% extends "!layout.html" %} -{% block extrahead %} - {{ super() }} - - -{% endblock %} diff --git a/rtd_docs/conf.py b/rtd_docs/conf.py deleted file mode 100644 index b09e694ac8d..00000000000 --- a/rtd_docs/conf.py +++ /dev/null @@ -1,88 +0,0 @@ -# pragma: no cover - -# The content for all documentation lives in ../docs. That folder is -# following the structure for the Google Quantum site configured for the -# internal CMS, devsite. The readthedocs layer is a secondary, which generates -# the content using sphinx to readthedocs.io until we go live with the devsite. -# -# This is the configuration file for the Sphinx documentation builder. -# See http://www.sphinx-doc.org/en/master/config for help - -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# - -import os -import sys - -cirq_root_path = os.path.dirname(os.path.dirname(__file__)) -sys.path.insert(0, cirq_root_path) - -# -- Project information ----------------------------------------------------- - -project = 'Cirq' -copyright = '2018-2024, The Cirq Developers' # pylint: disable=redefined-builtin -author = 'The Cirq Developers' - -# The short X.Y version -version = "" # '.'.join(release.split('.')[:2]) - -# -- General configuration --------------------------------------------------- - -# If your documentation needs a minimal Sphinx version, state it here. -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = ['myst_parser', 'notfound.extension'] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# Allow markdown includes. -# http://www.sphinx-doc.org/en/main/markdown.html -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -source_suffix = {'.rst': 'restructuredtext', '.md': 'markdown'} - -# The main toctree document. -root_doc = 'index' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = 'en' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path . -exclude_patterns = ['Thumbs.db', '.DS_Store'] - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# -- Options for HTML output --------------------------------------------- - -html_theme = 'sphinx_rtd_theme' -html_favicon = 'favicon.ico' -# html_theme_options = {} - -# Custom sidebar templates, must be a dictionary that maps document names -# to template names. -# -# The default sidebars (for documents that don't match any pattern) are -# defined by theme itself. Builtin themes are using these templates by -# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', -# 'searchbox.html']``. -# -# html_sidebars = {} - -html_logo = 'Cirq_logo_notext.png' -html_css_files = ['tweak-style.css'] diff --git a/rtd_docs/favicon.ico b/rtd_docs/favicon.ico deleted file mode 100644 index 1c522795a3e..00000000000 Binary files a/rtd_docs/favicon.ico and /dev/null differ diff --git a/rtd_docs/index.md b/rtd_docs/index.md deleted file mode 100644 index 2cd583625fd..00000000000 --- a/rtd_docs/index.md +++ /dev/null @@ -1,7 +0,0 @@ -![](./Cirq_logo_color.png) - -# Cirq - -We moved to a new site: [https://quantumai.google](https://quantumai.google). - -You will be automatically redirected shortly... \ No newline at end of file diff --git a/rtd_docs/requirements.txt b/rtd_docs/requirements.txt deleted file mode 100644 index 37e0fef66f3..00000000000 --- a/rtd_docs/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -# For generating documentation. -myst-parser -Sphinx==7.* -sphinx_rtd_theme -sphinx-notfound-page