cda-tum / mqt-qcec

MQT QCEC - A tool for Quantum Circuit Equivalence Checking
https://mqt.readthedocs.io/projects/qcec
MIT License
90 stars 21 forks source link

♻️ Refactor Packaging and CI #301

Closed burgholzer closed 1 year ago

burgholzer commented 1 year ago

Description

This PR brings a major refactoring for the overall Python packaging as well as the CI employed in the project.

Packaging

We are (finally) moving away from setuptools and towards modern scikit-build-core (https://scikit-build-core.readthedocs.io/) This brings many advantages such as

As part of this change, we adopt the established best practice of a src-layout for the Python package. This implies that the Python package no longer lives in the main package directory, but is moved to src/mqt/.... This avoids several pitfalls when working with Python packages and makes the overall handling way easier.

This also means there is no direct build-time dependency on cmake and ninja anymore as this is automatically handled by scikit-build-core on demand.

As part of this rewrite, several nox sessions are also updated

CI

MQT Core has introduced reusable workflows in

These have been further refined in

Overall, this allows to

while at the same time:

As a nice side effect, the new CI runs have revealed a bug in the permutation handling of the ZX checker that has subsequently been resolved.

Checklist:

github-advanced-security[bot] commented 1 year ago

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

codecov[bot] commented 1 year ago

Codecov Report

Merging #301 (67c7576) into main (1e3f721) will decrease coverage by 0.1%. The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #301     +/-   ##
=======================================
- Coverage   96.1%   96.0%   -0.1%     
=======================================
  Files         34      34             
  Lines       1719    1726      +7     
  Branches     208     210      +2     
=======================================
+ Hits        1652    1658      +6     
- Misses        67      68      +1     
Flag Coverage Δ
cpp 95.7% <100.0%> (-0.1%) :arrow_down:
python 97.2% <100.0%> (+<0.1%) :arrow_up:
Files Changed Coverage Δ
...dd/applicationscheme/GateCostApplicationScheme.cpp 94.8% <ø> (ø)
src/mqt/qcec/compilation_flow_profiles.py 97.4% <ø> (ø)
src/mqt/qcec/configuration.py 100.0% <ø> (ø)
src/checker/zx/ZXChecker.cpp 99.3% <100.0%> (-0.7%) :arrow_down:
src/mqt/qcec/__init__.py 100.0% <100.0%> (ø)
src/mqt/qcec/parameterized.py 94.8% <100.0%> (ø)
src/mqt/qcec/verify.py 100.0% <100.0%> (ø)
src/mqt/qcec/verify_compilation_flow.py 100.0% <100.0%> (ø)

... and 3 files with indirect coverage changes

github-actions[bot] commented 1 year ago

Cpp-Linter Report :heavy_check_mark:

No problems need attention.

Have any feedback or feature suggestions? Share it here.