Skip to content
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

Extracting cirq-ionq #4205

Merged
merged 11 commits into from
Jun 17, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
api docs + tests
  • Loading branch information
balopat committed Jun 15, 2021
commit e98543c066a980a644ebfdfc2f01dad6b3c37ed1
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ jobs:
with:
python-version: '3.7'
architecture: 'x64'
- name: Install requirements
run: pip install -r dev_tools/deps/tensorflow-docs.txt
- name: Doc check
run: check/nbformat
cirq-only:
Expand Down
2 changes: 2 additions & 0 deletions check/nbformat
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ done
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$(git rev-parse --show-toplevel)"

pip show tensorflow-docs > /dev/null || exit 1

FORMAT_CMD="python3 -m tensorflow_docs.tools.nbfmt --indent=1"

# Test the notebooks
Expand Down
12 changes: 5 additions & 7 deletions cirq-aqt/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@

name = 'cirq-aqt'

description = (
'A framework for creating, editing, and invoking '
'Noisy Intermediate Scale Quantum (NISQ) circuits.'
)
description = ('A Cirq package to simulate and connect to Alpine Quantum Technologies'
' quantum computers')

# README file as long_description.
long_description = io.open('README.rst', encoding='utf-8').read()
Expand All @@ -38,9 +36,9 @@
if 'CIRQ_PRE_RELEASE_VERSION' in os.environ:
__version__ = os.environ['CIRQ_PRE_RELEASE_VERSION']
long_description = (
"**This is a development version of Cirq-AQT and may be "
"unstable.**\n\n**For the latest stable release of Cirq-AQT "
"see**\n`here <https://pypi.org/project/cirq-aqt>`__.\n\n" + long_description
"**This is a development version of Cirq-AQT and may be "
"unstable.**\n\n**For the latest stable release of Cirq-AQT "
"see**\n`here <https://pypi.org/project/cirq-aqt>`__.\n\n" + long_description
)

# Read in requirements
Expand Down
2 changes: 1 addition & 1 deletion cirq-ionq/cirq_ionq/json_test_data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# For the cirq_aqt module, this file specifies test data for JSON
# For the cirq_ionq module, this file specifies test data for JSON
# serialization of public objects. It is used by
# cirq/protocols/json_serialization_test.py which checks for coverage of
# public classes and tests the correctness of repr and json results
Expand Down
3 changes: 1 addition & 2 deletions cirq-ionq/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
name = 'cirq-ionq'

description = (
'A framework for creating, editing, and invoking '
'Noisy Intermediate Scale Quantum (NISQ) circuits.'
'A Cirq package to simulate and connect to IonQ quantum computers'
)

# README file as long_description.
Expand Down
11 changes: 5 additions & 6 deletions dev_tools/docs/build_api_docs.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright 2020 The Cirq Authors. All Rights Reserved.
# Copyright 2021 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
#
# http://www.apache.org/licenses/LICENSE-2.0
# 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,
Expand Down Expand Up @@ -74,6 +74,7 @@ def main(unused_argv):
generate_cirq()
generate_cirq_google()
generate_cirq_aqt()
generate_cirq_ionq()


def generate_cirq():
Expand All @@ -99,8 +100,7 @@ def generate_cirq_aqt():
# should be present in the nightly (pre-release) build
import cirq_aqt
except ImportError:
# as cirq.aqt is currently not being generated anyway
# we won't handle this case (the stable build)
# as cirq.aqt is under cirq, it should be generated correctly
return

doc_generator = generate_lib.DocGenerator(
Expand All @@ -126,8 +126,7 @@ def generate_cirq_ionq():
# should be present in the nightly (pre-release) build
import cirq_ionq
except ImportError:
# TODO: somehow replace the prefix link in the generated cirq.ionq API docs to
# cirq-ionq/cirq_ionq, so that links on the site don't break
# as cirq.ionq is under cirq, it should be generated correctly
return

doc_generator = generate_lib.DocGenerator(
Expand Down
1 change: 1 addition & 0 deletions dev_tools/requirements/deps/dev-tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
-r pylint.txt
-r protos.txt
-r notebook.txt
-r tensorflow-docs.txt

# For testing and analyzing code.
asv
Expand Down
2 changes: 0 additions & 2 deletions dev_tools/requirements/deps/nbformat.txt

This file was deleted.

1 change: 1 addition & 0 deletions dev_tools/requirements/deps/tensorflow-docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git+https://github.com/tensorflow/docs@3e08f1e1739dede8d9f6f283b4353bf330ca0506