`_.
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
new file mode 100644
index 00000000..ea88cea2
--- /dev/null
+++ b/.github/workflows/cd.yml
@@ -0,0 +1,27 @@
+name: CD
+on:
+ release:
+ types: [published]
+ workflow_dispatch:
+
+jobs:
+ python-packaging:
+ name: 🐍 Packaging
+ uses: cda-tum/mqt-core/.github/workflows/reusable-python-packaging.yml@main
+
+ deploy:
+ if: github.event_name == 'release' && github.event.action == 'published'
+ name: 🚀 Deploy to PyPI
+ runs-on: ubuntu-latest
+ environment:
+ name: pypi
+ url: https://pypi.org/p/mqt.qcec
+ permissions:
+ id-token: write
+ needs: [python-packaging]
+ steps:
+ - uses: actions/download-artifact@v3
+ with:
+ name: artifact
+ path: dist
+ - uses: pypa/gh-action-pypi-publish@release/v1
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a5ac5dd4..93e782d6 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,58 +1,83 @@
-name: C++
-
+name: CI
on:
- pull_request:
- merge_group:
push:
branches:
- main
+ pull_request:
+ merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
-env:
- CMAKE_BUILD_PARALLEL_LEVEL: 3
- CTEST_PARALLEL_LEVEL: 3
-
-defaults:
- run:
- shell: bash
-
jobs:
+ change-detection:
+ name: 🔍 Change
+ uses: cda-tum/mqt-core/.github/workflows/reusable-change-detection.yml@main
+
cpp-tests:
- name: Tests ${{ matrix.config.os }}
- runs-on: ${{ matrix.config.os }}
- strategy:
- fail-fast: false
- matrix:
- config:
- - { os: ubuntu-latest, toolchain: "" }
- - { os: macos-latest, toolchain: "" }
- - { os: windows-latest, toolchain: "-T ClangCl" }
+ 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
+ secrets:
+ token: ${{ secrets.CODECOV_TOKEN }}
+ with:
+ cmake-args: ""
+ cmake-args-ubuntu: -G Ninja
+ cmake-args-macos: -G Ninja
+ cmake-args-windows: -T ClangCL
+
+ cpp-linter:
+ 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
+
+ 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
+ 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
+
+ required-checks-pass: # This job does nothing and is only used for branch protection
+ name: 🚦 Check
+ if: always()
+ needs:
+ - change-detection
+ - cpp-tests
+ - cpp-linter
+ - python-tests
+ - code-ql
+ runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
- with:
- submodules: recursive
- - name: Configure CMake
- run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_QCEC_TESTS=ON ${{ matrix.config.toolchain }}
- - name: Build
- run: cmake --build build --config Release
- - name: Test
- run: ctest -C Release --output-on-failure --test-dir build --repeat until-pass:3 --timeout 300
- - if: runner.os == 'Linux'
- name: Coverage
- run: |
- cmake -S . -B buildCov -DCMAKE_BUILD_TYPE=Debug -DBUILD_QCEC_TESTS=ON -DENABLE_COVERAGE=ON
- cmake --build buildCov --config Debug --target qcec_test
- ctest -C Debug --output-on-failure --test-dir buildCov --repeat until-pass:3 --timeout 300
- - if: runner.os == 'Linux'
- name: Upload coverage to Codecov
- uses: codecov/codecov-action@v3.1.4
+ - name: Decide whether the needed jobs succeeded or failed
+ uses: re-actors/alls-green@release/v1
with:
- fail_ci_if_error: true
- flags: cpp
- gcov: true
- gcov_ignore: "extern/**/*"
- token: ${{ secrets.CODECOV_TOKEN }}
+ allowed-skips: >-
+ ${{
+ fromJSON(needs.change-detection.outputs.run-cpp-tests)
+ && '' || 'cpp-tests,'
+ }}
+ ${{
+ fromJSON(needs.change-detection.outputs.run-cpp-linter)
+ && '' || 'cpp-linter,'
+ }}
+ ${{
+ fromJSON(needs.change-detection.outputs.run-python-tests)
+ && '' || 'python-tests,'
+ }}
+ ${{
+ fromJSON(needs.change-detection.outputs.run-code-ql)
+ && '' || 'code-ql,'
+ }}
+ jobs: ${{ toJSON(needs) }}
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
deleted file mode 100644
index 64a75ea5..00000000
--- a/.github/workflows/codeql-analysis.yml
+++ /dev/null
@@ -1,68 +0,0 @@
-name: "CodeQL"
-
-on:
- push:
- pull_request:
- merge_group:
- schedule:
- - cron: "15 21 * * 6"
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
- cancel-in-progress: true
-
-env:
- CMAKE_BUILD_PARALLEL_LEVEL: 3
-
-jobs:
- analyze:
- name: Analyze ${{ matrix.language }}
- runs-on: ubuntu-latest
- permissions:
- security-events: write
-
- strategy:
- fail-fast: false
- matrix:
- language: ["cpp", "python"]
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v3
- with:
- submodules: recursive
- fetch-depth: 0
-
- # Initializes the CodeQL tools for scanning.
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v2
- with:
- languages: ${{ matrix.language }}
- config-file: .github/codeql-config.yml
-
- - if: matrix.language == 'cpp'
- name: Configure CMake
- run: cmake -S . -B build -DBINDINGS=ON -DBUILD_QCEC_TESTS=ON
-
- - if: matrix.language == 'cpp'
- name: Build
- run: cmake --build build
-
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
- with:
- upload: False
- output: sarif-results
-
- - name: filter-sarif
- uses: advanced-security/filter-sarif@main
- with:
- patterns: |
- -**/extern/**
- input: sarif-results/${{ matrix.language }}.sarif
- output: sarif-results/${{ matrix.language }}.sarif
-
- - name: Upload SARIF
- uses: github/codeql-action/upload-sarif@v2
- with:
- sarif_file: sarif-results/${{ matrix.language }}.sarif
diff --git a/.github/workflows/cpp-linter.yml b/.github/workflows/cpp-linter.yml
deleted file mode 100644
index 4c99c12a..00000000
--- a/.github/workflows/cpp-linter.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-name: cpp-linter
-
-on:
- pull_request:
- merge_group:
- push:
- branches:
- - main
- workflow_dispatch:
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
- cancel-in-progress: true
-
-jobs:
- cpp-linter:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- with:
- submodules: recursive
- - name: Generate compilation database
- run: CC=clang-14 CXX=clang++-14 cmake -S . -B build -DBINDINGS=ON -DBUILD_QCEC_TESTS=ON
- - name: Run cpp-linter
- id: linter
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
- pipx run cpp-linter \
- --version=14 \
- --style="" \
- --tidy-checks="" \
- --thread-comments=true \
- --files-changed-only=true \
- --ignore="build" \
- --database=build
- - name: Fail if linter found errors
- if: steps.linter.outputs.checks-failed > 0
- run: echo "Linter found errors" && exit 1
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
deleted file mode 100644
index f39a6ea0..00000000
--- a/.github/workflows/deploy.yml
+++ /dev/null
@@ -1,69 +0,0 @@
-name: Python Packaging
-
-on:
- release:
- types: [published]
- pull_request:
- merge_group:
- push:
- branches: [main]
- workflow_dispatch:
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
- cancel-in-progress: true
-
-jobs:
- build_wheels:
- name: ${{ matrix.os }} wheels
- runs-on: ${{ matrix.os }}
- strategy:
- fail-fast: false
- matrix:
- os: [ubuntu-latest, windows-latest, macos-latest]
- steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- submodules: recursive
- - uses: ilammy/msvc-dev-cmd@v1
- - name: Build wheels
- uses: pypa/cibuildwheel@v2.14
- - uses: actions/upload-artifact@v3
- with:
- path: ./wheelhouse/*.whl
-
- build_sdist:
- name: sdist
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- submodules: recursive
- - name: Setup Python
- uses: actions/setup-python@v4
- with:
- python-version: "3.10"
- - name: Build SDist
- run: pipx run build --sdist
- - name: Install sdist
- run: python -m pip install --verbose dist/*.tar.gz
- - uses: actions/upload-artifact@v3
- with:
- path: dist/*.tar.gz
-
- upload_pypi:
- needs: [build_wheels, build_sdist]
- runs-on: ubuntu-latest
- if: github.event_name == 'release' && github.event.action == 'published'
- steps:
- - uses: actions/download-artifact@v3
- with:
- name: artifact
- path: dist
- - uses: pypa/gh-action-pypi-publish@release/v1
- with:
- password: ${{ secrets.pypi_password }}
- skip-existing: true
- verbose: true
diff --git a/.github/workflows/emulated-wheels.yml b/.github/workflows/emulated-wheels.yml
deleted file mode 100644
index 96228e00..00000000
--- a/.github/workflows/emulated-wheels.yml
+++ /dev/null
@@ -1,51 +0,0 @@
-name: Python Packaging Emulated Wheels
-
-on:
- release:
- types: [published]
- workflow_dispatch:
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
- cancel-in-progress: true
-
-jobs:
- build_wheels_emulation:
- name: ${{ matrix.python }} wheels on ${{ matrix.arch }}
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- arch: ["s390x", "ppc64le"]
- python: ["cp38-*", "cp39-*", "cp310-*", "cp311-*"]
- steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- submodules: recursive
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v2
- - name: Build wheels
- uses: pypa/cibuildwheel@v2.14
- env:
- CIBW_ARCHS_LINUX: ${{ matrix.arch }}
- CIBW_BUILD: ${{ matrix.python }}
- CIBW_TEST_SKIP: "cp*"
- - uses: actions/upload-artifact@v3
- with:
- path: ./wheelhouse/*.whl
-
- upload_pypi:
- needs: [build_wheels_emulation]
- runs-on: ubuntu-latest
- if: github.event_name == 'release' && github.event.action == 'published'
- steps:
- - uses: actions/download-artifact@v3
- with:
- name: artifact
- path: dist
- - uses: pypa/gh-action-pypi-publish@release/v1
- with:
- password: ${{ secrets.pypi_password }}
- skip_existing: true
- verbose: true
diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml
deleted file mode 100644
index 765e0abb..00000000
--- a/.github/workflows/python-ci.yml
+++ /dev/null
@@ -1,90 +0,0 @@
-name: Python
-
-on:
- pull_request:
- merge_group:
- push:
- branches:
- - main
- workflow_dispatch:
-
-env:
- FORCE_COLOR: 3
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
- cancel-in-progress: true
-
-jobs:
- python-tests:
- name: 🐍 ${{ matrix.python-version }} Tests on ${{ matrix.runs-on }}
- runs-on: ${{ matrix.runs-on }}
- strategy:
- fail-fast: false
- matrix:
- runs-on: [ubuntu-latest, macos-latest, windows-latest]
- python-version: ["3.8", "3.11"]
- include:
- - runs-on: ubuntu-latest
- python-version: "3.9"
- - runs-on: ubuntu-latest
- python-version: "3.10"
- steps:
- - uses: actions/checkout@v3
- with:
- submodules: recursive
- fetch-depth: 0
- - name: Setup Python
- uses: actions/setup-python@v4
- with:
- python-version: ${{ matrix.python-version }}
- - name: Setup nox
- run: pipx install nox
- - name: Test on 🐍 ${{ matrix.python-version }}
- run: nox -s tests-${{ matrix.python-version }}
-
- min-qiskit-version:
- name: ⚛️ Min. Qiskit Test
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- with:
- submodules: recursive
- fetch-depth: 0
- - name: Setup nox
- run: pipx install nox
- - name: Run session
- run: nox -s min_qiskit_version -- --cov-report=xml
- - name: Upload Coverage to Codecov
- uses: codecov/codecov-action@v3.1.4
- with:
- fail_ci_if_error: true
- flags: python
- token: ${{ secrets.CODECOV_TOKEN }}
-
- coverage:
- name: 🐍 ${{ matrix.python-version }} Coverage
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- python-version: ["3.8", "3.11"]
- steps:
- - uses: actions/checkout@v3
- with:
- submodules: recursive
- fetch-depth: 0
- - name: Setup Python
- uses: actions/setup-python@v4
- with:
- python-version: ${{ matrix.python-version }}
- - name: Setup nox
- run: pipx install nox
- - name: Run session
- run: nox -s coverage-${{ matrix.python-version }} -- --cov-report=xml
- - name: Upload Coverage to Codecov
- uses: codecov/codecov-action@v3.1.4
- with:
- fail_ci_if_error: true
- flags: python
- token: ${{ secrets.CODECOV_TOKEN }}
diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml
index 566753dd..ce8c4f17 100644
--- a/.github/workflows/release-drafter.yml
+++ b/.github/workflows/release-drafter.yml
@@ -4,8 +4,6 @@ on:
push:
branches:
- main
- pull_request:
- types: [opened, reopened, synchronize]
pull_request_target:
types: [opened, reopened, synchronize]
@@ -14,6 +12,7 @@ permissions:
jobs:
update_release_draft:
+ name: Run
permissions:
contents: write
pull-requests: write
@@ -21,4 +20,4 @@ jobs:
steps:
- uses: release-drafter/release-drafter@v5
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{ github.token }}
diff --git a/.gitignore b/.gitignore
index b0d6c004..3e3ac324 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,48 +1,171 @@
-/build*
-/cmake-build-*
-.idea/*
-!.idea/runConfigurations
-!.idea/cmake.xml
-.vscode/*
-*~
-
+# Byte-compiled / optimized / DLL files
__pycache__/
-*.so
*.py[cod]
+*$py.class
-*.egg
-*.eggs
-*.egg-info
-bin/
-build/
+# C extensions
+*.so
+.ccache/
+cmake-build-*
+
+# Distribution / packaging
+.Python
+/build/
+/test/*/build
develop-eggs/
dist/
+downloads/
eggs/
+.eggs/
lib/
lib64/
parts/
sdist/
var/
+wheels/
+share/python-wheels/
+*.egg-info/
.installed.cfg
+*.egg
+MANIFEST
-.cache/
-.pytest_cache/
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
.coverage
-.coverage*
-.tox
-.nox
+.coverage.*
+.cache
+nosetests.xml
coverage.xml
-htmlcov
+*.cover
+*.py,cover
+.hypothesis/
+.pytest_cache/
+cover/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+.pybuilder/
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# PEP 582; used by e.g. github.com/David-OConnor/pyflow
+__pypackages__/
-docs/_build
+# Celery stuff
+celerybeat-schedule
+celerybeat.pid
-.env
-.venv
-env/
-venv/
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env*
+.venv*
+env*/
+venv*/
ENV/
env.bak/
venv.bak/
-.ruff_cache/
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
+
+# pytype static type analyzer
+.pytype/
+
+# Cython debug symbols
+cython_debug/
+
+# setuptools_scm
+src/*/_version.py
+
+# SKBuild cache dir
+_skbuild/
+
+# Any build dirs in the tests
+test/**/build/
+/src/mqt/qcec/_version.py
+
+# Common editor files
+*~
+*.swp
+
+# RPM spec file
+!/distro/*.spec
+/distro/*.tar.gz
+*.rpm
+
+# ruff
+.ruff_cache/
+
+# OS specific stuff
+.DS_Store
+.DS_Store?
+._*
+.Spotlight-V100
+.Trashes
+ehthumbs.db
+Thumbs.db
+
+.idea/
+.vscode/
+# tmt setup
+/distro/main.fmf
+/distro/plans/main.fmf
+/distro/tests/main.fmf
+
+/docs/**/build
+.vs
+out/build
diff --git a/.idea/cmake.xml b/.idea/cmake.xml
deleted file mode 100644
index 5645856a..00000000
--- a/.idea/cmake.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/.idea/runConfigurations/pip.xml b/.idea/runConfigurations/pip.xml
deleted file mode 100644
index acc07a30..00000000
--- a/.idea/runConfigurations/pip.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index d8ac162f..d0a9e3de 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -10,11 +10,12 @@
ci:
autoupdate_commit_msg: "⬆️🪝 update pre-commit hooks"
autofix_commit_msg: "🎨 pre-commit fixes"
+ skip: [mypy]
repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.4.0
+ rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
@@ -29,7 +30,7 @@ repos:
# Clean jupyter notebooks
- repo: https://github.com/srstevenson/nb-clean
- rev: 2.4.0
+ rev: 3.0.1
hooks:
- id: nb-clean
@@ -50,24 +51,24 @@ repos:
# Run ruff (subsumes pyupgrade, isort, flake8+plugins, and more)
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: v0.0.282
+ rev: v0.0.292
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
# Run code formatting with Black
- - repo: https://github.com/psf/black
- rev: 23.7.0 # Keep in sync with blacken-docs
+ - repo: https://github.com/psf/black-pre-commit-mirror
+ rev: 23.9.1 # Keep in sync with blacken-docs
hooks:
- id: black-jupyter
# Also run Black on examples in the documentation
- - repo: https://github.com/asottile/blacken-docs
- rev: 1.15.0
+ - repo: https://github.com/adamchainz/blacken-docs
+ rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies:
- - black==23.7.0 # keep in sync with black hook
+ - black==23.9.1 # keep in sync with black hook
# CMake format and lint the CMakeLists.txt files
- repo: https://github.com/cheshirekow/cmake-format-precommit
@@ -87,27 +88,46 @@ repos:
# Format configuration files with prettier
- repo: https://github.com/pre-commit/mirrors-prettier
- rev: "v3.0.1"
+ rev: v3.0.3
hooks:
- id: prettier
types_or: [yaml, markdown, html, css, scss, javascript, json]
# Check static types with mypy
- repo: https://github.com/pre-commit/mirrors-mypy
- rev: v1.4.1
+ rev: v1.5.1
hooks:
- id: mypy
- files: ^(mqt/qcec|test/python|setup.py)
+ files: ^(src/mqt|test/python)
args: ["--enable-incomplete-feature=Unpack"]
additional_dependencies:
- importlib_resources
- numpy
- pytest
- - types-setuptools
# Check for spelling
- repo: https://github.com/codespell-project/codespell
- rev: v2.2.5
+ rev: v2.2.6
hooks:
- id: codespell
args: ["-L", "wille,linz", "--skip", "*.ipynb"]
+
+ # Catch common capitalization mistakes
+ - repo: local
+ hooks:
+ - id: disallow-caps
+ name: Disallow improper capitalization
+ language: pygrep
+ entry: PyBind|Numpy|Cmake|CCache|Github|PyTest|Mqt|Tum
+ exclude: .pre-commit-config.yaml
+
+ # Checking sdist validity
+ - repo: https://github.com/henryiii/check-sdist
+ rev: v0.1.3
+ hooks:
+ - id: check-sdist
+ args: [--inject-junk]
+ additional_dependencies:
+ - scikit-build-core[pyproject]>=0.5.0
+ - setuptools-scm>=7
+ - pybind11>=2.11
diff --git a/.readthedocs.yaml b/.readthedocs.yaml
index c43c13fe..4d7470aa 100644
--- a/.readthedocs.yaml
+++ b/.readthedocs.yaml
@@ -8,8 +8,16 @@ build:
os: ubuntu-22.04
tools:
python: "3.11"
- apt_packages:
- - cmake
+ jobs:
+ post_checkout:
+ # Skip docs build if the commit message contains "skip ci"
+ - (git --no-pager log --pretty="tformat:%s -- %b" -1 | grep -viq "skip ci") || exit 183
+ # Skip docs build if there are no changes related to docs
+ - |
+ if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yaml src/mqt/ src/python include/python .github/contributing* .github/workflows/support*;
+ then
+ exit 183;
+ fi
sphinx:
configuration: docs/source/conf.py
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8442cd82..3396a02f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,9 +1,5 @@
# set required cmake version
-cmake_minimum_required(VERSION 3.19)
-
-# This avoids googletest complaining that this (IPO) policy is not set
-cmake_policy(SET CMP0069 NEW)
-set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
+cmake_minimum_required(VERSION 3.19...3.27)
project(
qcec
@@ -23,19 +19,36 @@ endmacro()
check_submodule_present(mqt-core)
+option(BUILD_MQT_QCEC_BINDINGS "Build the MQT QCEC Python bindings" OFF)
+if(BUILD_MQT_QCEC_BINDINGS)
+ # ensure that the BINDINGS option is set
+ set(BINDINGS
+ ON
+ CACHE BOOL "Enable settings related to Python bindings" FORCE)
+ # cmake-lint: disable=C0103
+ set(Python_FIND_VIRTUALENV
+ FIRST
+ CACHE STRING "Give precedence to virtualenvs when searching for Python")
+ # cmake-lint: disable=C0103
+ set(Python_ARTIFACTS_INTERACTIVE
+ ON
+ CACHE
+ BOOL
+ "Prevent multiple searches for Python and instead cache the results.")
+ # top-level call to find Python
+ find_package(
+ Python 3.8 REQUIRED
+ COMPONENTS Interpreter Development.Module
+ OPTIONAL_COMPONENTS Development.SABIModule)
+endif()
+
# add main library code
add_subdirectory(src)
# add test code
-option(BUILD_QCEC_TESTS "Also build tests for QMAP project")
-if(BUILD_QCEC_TESTS)
+option(BUILD_MQT_QCEC_TESTS "Also build tests for the MQT QCEC project" ON)
+if(BUILD_MQT_QCEC_TESTS)
enable_testing()
include(GoogleTest)
add_subdirectory(test)
endif()
-
-# add Python binding code
-option(BINDINGS "Configure for building Python bindings")
-if(BINDINGS)
- add_subdirectory(mqt/qcec)
-endif()
diff --git a/LICENSE.md b/LICENSE.md
index e1cb6596..207d0e91 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2022 Chair for Design Automation, Technical University of Munich
+Copyright (c) 2023 Chair for Design Automation, Technical University of Munich
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/MANIFEST.in b/MANIFEST.in
deleted file mode 100644
index 837d28a8..00000000
--- a/MANIFEST.in
+++ /dev/null
@@ -1,22 +0,0 @@
-prune docs
-prune test
-prune .idea
-
-graft extern/mqt-core
-prune **/.github
-prune **/apps
-prune **/doc
-prune **/docs
-prune **/meta
-prune **/plots
-prune **/test
-prune **/tests
-
-prune extern/mqt-core/extern/json/include
-prune extern/mqt-core/extern/googletest
-prune extern/mqt-core/extern/boost/config/checks
-prune extern/mqt-core/extern/boost/config/tools
-prune extern/mqt-core/extern/boost/multiprecision/config
-prune extern/mqt-core/extern/boost/multiprecision/example
-prune extern/mqt-core/extern/boost/multiprecision/performance
-prune extern/mqt-core/extern/boost/multiprecision/tools
diff --git a/README.md b/README.md
index 48510da1..8fb9d300 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,10 @@
[![PyPI](https://img.shields.io/pypi/v/mqt.qcec?logo=pypi&style=flat-square)](https://pypi.org/project/mqt.qcec/)
![OS](https://img.shields.io/badge/os-linux%20%7C%20macos%20%7C%20windows-blue?style=flat-square)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://opensource.org/licenses/MIT)
-[![CI](https://img.shields.io/github/actions/workflow/status/cda-tum/qcec/ci.yml?branch=main&style=flat-square&logo=github&label=c%2B%2B)](https://github.com/cda-tum/qcec/actions/workflows/ci.yml)
-[![Python CI](https://img.shields.io/github/actions/workflow/status/cda-tum/qcec/python-ci.yml?branch=main&style=flat-square&logo=github&label=python)](https://github.com/cda-tum/qcec/actions/workflows/python-ci.yml)
-[![Bindings](https://img.shields.io/github/actions/workflow/status/cda-tum/qcec/deploy.yml?branch=main&style=flat-square&logo=github&label=packaging)](https://github.com/cda-tum/qcec/actions/workflows/deploy.yml)
-[![Documentation](https://img.shields.io/readthedocs/qcec?logo=readthedocs&style=flat-square)](https://qcec.readthedocs.io/en/latest/)
-[![codecov](https://img.shields.io/codecov/c/github/cda-tum/qcec?style=flat-square&logo=codecov)](https://codecov.io/gh/cda-tum/qcec)
+[![CI](https://img.shields.io/github/actions/workflow/status/cda-tum/mqt-qcec/ci.yml?branch=main&style=flat-square&logo=github&label=ci)](https://github.com/cda-tum/mqt-qcec/actions/workflows/ci.yml)
+[![CD](https://img.shields.io/github/actions/workflow/status/cda-tum/mqt-qcec/cd.yml?style=flat-square&logo=github&label=cd)](https://github.com/cda-tum/mqt-qcec/actions/workflows/cd.yml)
+[![Documentation](https://img.shields.io/readthedocs/qcec?logo=readthedocs&style=flat-square)](https://mqt.readthedocs.io/projects/qcec)
+[![codecov](https://img.shields.io/codecov/c/github/cda-tum/mqt-qcec?style=flat-square&logo=codecov)](https://codecov.io/gh/cda-tum/mqt-qcec)