Skip to content

Skip mypy check in CI #221

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

Merged
merged 6 commits into from
Mar 17, 2025
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
4 changes: 2 additions & 2 deletions .github/actions/run-tests/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of a Qiskit project.
#
# (C) Copyright IBM 2021.
# (C) Copyright IBM 2021, 2025.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand Down Expand Up @@ -36,7 +36,7 @@ runs:
if [ "${{ inputs.event-name }}" == "schedule" ] || [ "${{ inputs.run-slow }}" == "true" ]; then
export QISKIT_TESTS="run_slow"
fi
if [ "${{ inputs.os }}" == "ubuntu-latest" ] && [ "${{ inputs.python-version }}" == "3.8" ]; then
if [ "${{ inputs.os }}" == "ubuntu-latest" ] && [ "${{ inputs.python-version }}" == "3.9" ]; then
export PYTHON="coverage3 run --source qiskit_algorithms --parallel-mode"
fi
stestr --test-path test run 2> >(tee /dev/stderr out.txt > /dev/null)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-code.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of a Qiskit project.
#
# (C) Copyright IBM 2021, 2023.
# (C) Copyright IBM 2021, 2025.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand All @@ -25,7 +25,7 @@ jobs:
id-token: write
strategy:
matrix:
python-version: [3.8]
python-version: [3.9]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of a Qiskit project.
#
# (C) Copyright IBM 2023.
# (C) Copyright IBM 2023, 2025.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand All @@ -26,7 +26,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]
python-version: [3.9]
steps:
- uses: actions/checkout@v4
with:
Expand Down
43 changes: 20 additions & 23 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of a Qiskit project.
#
# (C) Copyright IBM 2021, 2024.
# (C) Copyright IBM 2021, 2025.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand Down Expand Up @@ -36,7 +36,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]
python-version: [3.9]
steps:
- name: Print Concurrency Group
env:
Expand Down Expand Up @@ -111,14 +111,14 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]
python-version: [3.9, '3.10', 3.11, 3.12]
include:
- os: macos-latest
python-version: 3.8
python-version: 3.9
- os: macos-latest
python-version: 3.12
- os: windows-latest
python-version: 3.8
python-version: 3.9
- os: windows-latest
python-version: 3.12
steps:
Expand All @@ -140,8 +140,8 @@ jobs:
- uses: ./.github/actions/install-algorithms
- run: make lint
shell: bash
- run: make mypy
shell: bash
# - run: make mypy
# shell: bash
- name: Algorithms Unit Tests under Python ${{ matrix.python-version }}
uses: ./.github/actions/run-tests
with:
Expand All @@ -159,7 +159,7 @@ jobs:
run: |
coverage3 combine
mv .coverage ./ci-artifact-data/alg.dat
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == 3.8 }}
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9 }}
shell: bash
- uses: actions/upload-artifact@v4
with:
Expand All @@ -183,16 +183,17 @@ jobs:
setup.py
requirements.txt
requirements-dev.txt
- uses: ./.github/actions/install-algorithms
- run: pip uninstall -y qiskit
- uses: ./.github/actions/install-main-dependencies
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
qiskit-main: "true"
- uses: ./.github/actions/install-algorithms
- run: make lint
shell: bash
- run: make mypy
shell: bash
# - run: make mypy
# shell: bash
- name: Algorithms Unit Tests under Python with Qiskit main ${{ matrix.python-version }}
uses: ./.github/actions/run-tests
with:
Expand All @@ -208,7 +209,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.8, 3.12]
python-version: [3.9, 3.12]
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -254,16 +255,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
python-version: [3.9]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/download-artifact@v4
with:
name: ubuntu-latest-3.8
path: /tmp/u38
- uses: actions/download-artifact@v4
with:
name: ubuntu-latest-3.9
Expand All @@ -282,16 +279,16 @@ jobs:
path: /tmp/u312
- uses: actions/download-artifact@v4
with:
name: macos-latest-3.8
path: /tmp/m38
name: macos-latest-3.9
path: /tmp/m39
- uses: actions/download-artifact@v4
with:
name: macos-latest-3.12
path: /tmp/m312
- uses: actions/download-artifact@v4
with:
name: windows-latest-3.8
path: /tmp/w38
name: windows-latest-3.9
path: /tmp/w39
- uses: actions/download-artifact@v4
with:
name: windows-latest-3.12
Expand All @@ -301,10 +298,10 @@ jobs:
shell: bash
- name: Combined Deprecation Messages
run: |
sort -f -u /tmp/u38/alg.dep /tmp/u39/alg.dep /tmp/u310/alg.dep /tmp/u311/alg.dep /tmp/u312/alg.dep /tmp/m38/alg.dep /tmp/m312/alg.dep /tmp/w38/alg.dep /tmp/w312/alg.dep || true
sort -f -u /tmp/u39/alg.dep /tmp/u310/alg.dep /tmp/u311/alg.dep /tmp/u312/alg.dep /tmp/m39/alg.dep /tmp/m312/alg.dep /tmp/w39/alg.dep /tmp/w312/alg.dep || true
shell: bash
- name: Coverage combine
run: coverage3 combine /tmp/u38/alg.dat
run: coverage3 combine /tmp/u39/alg.dat
shell: bash
- name: Upload to Coveralls
env:
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/neko.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
queue_rules:
- name: automerge
queue_conditions:
- check-success=Deprecation_Messages_and_Coverage (3.8)
- check-success=Deprecation_Messages_and_Coverage (3.9)
- "#approved-reviews-by>=1"
- label=automerge
- label!=on hold
merge_conditions:
- check-success=Deprecation_Messages_and_Coverage (3.8)
- check-success=Deprecation_Messages_and_Coverage (3.9)
merge_method: squash

pull_request_rules:
Expand Down
1 change: 1 addition & 0 deletions .pylintdict
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ numpy
objval
observables
oct
october
onodera
optimizer's
optimizers
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ build-backend = "setuptools.build_meta"

[tool.black]
line-length = 100
target-version = ['py38', 'py39', 'py310', 'py311']
target-version = ['py39', 'py310', 'py311']

[tool.pylint.main]
extension-pkg-allow-list = [
"numpy",
"rustworkx",
]
load-plugins = ["pylint.extensions.docparams", "pylint.extensions.docstyle"]
py-version = "3.8" # update it when bumping minimum supported python version
py-version = "3.9" # update it when bumping minimum supported python version

[tool.pylint.basic]
good-names = ["a", "b", "i", "j", "k", "d", "n", "m", "ex", "v", "w", "x", "y", "z", "Run", "_", "logger", "q", "c", "r", "qr", "cr", "qc", "nd", "pi", "op", "b", "ar", "br", "p", "cp", "ax", "dt", "__unittest", "iSwapGate", "mu"]
Expand Down
16 changes: 16 additions & 0 deletions releasenotes/notes/drop_python_3_8-dffbed172a8cccf1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
prelude: >
Support for Python 3.8 has been dropped.
issues:
- |
Qiskit Algorithms does not work with Qiskit version 2.0 (or above).
Qiskit Algorithms is using Version 1 of the primitives and as they
were deprecated and then removed in Qiskit 2.0 it needs an earlier
version that still has them to work. As such Qiskit Algorithms pins
the qiskit dependency so that a version less than 2.0 will be installed.
upgrade:
- |
Python 3.8 support was dropped as Python 3.8 reached End Of Life
in October 2024 and is no longer being maintained. If you were
using Python 3.8 you should upgrade to a newer version that Qiskit
Algorithms now supports.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
qiskit>=0.44
qiskit>=0.44,<2.0
scipy>=1.4
numpy>=1.17
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of a Qiskit project.
#
# (C) Copyright IBM 2021, 2024.
# (C) Copyright IBM 2021, 2025.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand Down Expand Up @@ -61,7 +61,6 @@
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -72,7 +71,7 @@
packages=setuptools.find_packages(include=["qiskit_algorithms", "qiskit_algorithms.*"]),
install_requires=REQUIREMENTS,
include_package_data=True,
python_requires=">=3.8",
python_requires=">=3.9",
project_urls={
"Bug Tracker": "https://github.com/qiskit-community/qiskit-algorithms/issues",
"Documentation": "https://qiskit-community.github.io/qiskit-algorithms/",
Expand Down
Loading