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 tests to use TestItems.jl #142

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

BKaperick
Copy link

Closes issue #141.

Hello, this is a first contribution, so I am fully receptive to any feedback you have.

I have a few comments/questions:

  • @testitem blocks cannot be nested, and I don't know of any way to share set-up code between them, so in test/test_circuitzoo_purification.jl I just kept the @testset blocks, but all nested within one @testitem. If someone has a recommendation for how to do this more properly I will update this.

I am still testing it locally, so I am opening this as a draft to indicate that I am actively working on this issue. I will change its status to Open once I've validated the changes are working correctly.

@Krastanov
Copy link
Member

Hi, Bryan! Thank you for starting this! Please check out this similar contribution made to QuantumClifford.jl -- following the same style would help me a lot in keeping things consistent across projects: QuantumSavory/QuantumClifford.jl#329

QuantumSavory probably will be a more challenging case because there are a lot of ad-hoc examples tested in weird environments (faked opengl environment in CI for some of the plotting tests for instance). It will probably need some redoing of of tagging and filtering of tests.

Copy link

codecov bot commented Aug 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.08%. Comparing base (6e99352) to head (f3a942b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #142      +/-   ##
==========================================
- Coverage   72.94%   69.08%   -3.86%     
==========================================
  Files          39       39              
  Lines        1693     1692       -1     
==========================================
- Hits         1235     1169      -66     
- Misses        458      523      +65     

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

test/Project.toml Outdated Show resolved Hide resolved
@BKaperick
Copy link
Author

The only remaining failure is the persistent_tasks failure from the Aqua tests coming from QuantumSavory.jl.

Comparing the github actions run log to a recent run on master, I notice one new warning during precompilation:

│  WARNING: Method definition traceout!(QuantumOpticsBase.Operator{BL, BR, T} where T where BR where BL, Any) in module QuantumOpticsBase at /home/runner/.julia/packages/QuantumOpticsBase/QN1iB/src/operators_dense.jl:31 overwritten in module QuantumSavory at /home/runner/work/QuantumSavory.jl/QuantumSavory.jl/src/backends/quantumoptics/quantumoptics.jl:21.
│  ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.

and one new warning during running tests:

┌ Warning: Module QuantumSavory with build ID ffffffff-ffff-ffff-0000-009cee9a6d73 is missing from the cache.
│ This may mean QuantumSavory [2de2e421-972c-4cb5-a0c3-999c85908079] does not support precompilation but is imported by a module that does.

@BKaperick BKaperick marked this pull request as ready for review August 7, 2024 12:57
@Krastanov
Copy link
Member

Thanks, @BKaperick ! Some of the errors you are getting are from some invasive work happening to remove piracies that is still in progress as it spans multiple packages (e.g. #143 ). It should get merged soon and then I will be able to rerun the tests here and provide a review. Apologies for the delay!

I am running a summer workshop this week (qnumerics.org) so I might be a bit slow to answer.

@Krastanov
Copy link
Member

Apologies for not warning you about the JuMP/GraphMatching removal -- that happened because they were causing issues with installation on non-linux machines.

@Krastanov Krastanov added the Skip-Changelog label for control of CI: skips the changelog check label Sep 22, 2024
@BKaperick
Copy link
Author

Hi @Krastanov no problem at all about the GraphMatching removal; I saw the other PR.

Right now I have 37 issues identified by JET, which is more than the 33 allowed. The last run on master also failed but with only 35 issues.

Doing a diff on the JET output, it looks like these are the two new issues, but looking at src/CircuitZoo/CircuitZoo.jl#L150 I don't see why this PR would cause these new issues to arise:

> ┌  @ QuantumSavory.CircuitZoo /home/runner/work/QuantumSavory.jl/QuantumSavory.jl/src/CircuitZoo/CircuitZoo.jl:150
> │┌ indexed_iterate(I::Nothing, i::Int64) @ Base ./tuple.jl:95
> ││ no matching method found `iterate(::Nothing)`: x = iterate(I::Nothing)
> │└────────────────────
> │┌ indexed_iterate(I::Nothing, i::Int64, state::Int64) @ Base ./tuple.jl:100
> ││ no matching method found `iterate(::Nothing, ::Int64)`: x = iterate(I::Nothing, state::Int64)
> │└────────────────────

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