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

Test with Aqua.jl #62

Merged
merged 15 commits into from
Apr 3, 2024
Merged

Test with Aqua.jl #62

merged 15 commits into from
Apr 3, 2024

Conversation

lbenet
Copy link
Collaborator

@lbenet lbenet commented Mar 26, 2024

No description provided.

@lbenet
Copy link
Collaborator Author

lbenet commented Mar 26, 2024

This PR aims to check with Aqua.jl, specially for ambiguities, and issues with type piracy, which may affect performance

@lbenet
Copy link
Collaborator Author

lbenet commented Mar 26, 2024

Aqua reports some ambiguities, and possible test piracies (only in Julia v1.10). Note that I have commented several tests to see the output from Aqua (which strangely differs from what I get locally).

@PerezHz
Copy link
Owner

PerezHz commented Mar 28, 2024

Many thanks for this PR @lbenet! Indeed, there are some type piracies related to some overloads of SatelliteToolboxTransformations methods (reported in #30), then for the time being I think it's okay to mark those tests as broken as you've already done.

@PerezHz
Copy link
Owner

PerezHz commented Mar 28, 2024

Regarding the method ambiguities I think those come from Interpolations.jl, it's probably worth opening an issue there?

@lbenet
Copy link
Collaborator Author

lbenet commented Mar 29, 2024

Rebased to current master...

Project.toml Outdated Show resolved Hide resolved
Remove Test compat entry
Project.toml Outdated Show resolved Hide resolved
Remove Distributed compat entry
@PerezHz
Copy link
Owner

PerezHz commented Mar 29, 2024

(I went ahead with a couple of commits to remove Test and Distributed compat entries)

@PerezHz
Copy link
Owner

PerezHz commented Mar 29, 2024

Also, just opened JuliaSpace/SatelliteToolboxTransformations.jl#6 which I hope can shed some light into how to avoid overloading ecef_to_geocentric for Vector{<:AbstractSeries}

@PerezHz
Copy link
Owner

PerezHz commented Mar 31, 2024

Pushed a few commits which, together with JuliaDiff/TaylorSeries.jl#353, solve method ambiguities and a possible type piracy

@PerezHz
Copy link
Owner

PerezHz commented Mar 31, 2024

JuliaDiff/TaylorSeries.jl#354 solves another type piracy, but that's not strictly necessary as things are now, since piracy tests are marked as broken (we can either solve the piracies or leave those tests marked as broken for the time being).

(res::AbstractVector{OpticalResidual{T, TaylorN{T}}})(x::Vector{T}) where {T <: Real} = evaluate(res, x)
(res::Vector{OpticalResidual{T, TaylorN{T}}})(x::Vector{T}) where {T <: Real} = evaluate(res, x)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Naive question: what is the motivation for this change? (I think AbstractVector would allow applying this function to more types, e.g. SubArray{T,1} or SVector).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This may perhaps not be relevant, but I thought it was easier to ask...

Copy link
Owner

Choose a reason for hiding this comment

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

This helps avoid an ambiguity with callable methods from Interpolations.jl which also dispatch on <:AbstractArray{T,N}; I agree it's perhaps a bit restrictive, and a more generic solution could be to define a OpticalResidualVector struct and define the callable methods over that struct. I would suggest to go with this approach for now, and revisit this if needed.

Copy link
Owner

Choose a reason for hiding this comment

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

Yet another possibility is to avoid using Vector{T} for the calling argument type (again, maybe wrapping it somehow in another struct)

@PerezHz
Copy link
Owner

PerezHz commented Apr 1, 2024

Pushed a couple of commits reflecting the current state of things after merging of JuliaDiff/TaylorSeries.jl#354

@PerezHz
Copy link
Owner

PerezHz commented Apr 1, 2024

There are still some type-piracies due to some TaylorInterpolant JLD2 serialization dispatches; since TaylorInterpolant lives in PlanetaryEphemeris that type-piracy can be solved by moving over those dispatches over to PlanetaryEphemeris (working on it)

@PerezHz
Copy link
Owner

PerezHz commented Apr 2, 2024

Solved the remaining type-piracies by moving over the corresponding methods to PlanetaryEphemeris. Are there any other thing you think we should add here @lbenet?

@lbenet
Copy link
Collaborator Author

lbenet commented Apr 2, 2024

Thanks a lot @PerezHz for solving all the remaining issues related to this PR. I am in favor of merging it as it is.

@PerezHz PerezHz merged commit 9ec1a42 into main Apr 3, 2024
6 checks passed
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