Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚸♻️ Refactor library structure for cleaner separation of concerns #518

Merged
merged 6 commits into from
Sep 6, 2024

Conversation

burgholzer
Copy link
Member

Description

This long-overdue PR brings a cleaner CMake project structure to QMAP.
It moves the oldest part of the code base (the superconducting mapping techniques) to their own subfolders (sc, sc/heuristic, and sc/exact).
It also separates the CMakeLists.txt files in the src and test directory per library target to clearly separate the concerns.
In the process, the include structure has been slightly adapted, so that all library includes must now include the corresponding library prefix.
Additionally, the linking of libraries has been slightly optimized.

This also marks a first step towards a potential rename of the library.

In addition to all of the above, the PR contains some assorted library improvements including touch ups on the CMake config, the mypy configuration, and the pre-commit hooks.

Checklist:

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

Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
@burgholzer burgholzer self-assigned this Sep 6, 2024
@burgholzer burgholzer added dependencies Pull requests that update a dependency file usability Anything related to usability c++ Anything related to C++ code code quality Anything related to code quality and code style. enhancement Anything related to improvements of the existing library labels Sep 6, 2024
Copy link

codecov bot commented Sep 6, 2024

Codecov Report

Attention: Patch coverage is 65.82278% with 27 lines in your changes missing coverage. Please review.

Project coverage is 90.4%. Comparing base (95bf8fe) to head (a94f48f).
Report is 179 commits behind head on main.

Files with missing lines Patch % Lines
src/hybridmap/HybridAnimation.cpp 0.0% 13 Missing ⚠️
src/cliffordsynthesis/Tableau.cpp 70.3% 8 Missing ⚠️
src/na/Architecture.cpp 50.0% 2 Missing ⚠️
src/sc/Mapper.cpp 0.0% 2 Missing ⚠️
src/hybridmap/HybridNeutralAtomMapper.cpp 0.0% 1 Missing ⚠️
src/hybridmap/MoveToAodConverter.cpp 0.0% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #518     +/-   ##
=======================================
- Coverage   90.4%   90.4%   -0.1%     
=======================================
  Files         86      87      +1     
  Lines      10021   10050     +29     
  Branches    1711    1716      +5     
=======================================
+ Hits        9064    9090     +26     
- Misses       957     960      +3     
Flag Coverage Δ
cpp 90.1% <65.8%> (-0.1%) ⬇️
python 95.9% <ø> (ø)
Files with missing lines Coverage Δ
include/cliffordsynthesis/Results.hpp 100.0% <ø> (ø)
include/sc/Architecture.hpp 88.5% <ø> (ø)
include/sc/DataLogger.hpp 100.0% <ø> (ø)
include/sc/Mapper.hpp 85.2% <ø> (ø)
include/sc/MappingResults.hpp 83.3% <ø> (ø)
include/sc/configuration/AvailableArchitecture.hpp 36.0% <ø> (ø)
include/sc/configuration/CommanderGrouping.hpp 54.1% <ø> (ø)
include/sc/configuration/Configuration.hpp 100.0% <ø> (ø)
include/sc/configuration/Encoding.hpp 55.0% <ø> (ø)
include/sc/configuration/Heuristic.hpp 66.6% <ø> (ø)
... and 25 more

Signed-off-by: burgholzer <burgholzer@me.com>
@burgholzer burgholzer merged commit 4d430cb into main Sep 6, 2024
33 of 34 checks passed
@burgholzer burgholzer deleted the improved-cmake-and-library-structure branch September 6, 2024 23:15
@burgholzer burgholzer added the minor Changes leading to a minor version increase label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Anything related to C++ code code quality Anything related to code quality and code style. dependencies Pull requests that update a dependency file enhancement Anything related to improvements of the existing library minor Changes leading to a minor version increase usability Anything related to usability
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant