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

Minor improvements #225

Merged
merged 10 commits into from
Jan 17, 2025
Merged

Minor improvements #225

merged 10 commits into from
Jan 17, 2025

Conversation

lkdvos
Copy link
Member

@lkdvos lkdvos commented Jan 12, 2025

Some small changes and improvements, mostly to remove unused code and make Aqua happy (happier at least).

There is still a large source of ambiguities related to the following:

And piracies related to defining methods for type aliases such as MPSTensor

Copy link

codecov bot commented Jan 12, 2025

Codecov Report

Attention: Patch coverage is 79.31034% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/states/quasiparticle_state.jl 62.50% 3 Missing ⚠️
src/states/finitemps.jl 87.50% 1 Missing ⚠️
src/states/ortho.jl 75.00% 1 Missing ⚠️
src/utility/utility.jl 66.66% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/MPSKit.jl 100.00% <ø> (ø)
...c/algorithms/excitation/quasiparticleexcitation.jl 65.71% <100.00%> (ø)
src/algorithms/grassmann.jl 82.05% <ø> (ø)
src/operators/abstractmpo.jl 39.06% <100.00%> (-0.79%) ⬇️
src/operators/lazysum.jl 75.00% <100.00%> (ø)
src/operators/mpohamiltonian.jl 90.75% <100.00%> (+0.02%) ⬆️
src/states/finitemps.jl 79.49% <87.50%> (+0.16%) ⬆️
src/states/ortho.jl 85.92% <75.00%> (-0.65%) ⬇️
src/utility/utility.jl 75.32% <66.66%> (+4.91%) ⬆️
src/states/quasiparticle_state.jl 87.17% <62.50%> (ø)

Copy link
Contributor

@VictorVanthilt VictorVanthilt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These look good to me, can you explain the reasoning for adding the whole _not_missing_type thing?

@lkdvos
Copy link
Member Author

lkdvos commented Jan 17, 2025

It's an unbound type arguments problem: since Vector{Missing} <: Vector{T} where {T<:Union{Missing,A}} would also satisfy the signature, A would then not be defined. Aqua complains about that, even though realistically you would never call this with a vector of missing type. In order to get around this, I need to distill A from the eltype, but it's not easy since you cannot dispatch really dispatch on union types too well.

@lkdvos lkdvos merged commit effcb8c into master Jan 17, 2025
26 of 27 checks passed
@lkdvos lkdvos deleted the ld-aqua branch January 17, 2025 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants