Skip to content

fix: animate with plotrange#159

Merged
henry2004y merged 3 commits into
masterfrom
fix-animate
May 10, 2026
Merged

fix: animate with plotrange#159
henry2004y merged 3 commits into
masterfrom
fix-animate

Conversation

@henry2004y

Copy link
Copy Markdown
Owner

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request simplifies the indexing logic in animate.jl by removing explicit dimension mapping when applying a plotrange and expands the test suite with new cases for structured and unstructured data. Feedback suggests adding a check for empty data slices to prevent potential crashes when the plotrange does not overlap with coordinates, and refactoring repeated slicing logic for streamlines to improve readability.

Comment thread ext/BatsrusPyPlotExt/animate.jl Outdated
Comment thread ext/BatsrusPyPlotExt/animate.jl Outdated
@github-actions

github-actions Bot commented May 10, 2026

Copy link
Copy Markdown

Benchmark Results (Julia v1)

Time benchmarks
master df7bf9a... master / df7bf9a...
amrex/load 25.8 ± 0.5 μs 26 ± 0.51 μs 0.993 ± 0.027
amrex/phase_space_3d 5.74 ± 1 ms 5.92 ± 1 ms 0.97 ± 0.24
amrex/select_region 0.246 ± 0.012 ms 0.241 ± 0.012 ms 1.02 ± 0.07
amrex/select_region_from_files 0.751 ± 0.088 ms 0.759 ± 0.067 ms 0.99 ± 0.15
read/ASCII 0.745 ± 0.01 ms 0.73 ± 0.013 ms 1.02 ± 0.023
read/Anisotropy 0.0348 ± 0.0018 ms 0.0349 ± 0.0018 ms 0.997 ± 0.073
read/Anisotropy Symbol 0.0347 ± 0.003 ms 0.0348 ± 0.0028 ms 0.997 ± 0.12
read/Cutdir 2.34 ± 0.23 μs 2.36 ± 0.23 μs 0.992 ± 0.14
read/Cutdir subset 3.21 ± 0.3 μs 3.25 ± 0.29 μs 0.988 ± 0.13
read/Extract Bmag 0.691 ± 0.12 μs 0.681 ± 0.1 μs 1.01 ± 0.23
read/HDF5 0.085 ± 0.0021 ms 0.0847 ± 0.0022 ms 1 ± 0.036
read/HDF5 extract 12.5 ± 0.81 μs 12.6 ± 0.71 μs 0.991 ± 0.085
read/Interp2d 0.822 ± 0.11 μs 0.862 ± 0.17 μs 0.954 ± 0.23
read/Load binary structured 0.0451 ± 0.0013 ms 0.0449 ± 0.0015 ms 1 ± 0.044
time_to_load 1.24 ± 0.032 s 1.23 ± 0.009 s 1.01 ± 0.027
Memory benchmarks
master df7bf9a... master / df7bf9a...
amrex/load 0.212 k allocs: 9.67 kB 0.212 k allocs: 9.67 kB 1
amrex/phase_space_3d 0.059 k allocs: 18.3 MB 0.059 k allocs: 18.3 MB 1
amrex/select_region 3 allocs: 1.07 MB 3 allocs: 1.07 MB 1
amrex/select_region_from_files 0.05 k allocs: 7.48 MB 0.05 k allocs: 7.48 MB 1
read/ASCII 0.505 k allocs: 0.112 MB 0.505 k allocs: 0.112 MB 1
read/Anisotropy 3 allocs: 4.84 kB 3 allocs: 4.84 kB 1
read/Anisotropy Symbol 3 allocs: 4.84 kB 3 allocs: 4.84 kB 1
read/Cutdir 0.137 k allocs: 5.98 kB 0.137 k allocs: 5.98 kB 1
read/Cutdir subset 0.159 k allocs: 8.89 kB 0.159 k allocs: 8.89 kB 1
read/Extract Bmag 3 allocs: 4.09 kB 3 allocs: 4.09 kB 1
read/HDF5 0.1 k allocs: 3.67 kB 0.1 k allocs: 3.67 kB 1
read/HDF5 extract 17 allocs: 4.55 kB 17 allocs: 4.55 kB 1
read/Interp2d 12 allocs: 4.45 kB 12 allocs: 4.45 kB 1
read/Load binary structured 0.241 k allocs: 0.0757 MB 0.241 k allocs: 0.0757 MB 1
time_to_load 0.149 k allocs: 11.1 kB 0.149 k allocs: 11.1 kB 1

@codecov

codecov Bot commented May 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.14286% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.86%. Comparing base (9ed51df) to head (df7bf9a).

Files with missing lines Patch % Lines
ext/BatsrusMakieUniformStreamlinesExt/animate.jl 57.14% 3 Missing ⚠️
ext/BatsrusPyPlotExt/animate.jl 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #159      +/-   ##
==========================================
+ Coverage   81.78%   81.86%   +0.08%     
==========================================
  Files          20       20              
  Lines        3595     3601       +6     
==========================================
+ Hits         2940     2948       +8     
+ Misses        655      653       -2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@henry2004y henry2004y merged commit b57b9bb into master May 10, 2026
7 of 8 checks passed
@henry2004y henry2004y deleted the fix-animate branch May 10, 2026 23:39
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.

1 participant