QuantumSavory / QuantumSymbolics.jl

Computer algebra tools for symbolic manipulations in quantum mechanics and quantum information
MIT License
29 stars 9 forks source link

Clean up metadata addition to struct definitions #70

Closed apkille closed 1 month ago

apkille commented 1 month ago

Originates from discussion in #62. The withmetadata macro is designed to add a metadata dict to certain struct definitions. Currently, it is unnecessarily messy and hard to read because it doesn't make use of any pattern-matching packages. This PR makes use of tools from MacroTools.jl to clean up the macro.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 71.42857% with 4 lines in your changes missing coverage. Please review.

Project coverage is 73.70%. Comparing base (4d28a97) to head (975c44b).

Files Patch % Lines
src/QSymbolicsBase/QSymbolicsBase.jl 71.42% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #70 +/- ## ========================================== - Coverage 73.88% 73.70% -0.18% ========================================== Files 18 18 Lines 804 791 -13 ========================================== - Hits 594 583 -11 + Misses 210 208 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Krastanov commented 1 month ago

the tests are not failing and this is pretty darn fundamental to the library, so it must be good to merge. Feel free to merge as you find appropriate