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

Use pip-compile for CI dependencies #818

Merged
merged 7 commits into from
May 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
28 changes: 12 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v1
with:
python-version: '3.8'
python-version: '3.10'
architecture: 'x64'
- name: Install yapf
run: cat dev_tools/conf/pip-list-dev-tools.txt | grep yapf | xargs pip install
run: pip install -r dev_tools/requirements/format.env.txt
- name: Format
run: check/format-incremental
mypy:
Expand All @@ -25,10 +25,10 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.8'
python-version: '3.10'
architecture: 'x64'
- name: Install mypy
run: cat dev_tools/conf/pip-list-dev-tools.txt | grep mypy | xargs pip install
run: pip install -r dev_tools/requirements/mypy.env.txt
- name: Type check
run: check/mypy
lint:
Expand All @@ -38,10 +38,10 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.8'
python-version: '3.10'
architecture: 'x64'
- name: Install pylint
run: cat dev_tools/conf/pip-list-dev-tools.txt | grep "pylint\|astroid" | grep -v "#" | xargs pip install
run: pip install -r dev_tools/requirements/pylint.env.txt
- name: Lint
run: check/pylint
pytest:
Expand All @@ -51,8 +51,8 @@ jobs:
matrix:
# On each operating system, check latest version of python and cirq
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ '3.9' ]
cirq-version: [ '~=1.0.0' ]
python-version: [ '3.10' ]
cirq-version: [ '~=1.0' ]
# Also check least-supported versions (linux only)
include:
- os: ubuntu-latest
Expand All @@ -66,8 +66,8 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: |
pip install -r dev_tools/conf/pip-list-dev-tools.txt
pip install cirq-core${{matrix.cirq-version}} cirq-google${{matrix.cirq-version}} -r requirements.txt
pip install -r dev_tools/requirements/pytest.env.txt
pip install cirq-core${{matrix.cirq-version}}
- name: Pytest check
run: check/pytest
shell: bash
Expand All @@ -80,13 +80,9 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v1
with:
python-version: '3.8'
python-version: '3.10'
architecture: 'x64'
- name: Install requirements
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install -r dev_tools/conf/pip-list-dev-tools.txt
git config --global user.name ${GITHUB_ACTOR}
run: pip install -r dev_tools/requirements/pytest.env.txt
- name: Coverage check
run: check/pytest-and-incremental-coverage
7 changes: 3 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ '3.9' ]
python-version: [ '3.10' ]
fail-fast: false
steps:
- uses: actions/checkout@v2
Expand All @@ -20,9 +20,8 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: |
pip install -r dev_tools/conf/pip-list-dev-tools.txt
pip install -r requirements.txt
pip install -U cirq-core cirq-google --pre
pip install -r dev_tools/requirements/pytest.env.txt
pip install -U cirq-core --pre
- name: Pytest check
run: check/pytest
shell: bash
8 changes: 0 additions & 8 deletions dev_tools/conf/pip-list-dev-tools.txt

This file was deleted.

7 changes: 7 additions & 0 deletions dev_tools/requirements/deps/dev-tools.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pip-tools

-r mypy.txt
-r pytest.txt
-r format.txt
-r pylint.txt
-r packaging.txt
1 change: 1 addition & 0 deletions dev_tools/requirements/deps/format.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yapf~=0.27.0
1 change: 1 addition & 0 deletions dev_tools/requirements/deps/mypy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mypy~=0.782.0
9 changes: 9 additions & 0 deletions dev_tools/requirements/deps/packaging.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# for testing packaging in isolation
virtualenv

# for creating packages
setuptools
wheel

# for uploading packages to pypi
twine
2 changes: 2 additions & 0 deletions dev_tools/requirements/deps/pylint.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pylint~=2.15.6

6 changes: 6 additions & 0 deletions dev_tools/requirements/deps/pytest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pytest
pytest-asyncio
pytest-cov
pytest-xdist

nbformat
6 changes: 4 additions & 2 deletions requirements.txt → dev_tools/requirements/deps/runtime.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
cirq-core>=0.15.0
cirq-google>=0.15.0
cirq-core~=1.0
deprecation
h5py>=2.8
networkx
numpy>=1.11.0
pubchempy
requests>=2.18

# https://github.com/scipy/scipy/issues/18250
scipy>=1.1.0,<1.10.0

sympy
Loading