Skip to content

Commit

Permalink
👷⬆️ update reusable workflows (#371)
Browse files Browse the repository at this point in the history
## Description

This PR updates the reusable MQT workflows to their latest version. It
also makes use of explicit versioning in order to avoid surprises caused
by updates in the future and to allow getting updates from dependabot.

## Checklist:

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [x] The pull request only contains commits that are related to it.
- [x] I have added appropriate tests and documentation.
- [x] I have made sure that all CI jobs on GitHub pass.
- [x] The pull request introduces no new warnings and follows the
project's style guidelines.

---------

Signed-off-by: burgholzer <burgholzer@me.com>
  • Loading branch information
burgholzer committed Apr 22, 2024
1 parent c5212b5 commit cc1c250
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/codecov.yml
Expand Up @@ -33,7 +33,7 @@ flag_management:
- name: python
paths:
- "src/mqt/**/*.py"
after_n_builds: 12
after_n_builds: 10
statuses:
- type: project
threshold: 0.5%
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
python-packaging:
name: 🐍 Packaging
uses: cda-tum/mqt-core/.github/workflows/reusable-python-packaging.yml@main
uses: cda-tum/mqt-core/.github/workflows/reusable-python-packaging.yml@v2.4.1

deploy:
if: github.event_name == 'release' && github.event.action == 'published'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Expand Up @@ -14,13 +14,13 @@ concurrency:
jobs:
change-detection:
name: 🔍 Change
uses: cda-tum/mqt-core/.github/workflows/reusable-change-detection.yml@main
uses: cda-tum/mqt-core/.github/workflows/reusable-change-detection.yml@v2.4.1

cpp-tests:
name: 🇨‌ Test
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests)
uses: cda-tum/mqt-core/.github/workflows/reusable-cpp-ci.yml@main
uses: cda-tum/mqt-core/.github/workflows/reusable-cpp-ci.yml@v2.4.1
secrets:
token: ${{ secrets.CODECOV_TOKEN }}
with:
Expand All @@ -33,21 +33,21 @@ jobs:
name: 🇨‌ Lint
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-linter)
uses: cda-tum/mqt-core/.github/workflows/reusable-cpp-linter.yml@main
uses: cda-tum/mqt-core/.github/workflows/reusable-cpp-linter.yml@v2.4.1

python-tests:
name: 🐍 Test
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-tests)
uses: cda-tum/mqt-core/.github/workflows/reusable-python-ci.yml@main
uses: cda-tum/mqt-core/.github/workflows/reusable-python-ci.yml@v2.4.1
secrets:
token: ${{ secrets.CODECOV_TOKEN }}

code-ql:
name: 📝 CodeQL
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-code-ql)
uses: cda-tum/mqt-core/.github/workflows/reusable-code-ql.yml@main
uses: cda-tum/mqt-core/.github/workflows/reusable-code-ql.yml@v2.4.1

required-checks-pass: # This job does nothing and is only used for branch protection
name: 🚦 Check
Expand Down
2 changes: 1 addition & 1 deletion extern/mqt-core
Submodule mqt-core updated 67 files
+1 −1 .github/codecov.yml
+2 −1 .github/workflows/reusable-change-detection.yml
+1 −2 .github/workflows/reusable-code-ql-cpp.yml
+1 −6 .github/workflows/reusable-cpp-ci.yml
+2 −2 .github/workflows/reusable-cpp-coverage.yml
+16 −14 .github/workflows/reusable-cpp-tests-macos.yml
+2 −2 .github/workflows/reusable-cpp-tests-ubuntu.yml
+2 −2 .github/workflows/reusable-cpp-tests-windows.yml
+8 −33 .github/workflows/reusable-python-ci.yml
+1 −1 .github/workflows/reusable-python-linter.yml
+0 −64 .github/workflows/reusable-python-minimums.yml
+56 −2 .github/workflows/reusable-python-packaging.yml
+5 −4 .github/workflows/reusable-python-tests.yml
+1 −0 .gitignore
+1 −1 .pre-commit-config.yaml
+1 −1 LICENSE.md
+9 −29 README.md
+14 −1 docs/_static/custom.css
+50 −63 docs/conf.py
+0 −167 docs/dd_package_evaluation.ipynb
+84 −0 docs/dd_package_evaluation.md
+20 −11 docs/index.md
+133 −0 docs/installation.md
+0 −418 docs/quickstart.ipynb
+271 −0 docs/quickstart.md
+11 −33 include/mqt-core/CircuitOptimizer.hpp
+16 −0 include/mqt-core/Permutation.hpp
+33 −0 include/mqt-core/operations/CompoundOperation.hpp
+15 −3 include/mqt-core/operations/Control.hpp
+2 −0 include/mqt-core/operations/NonUnitaryOperation.hpp
+14 −22 include/mqt-core/operations/Operation.hpp
+8 −2 noxfile.py
+4 −5 pyproject.toml
+347 −260 src/CircuitOptimizer.cpp
+3 −3 src/QuantumComputation.cpp
+0 −3 src/mqt/core/__init__.py
+16 −2 src/mqt/core/__main__.py
+12 −2 src/mqt/core/_commands.py
+1,690 −183 src/mqt/core/_core/__init__.pyi
+712 −104 src/mqt/core/_core/operations.pyi
+105 −15 src/mqt/core/_core/symbolic.pyi
+33 −15 src/mqt/core/evaluation.py
+4 −4 src/mqt/core/io.py
+11 −9 src/mqt/core/plugins/qiskit.py
+36 −0 src/operations/CompoundOperation.cpp
+4 −0 src/operations/NonUnitaryOperation.cpp
+6 −0 src/operations/Operation.cpp
+1 −2 src/parsers/QCParser.cpp
+8 −13 src/python/operations/register_classic_controlled_operation.cpp
+7 −14 src/python/operations/register_compound_operation.cpp
+7 −7 src/python/operations/register_control.cpp
+6 −14 src/python/operations/register_non_unitary_operation.cpp
+10 −37 src/python/operations/register_operation.cpp
+1 −3 src/python/operations/register_optype.cpp
+9 −25 src/python/operations/register_standard_operation.cpp
+9 −38 src/python/operations/register_symbolic_operation.cpp
+8 −8 src/python/register_permutation.cpp
+88 −195 src/python/register_quantum_computation.cpp
+8 −23 src/python/symbolic/register_expression.cpp
+7 −16 src/python/symbolic/register_term.cpp
+2 −5 src/python/symbolic/register_variable.cpp
+9 −9 test/python/test_evaluation.py
+54 −1 test/python/test_qiskit.py
+28 −0 test/unittests/circuit_optimizer/test_collect_blocks.cpp
+424 −0 test/unittests/circuit_optimizer/test_defer_measurements.cpp
+179 −0 test/unittests/circuit_optimizer/test_elide_permutations.cpp
+28 −399 test/unittests/test_qfr_functionality.cpp
8 changes: 7 additions & 1 deletion noxfile.py
Expand Up @@ -20,10 +20,16 @@

PYTHON_ALL_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12"]

# The following lists all the build requirements for building the package.
# Note that this includes transitive build dependencies of package dependencies,
# since we use `--no-build-isolation` to install the package in editable mode
# and get better caching performance. This only concerns dependencies that are
# not available via wheels on PyPI (i.e., only as source distributions).
BUILD_REQUIREMENTS = [
"scikit-build-core[pyproject]>=0.8.1",
"setuptools_scm>=7",
"pybind11>=2.12",
"wheel>=0.40", # transitive dependency of pytest on Windows
]

if os.environ.get("CI", None):
Expand Down Expand Up @@ -75,7 +81,7 @@ def tests(session: nox.Session) -> None:
_run_tests(session)


@nox.session(reuse_venv=True, venv_backend="uv")
@nox.session(reuse_venv=True, venv_backend="uv", python=PYTHON_ALL_VERSIONS)
def minimums(session: nox.Session) -> None:
"""Test the minimum versions of dependencies."""
_run_tests(
Expand Down

0 comments on commit cc1c250

Please sign in to comment.