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

fix: avoid broken rustworkx version for Python 3.7 #37

Merged
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
58 changes: 33 additions & 25 deletions .github/actions/install-main-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ inputs:
terra-main:
description: 'Use Terra main'
required: true
nature-main:
description: 'Use Nature main'
required: true
runs:
using: "composite"
steps:
Expand Down Expand Up @@ -87,32 +90,37 @@ runs:
shell: bash
- name: Install Nature from Main
run: |
echo 'Install Nature from Main'
BASE_DIR=nature-cache
build_from_main=true
cache_hit=${{ steps.nature-cache.outputs.cache-hit }}
echo "cache hit: ${cache_hit}"
if [ "$cache_hit" == "true" ]; then
pip_result=0
pushd "${BASE_DIR}"
python -m pip install *.whl && pip_result=$? || pip_result=$?
popd
if [ $pip_result == 0 ]; then
build_from_main=false
if [ "${{ inputs.nature-main }}" == "true" ]; then
echo 'Install Nature from Main'
BASE_DIR=nature-cache
build_from_main=true
cache_hit=${{ steps.nature-cache.outputs.cache-hit }}
echo "cache hit: ${cache_hit}"
if [ "$cache_hit" == "true" ]; then
pip_result=0
pushd "${BASE_DIR}"
python -m pip install *.whl && pip_result=$? || pip_result=$?
popd
if [ $pip_result == 0 ]; then
build_from_main=false
fi
else
mkdir -p ${BASE_DIR}
fi
if [ "$build_from_main" == "true" ]; then
echo 'Create wheel file from main'
pip install -U wheel
git clone --depth 1 --branch main https://github.com/Qiskit/qiskit-nature.git /tmp/qiskit-nature
pushd /tmp/qiskit-nature
python setup.py bdist_wheel
popd
cp -rf /tmp/qiskit-nature/dist/*.whl "${BASE_DIR}"
pushd "${BASE_DIR}"
python -m pip install *.whl
popd
fi
else
mkdir -p ${BASE_DIR}
fi
if [ "$build_from_main" == "true" ]; then
echo 'Create wheel file from main'
pip install -U wheel
git clone --depth 1 --branch main https://github.com/Qiskit/qiskit-nature.git /tmp/qiskit-nature
pushd /tmp/qiskit-nature
python setup.py bdist_wheel
popd
cp -rf /tmp/qiskit-nature/dist/*.whl "${BASE_DIR}"
pushd "${BASE_DIR}"
python -m pip install *.whl
popd
echo 'Install Nature from Stable'
pip install -U qiskit-nature
fi
shell: bash
5 changes: 2 additions & 3 deletions .github/actions/install-nature-pyscf/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ inputs:
required: true
runs:
using: "composite"
steps:
steps:
- run : |
pip install -U -c constraints.txt -r requirements-dev.txt -r requirements.txt
pip install -e .
pip install qiskit-nature[pyscf,mpl,sparse]
pip install -U -c constraints.txt -r requirements-dev.txt
shell: bash
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ jobs:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
terra-main: "false"
nature-main: "false"
if: ${{ !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }}
- uses: ./.github/actions/install-nature-pyscf
with:
Expand Down
1 change: 1 addition & 0 deletions constraints.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
astroid==2.5.6
pylint==2.8.3
numpy>=1.20.0
rustworkx!=0.13.0;python_version<"3.8"