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

Change ImageLike and VolumeLike deprecation warnings to errors #4685

Merged
merged 6 commits into from
Jan 13, 2025

Conversation

ffreyer
Copy link
Collaborator

@ffreyer ffreyer commented Dec 19, 2024

Description

TODO:

  • update tests

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • Added an entry in CHANGELOG.md (for new features and breaking changes)
  • Added or changed relevant sections in the documentation
  • Added Updated unit tests for new algorithms, conversion methods, etc.
  • Added Updated reference image tests for new plotting functions, recipes, visual options, etc.

Comment on lines 669 to 684
function convert_arguments(::VolumeLike, x::RealVector, y::RealVector, z::RealVector, f::Function)
if !applicable(f, x[1], y[1], z[1])
error("You need to pass a function with signature f(x, y, z). Found: $f")
end
# Verify grid regularity
is_regularly_spaced(x) || throw_range_error(x, "x", VolumeLike)
is_regularly_spaced(y) || throw_range_error(y, "y", VolumeLike)
is_regularly_spaced(z) || throw_range_error(z, "z", VolumeLike)

_x, _y, _z = ntuple(Val(3)) do i
A = (x, y, z)[i]
return reshape(A, ntuple(j -> j != i ? 1 : length(A), Val(3)))
end
# TODO only allow unitranges to map over since we dont support irregular x/y/z values

return (map(to_endpoints, (x, y, z))..., el32convert.(f.(_x, _y, _z)))
end
Copy link
Collaborator Author

@ffreyer ffreyer Dec 19, 2024

Choose a reason for hiding this comment

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

Note that this didn't previously warn and now errors (if the array spacing is not approximately the same)

@MakieBot
Copy link
Collaborator

MakieBot commented Dec 19, 2024

Benchmark Results

SHA: 64827841536ba0cb818e6e03d16de10f830d7d2a

Warning

These results are subject to substantial noise because GitHub's CI runs on shared machines that are not ideally suited for benchmarking.

GLMakie
CairoMakie
WGLMakie

@ffreyer ffreyer marked this pull request as ready for review December 19, 2024 16:16
@SimonDanisch SimonDanisch merged commit d3d6eec into master Jan 13, 2025
22 checks passed
@SimonDanisch SimonDanisch deleted the ff/deprecations branch January 13, 2025 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

3 participants