diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 96c575fda..7d0b7b48f 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -2,7 +2,7 @@ This directory contains a number of workflows for use with [GitHub Actions](https://docs.github.com/actions). They specify what standards should be expected for development of this software, including pull requests. These workflows are designed to work out of the box for any research software prototype, especially those based on [Qiskit](https://qiskit.org/). -## Styles check (`lint.yml`) +## Lint check (`lint.yml`) This workflow checks that the code is formatted properly and follows the style guide by installing tox and running the [lint environment](/tests/#lint-environment) (`tox -e lint`). @@ -12,13 +12,13 @@ This workflow installs the latest version of tox and runs [the current repositor ## Development version tests (`test_development_versions.yml`) -This workflow installs tox and modifies `pyproject.toml` to use the _development_ versions of certain Qiskit packages. For all other packages, the latest version is installed. This workflow runs on two versions of Python: the minimum supported version and the maximum supported version. Its purpose is to identify as soon as possible (i.e., before a Qiskit release) when changes in Qiskit will break the current repository. This workflow runs for all code changes, as well as on a timer once per day. +This workflow installs tox and modifies `pyproject.toml` to use the _development_ versions of certain Qiskit packages, using [extremal-python-dependencies](https://github.com/IBM/extremal-python-dependencies). For all other packages, the latest version is installed. This workflow runs on two versions of Python: the minimum supported version and the maximum supported version. Its purpose is to identify as soon as possible (i.e., before a Qiskit release) when changes in Qiskit will break the current repository. This workflow runs for all code changes, as well as on a timer once per day. ## Minimum version tests (`test_minimum_versions.yml`) -This workflow first installs the minimum supported tox version (the `minversion` specified in [`tox.ini`](/tox.ini)) and then installs the _minimum_ compatible version of each package listed in `pyproject.toml`. The purpose of this workflow is to make sure the minimum version specifiers in these files are accurate, i.e., that the tests actually pass with these versions. This workflow uses a single Python version, typically the oldest supported version, as the minimum supported versions of each package may not be compatible with the most recent Python release. +This workflow first installs the minimum supported tox version (the `minversion` specified in [`tox.ini`](/tox.ini)) and then installs the _minimum_ compatible version of each package listed in `pyproject.toml`, using [extremal-python-dependencies](https://github.com/IBM/extremal-python-dependencies). The purpose of this workflow is to make sure the minimum version specifiers in these files are accurate, i.e., that the tests actually pass with these versions. This workflow uses a single Python version, typically the oldest supported version, as the minimum supported versions of each package may not be compatible with the most recent Python release. -Under the hood, this workflow uses a regular expression to change each `>=` and `~=` specifier in the requirements files to instead be `==`, as pip [does not support](https://github.com/pypa/pip/issues/8085) resolving the minimum versions of packages directly. Unfortunately, this means that the workflow will only install the minimum version of a package if it is _explicitly_ listed in one of the requirements files with a minimum version. For instance, a requirements file that simply lists `qiskit>=0.34` will actually install `qiskit==0.34` (i.e., the minimum version of the _meta_-package) along with the latest versions of `qiskit-terra` and `qiskit-aer`, unless their minimum versions are specified explicitly as well. +Under the hood, this workflow uses a regular expression to change each `>=` and `~=` specifier in the dependencies to instead be `==`, as pip [does not support](https://github.com/pypa/pip/issues/8085) resolving the minimum versions of packages directly. Unfortunately, this means that the workflow will only install the minimum version of a package if it is _explicitly_ listed in one of the requirements files with a minimum version. For instance, if the only listed dependency is `qiskit>=1.0`, this workflow will install `qiskit==1.0` along with the latest version of each transitive dependency, such as `rustworkx`. ## Code coverage (`coverage.yml`) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 37520b9dd..a7acd4516 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,4 +1,4 @@ -name: Styles check +name: Lint check on: push: @@ -26,7 +26,7 @@ jobs: run: | python -m pip install --upgrade pip pip install tox - - name: Run styles check + - name: Run lint check shell: bash run: | tox -elint diff --git a/.github/workflows/test_development_versions.yml b/.github/workflows/test_development_versions.yml index 41aa68e2b..0f4702a9b 100644 --- a/.github/workflows/test_development_versions.yml +++ b/.github/workflows/test_development_versions.yml @@ -35,11 +35,6 @@ jobs: "qiskit @ git+https://github.com/Qiskit/qiskit.git" \ "qiskit-ibm-runtime @ git+https://github.com/Qiskit/qiskit-ibm-runtime.git" \ --inplace - - name: Modify tox.ini for more thorough check - shell: bash - run: | - sed -i.bak -E '/#.*CI:[[:space:]]*skip-next-line/I{N;d;}' tox.ini - cat tox.ini - name: Test using tox environment shell: bash run: | diff --git a/.github/workflows/test_latest_versions.yml b/.github/workflows/test_latest_versions.yml index a53b1842c..36fbe2c23 100644 --- a/.github/workflows/test_latest_versions.yml +++ b/.github/workflows/test_latest_versions.yml @@ -25,7 +25,7 @@ jobs: - os: macos-latest python-version: "3.12" - os: windows-latest - python-version: "3.10" + python-version: "3.12" steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -36,11 +36,6 @@ jobs: run: | python -m pip install --upgrade pip pip install tox - - name: Modify tox.ini for more thorough check - shell: bash - run: | - sed -i.bak -E '/#.*CI:[[:space:]]*skip-next-line/I{N;d;}' tox.ini - cat tox.ini - name: Test using tox environment shell: bash run: | diff --git a/.github/workflows/test_minimum_versions.yml b/.github/workflows/test_minimum_versions.yml index 646766ee4..f48dab004 100644 --- a/.github/workflows/test_minimum_versions.yml +++ b/.github/workflows/test_minimum_versions.yml @@ -31,11 +31,6 @@ jobs: python -m pip install extremal-python-dependencies==0.0.3 pip install "tox==$(extremal-python-dependencies get-tox-minversion)" extremal-python-dependencies pin-dependencies-to-minimum --inplace - - name: Modify tox.ini for more thorough check - shell: bash - run: | - sed -i.bak -E '/#.*CI:[[:space:]]*skip-next-line/I{N;d;}' tox.ini - cat tox.ini - name: Test using tox environment shell: bash run: |