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

CompatHelper: bump compat for QuantumSymbolics to 0.4, (keep existing compat) #144

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 7, 2024

This pull request changes the compat entry for the QuantumSymbolics package from 0.3 to 0.3, 0.4.
This keeps the compat entries for earlier versions.

Note: I have not tested your package with this new compat entry.
It is your responsibility to make sure that your package tests pass before you merge this pull request.

@github-actions github-actions bot force-pushed the compathelper/new_version/2024-08-07-01-07-38-787-01122456851 branch from d561394 to b66f42b Compare August 7, 2024 01:07
Copy link

codecov bot commented Aug 11, 2024

Codecov Report

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

Project coverage is 72.94%. Comparing base (47528b2) to head (32b32aa).
Report is 1 commits behind head on master.

Files Patch % Lines
ext/QuantumSavoryMakie/QuantumSavoryMakie.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #144      +/-   ##
==========================================
+ Coverage   69.26%   72.94%   +3.68%     
==========================================
  Files          39       39              
  Lines        1692     1693       +1     
==========================================
+ Hits         1172     1235      +63     
+ Misses        520      458      -62     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Krastanov Krastanov added the Skip-Changelog label for control of CI: skips the changelog check label Aug 11, 2024
@Krastanov
Copy link
Member

@apkille
Andrew, it seems the new @withmetadata is causing some issues for the objects defined in QuantumSavory. Could you check what the source of the issue is? Something is complaining about namify being called.

@apkille
Copy link
Member

apkille commented Aug 11, 2024

Yes, I'll take a look.

@apkille
Copy link
Member

apkille commented Aug 11, 2024

@Krastanov It's because descriptive strings are included above each field of your struct definitions, e.g.,

"mean photon number per mode of the cascaded source model"
. So the MacroTools @capture command captures a string as a field. Here's two different ways we could fix this: we could use MacroTools.isexpr(expr, String, :string) to filter out these strings when we are decorating the struct definition, or change these descriptive strings into single-line comments next to the fields.

@apkille
Copy link
Member

apkille commented Aug 11, 2024

The first option would look something like this:

macro filter(strct)
        ex = quote $strct end
        if @capture(ex, struct T_ fields__ end)
            struct_name = namify(T)
            args = (namify(i) for i in fields if !isexpr(i, String, :string))
        end
        print(args...)
end

Here, @filter just filters out everything except the actual field names:

julia> @filter struct foo
           "hi"
           a::Int
           end
a

@apkille
Copy link
Member

apkille commented Aug 11, 2024

@Krastanov submitted a PR to QSymbolics.jl that implements the first option. If you don't agree with those changes, that's OK!

@Krastanov Krastanov merged commit d03a041 into master Aug 14, 2024
11 of 13 checks passed
@Krastanov Krastanov deleted the compathelper/new_version/2024-08-07-01-07-38-787-01122456851 branch August 14, 2024 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip-Changelog label for control of CI: skips the changelog check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants