forked from quantumlib/Cirq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate dependencies (quantumlib#4131)
Moves all dependency logic to requirements.txt file composition rules. Setting up your local env now is just a single line: `pip install -r dev_tools/requirements/dev.env.txt` Each job in CI is referring to a single pip requirements file ,e.g. `dev_tools/requirements/mypy.env.txt` - which in turn includes -`./deps/cirq-all.txt` and `./deps/mypy.txt`. `dev_tools/requirements/deps/cirq-all.txt` is a single place to define all the dependencies for all cirq modules. This will mainly help with the issues listed in quantumlib#3996 as - it centralizes the list of cirq modules in a single place, - removes the 'cat req.txt | grep pytest | xargs pip install` type of instructions that are error-prone and slow (separate calls to pip install vs a single call for all the requirements) All in all, it will help with making our scripts more scalable as more modules are extracted.
- Loading branch information
Showing
35 changed files
with
282 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# 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 | ||
# | ||
# 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. | ||
|
||
from dev_tools.requirements.reqs import explode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-r ../../cirq-core/requirements.txt | ||
-r deps/dev-tools.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# captures all the modules | ||
-r ../../../cirq-core/requirements.txt | ||
-r ../../../cirq-google/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# captures all the modules, including contrib | ||
|
||
-r cirq-all-no-contrib.txt | ||
-r ../../../cirq-core/cirq/contrib/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
-r mypy.txt | ||
-r pytest.txt | ||
-r format.txt | ||
-r pylint.txt | ||
-r protos.txt | ||
-r notebook.txt | ||
|
||
# For testing and analyzing code. | ||
asv | ||
virtualenv | ||
|
||
# For uploading packages to pypi. | ||
twine | ||
|
||
# For verifying behavior of Quil output. | ||
pyquil~=2.21.0 | ||
|
||
# For verifying behavior of qasm output. | ||
qiskit-aer~=0.7.6 | ||
|
||
# For verifying rst | ||
rstcheck~=3.3.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
flynt~=0.60 | ||
black==20.8b1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# the mypy dependency file | ||
mypy~=0.782.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# TODO: add latest commit retrieval to compile.py - pip-compile can't upgrade automatically | ||
git+https://github.com/tensorflow/docs@b3dc8a922d8bdc6e998a8ad4f4953359dc6e576a |
15 changes: 6 additions & 9 deletions
15
...notebooks/requirements-notebook-tests.txt → dev_tools/requirements/deps/notebook.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
pytest>=6.0.0 | ||
pytest-xdist~=2.2.0 | ||
filelock~=3.0.12 | ||
|
||
papermill~=2.3.2 | ||
notebook~=6.2.0 | ||
|
||
# https://github.com/nteract/papermill/issues/519 | ||
ipykernel==5.3.4 | ||
|
||
# https://github.com/ipython/ipython/issues/12941 | ||
ipython==7.22 | ||
ipython==7.22; python_version >= '3.7' | ||
ipython; python_version < '3.7' | ||
|
||
# assumed to be part of colab | ||
seaborn~=0.11.1 | ||
# for executing notebooks in tests | ||
papermill~=2.3.2 | ||
|
||
ipython==7.22 | ||
# assumed to be part of colab | ||
seaborn~=0.11.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# dependencies for proto generation - used by cirq-google | ||
|
||
# 1.26.0 is the min version that has python 3.8 wheels | ||
# however, we can't really go much higher - the protoc version needs to be <= 3.9.2 | ||
# otherwise it will generate pb2 files that are incompatible with tensorflow quantum | ||
grpcio-tools~=1.26.0 | ||
|
||
mypy-protobuf==1.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# for linting | ||
|
||
pylint~=2.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# dependencies to run pytest | ||
|
||
pytest | ||
pytest-asyncio | ||
pytest-cov | ||
|
||
# for parallel testing notebooks | ||
pytest-xdist~=2.2.0 | ||
filelock~=3.0.12 | ||
|
||
# For testing time specific logic | ||
freezegun~=0.3.15 | ||
|
||
# for python 3.7 and below needs to be installed | ||
importlib-metadata; python_version < '3.8' | ||
|
||
# codeowners test dependency | ||
codeowners; python_version >= '3.7' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This file describes a full blown development environment with cirq | ||
# It installs the dependencies of all the modules | ||
# compile it with pip-compile dev_tools/requirements/dev.txt | ||
|
||
-r deps/cirq-all.txt | ||
-r deps/dev-tools.txt | ||
|
Oops, something went wrong.