This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix pip environment resolution (#798)
Calling `pip install` multiple times can (deeply unfortunately) allow an environment to become out-of-sync; `pip` doesn't "remember" the constraints of previous installation commands. One of the largest effects here is that doing `pip install -e .` _followed_ by `pip install git+<qiskit>@main` installs `qiskit-terra` from the initial installation (via `qiskit==0.45.2`), then installs `qiskit==1.0.0.dev0` from Git, which is an incompatible environment. Doing the whole environment resolution in a single `pip install` command fixes this, as the `qiskit` dependency is correctly resolved to be _only_ the `1.0.0.dev0` version. Co-authored-by: Kevin Tian <[email protected]>
- Loading branch information
1 parent
e237158
commit fc0c4ae
Showing
4 changed files
with
15 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,8 +33,7 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -c constraints.txt -e . | ||
pip install -U -c constraints.txt -r requirements-dev.txt | ||
pip install -c constraints.txt -r requirements-dev.txt -e . | ||
- name: Run black | ||
run: make style | ||
- name: Run lint | ||
|
@@ -91,8 +90,7 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -c constraints.txt -e . | ||
pip install -U -c constraints.txt -r requirements-dev.txt | ||
pip install -c constraints.txt -r requirements-dev.txt -e . | ||
- name: Run unit tests | ||
run: make unit-test-coverage | ||
- name: Report coverage to coveralls.io | ||
|
@@ -134,8 +132,7 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e . | ||
pip install -r requirements-dev.txt | ||
pip install -c constraints.txt -e . -r requirements-dev.txt | ||
- name: Run integration tests 1 | ||
run: make integration-test-1 | ||
integration-tests-2: | ||
|
@@ -170,8 +167,7 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e . | ||
pip install -r requirements-dev.txt | ||
pip install -c constraints.txt -e . -r requirements-dev.txt | ||
- name: Run integration tests 2 | ||
run: make integration-test-2 | ||
integration-tests-3: | ||
|
@@ -206,8 +202,7 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e . | ||
pip install -r requirements-dev.txt | ||
pip install -c constraints.txt -e . -r requirements-dev.txt | ||
- name: Run integration tests 3 | ||
run: make integration-test-3 | ||
tests-finished: | ||
|
@@ -220,4 +215,4 @@ jobs: | |
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
parallel-finished: true | ||
parallel-finished: true |
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 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