Skip to content

Commit 50f0ac3

Browse files
Merge pull request #516 from lovesegfault/split-dev-deps-redux
refactor: split dev requirements out of main requirements.txt
2 parents f8a2059 + 8503958 commit 50f0ac3

File tree

9 files changed

+23
-15
lines changed

9 files changed

+23
-15
lines changed

.github/workflows/cirq_compatibility.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@ jobs:
1818
run: pip3 install -U cirq --pre
1919
- name: Install qsim requirements
2020
run: pip3 install -r requirements.txt
21+
- name: Install test requirements
22+
run: pip3 install -r dev-requirements.txt
2123
- name: Run python tests
2224
run: make run-py-tests

.github/workflows/python_format.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ jobs:
2424
with:
2525
python-version: '3.7'
2626
architecture: 'x64'
27-
- name: Install flynt
28-
run: cat requirements.txt | grep flynt | xargs pip install
29-
- name: Install black
30-
run: cat requirements.txt | grep black | xargs pip install
27+
- name: Install dev requirements
28+
run: pip install -r dev-requirements.txt
3129
- name: Format
3230
run: check/format-incremental

.github/workflows/release_wheels.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
CIBW_BEFORE_BUILD_MACOS: "brew install libomp"
4040
CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""
4141
# due to package and module name conflict have to temporarily move it away to run tests
42-
CIBW_BEFORE_TEST: "mv {package}/qsimcirq /tmp"
42+
CIBW_BEFORE_TEST: mv {package}/qsimcirq /tmp
43+
CIBW_TEST_EXTRAS: "dev"
4344
CIBW_TEST_COMMAND: "pytest {package}/qsimcirq_tests/qsimcirq_test.py && mv /tmp/qsimcirq {package}"
4445
steps:
4546
- uses: actions/checkout@v2

.github/workflows/testing_wheels.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""
4646
# due to package and module name conflict have to temporarily move it away to run tests
4747
CIBW_BEFORE_TEST: "mv {package}/qsimcirq /tmp"
48+
CIBW_TEST_EXTRAS: "dev"
4849
CIBW_TEST_COMMAND: "pytest {package}/qsimcirq_tests/qsimcirq_test.py && mv /tmp/qsimcirq {package}"
4950
steps:
5051
- uses: actions/checkout@v2

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
include requirements.txt
2+
include dev-requirements.txt
23
include CMakeLists.txt
34

45
graft pybind_interface

dev-requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
black==20.8b1
2+
flynt~=0.60
3+
pytest

docs/install_qsimcirq.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ Prerequisites are included in the
1717
[`requirements.txt`](https://github.com/quantumlib/qsim/blob/master/requirements.txt)
1818
file, and will be automatically installed along with qsimcirq.
1919

20+
If you'd like to develop qsimcirq, a separate set of dependencies are includes
21+
in the
22+
[`dev-requirements.txt`](https://github.com/quantumlib/qsim/blob/master/dev-requirements.txt)
23+
file. You can install them with `pip3 install -r dev-requirements.txt` or
24+
`pip3 install qsimcirq[dev]`.
25+
2026
## Linux installation
2127

2228
We provide `qsimcirq` Python wheels on 64-bit `x86` architectures with `Python 3.{6,7,8,9}`.

requirements.txt

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
# Runtime requirements for the python 3 version of cirq.
2-
1+
absl-py
32
cirq-core
43
numpy~=1.16
5-
typing_extensions
6-
absl-py
7-
8-
# Build and test requirements
9-
10-
black==20.8b1
11-
flynt~=0.60
124
pybind11
13-
pytest
5+
typing_extensions

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def build_extension(self, ext):
7878

7979

8080
requirements = open("requirements.txt").readlines()
81+
dev_requirements = open("dev-requirements.txt").readlines()
8182

8283
description = "Schrödinger and Schrödinger-Feynman simulators for quantum circuits."
8384

@@ -95,6 +96,9 @@ def build_extension(self, ext):
9596
author_email="[email protected]",
9697
python_requires=">=3.3.0",
9798
install_requires=requirements,
99+
extras_require={
100+
"dev": dev_requirements,
101+
},
98102
license="Apache 2",
99103
description=description,
100104
long_description=long_description,

0 commit comments

Comments
 (0)