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

Consolidate dependencies #4131

Merged
merged 16 commits into from
May 28, 2021
Merged

Conversation

balopat
Copy link
Contributor

@balopat balopat commented May 25, 2021

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 #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.

@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label May 25, 2021
@balopat balopat changed the title [WIP] Introduce dependency compilation and reuse Consolidate dependencies May 26, 2021
@balopat balopat marked this pull request as ready for review May 26, 2021 01:02
@balopat balopat requested review from cduck, vtomole and a team as code owners May 26, 2021 01:02
@balopat balopat requested a review from dstrain115 May 26, 2021 01:02
Copy link
Collaborator

@mpharrigan mpharrigan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweet!

dev_tools/requirements/deps/nbformat.txt Show resolved Hide resolved
@balopat balopat added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label May 27, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label May 27, 2021
@CirqBot CirqBot merged commit 836bbda into quantumlib:master May 28, 2021
@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels May 28, 2021
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants