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

🚸 introduce `importlib.resources` compatibility module #414

Closed burgholzer closed 3 months ago

burgholzer commented 3 months ago

Description

This PR adds a compatibility module for easier managing of code related to importlib.resources inspired by scikit-build-core. It also updates some of the mypy and ruff configuration.

Checklist:

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.2%. Comparing base (5e4ad8f) to head (0bf1f69). Report is 50 commits behind head on main.

Files with missing lines Patch % Lines
src/mqt/qcec/_compat/importlib/resources.py 87.5% 1 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/cda-tum/mqt-qcec/pull/414/graphs/tree.svg?width=650&height=150&src=pr&token=eKL7Ya7iep&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum)](https://app.codecov.io/gh/cda-tum/mqt-qcec/pull/414?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) ```diff @@ Coverage Diff @@ ## main #414 +/- ## ======================================= - Coverage 96.3% 96.2% -0.1% ======================================= Files 35 38 +3 Lines 1816 1825 +9 Branches 223 223 ======================================= + Hits 1749 1757 +8 - Misses 67 68 +1 ``` | [Flag](https://app.codecov.io/gh/cda-tum/mqt-qcec/pull/414/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | Coverage Δ | | *Carryforward flag | |---|---|---|---| | [cpp](https://app.codecov.io/gh/cda-tum/mqt-qcec/pull/414/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | `96.0% <ø> (ø)` | | Carriedforward from [5e4ad8f](https://app.codecov.io/gh/cda-tum/mqt-qcec/commit/5e4ad8f47a8e7a44002cab0466cf5e9fe3e6dfa6?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | | [python](https://app.codecov.io/gh/cda-tum/mqt-qcec/pull/414/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | `97.0% <92.3%> (-0.2%)` | :arrow_down: | | *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) to find out more. | [Files with missing lines](https://app.codecov.io/gh/cda-tum/mqt-qcec/pull/414?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum) | Coverage Δ | | |---|---|---| | [src/mqt/qcec/\_compat/\_\_init\_\_.py](https://app.codecov.io/gh/cda-tum/mqt-qcec/pull/414?src=pr&el=tree&filepath=src%2Fmqt%2Fqcec%2F_compat%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xY2VjL19jb21wYXQvX19pbml0X18ucHk=) | `100.0% <100.0%> (ø)` | | | [src/mqt/qcec/\_compat/importlib/\_\_init\_\_.py](https://app.codecov.io/gh/cda-tum/mqt-qcec/pull/414?src=pr&el=tree&filepath=src%2Fmqt%2Fqcec%2F_compat%2Fimportlib%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xY2VjL19jb21wYXQvaW1wb3J0bGliL19faW5pdF9fLnB5) | `100.0% <100.0%> (ø)` | | | [src/mqt/qcec/verify\_compilation\_flow.py](https://app.codecov.io/gh/cda-tum/mqt-qcec/pull/414?src=pr&el=tree&filepath=src%2Fmqt%2Fqcec%2Fverify_compilation_flow.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xY2VjL3ZlcmlmeV9jb21waWxhdGlvbl9mbG93LnB5) | `100.0% <100.0%> (ø)` | | | [src/mqt/qcec/\_compat/importlib/resources.py](https://app.codecov.io/gh/cda-tum/mqt-qcec/pull/414?src=pr&el=tree&filepath=src%2Fmqt%2Fqcec%2F_compat%2Fimportlib%2Fresources.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cda-tum#diff-c3JjL21xdC9xY2VjL19jb21wYXQvaW1wb3J0bGliL3Jlc291cmNlcy5weQ==) | `87.5% <87.5%> (ø)` | |