Skip to content

Conversation

@tiemvanderdeure
Copy link
Collaborator

closes #1077 (comment)

With new axes it never makes sense to keep refdims - since the axes might have new dimensions. For the metadata I've now opted to keep this since this is what happens for similar(da, Int) - but then we could also choose to always drop metadata. I'm not sure

@tiemvanderdeure tiemvanderdeure changed the base branch from main to breaking August 15, 2025 16:04
@tiemvanderdeure
Copy link
Collaborator Author

I might actually be more in favour of by default dropping metadata. Behaviour like this is a bit weird.

using DimensionalData, Rasters
ra = Raster(rand(X(1:10), Y(1:10), Z(1:1)); metadata = Dict("A" => 1), name = :myraster)
ra2 = Raster(rand(X(1:10), Y(1:10), Z(1:1)))

ra .+ ra2 # has metadata
ra2 .+ ra # has no metadata

But I don't know what the total consequences of a change like this would be

@codecov
Copy link

codecov bot commented Aug 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.30%. Comparing base (648635c) to head (7e661ba).

Additional details and impacted files
@@            Coverage Diff            @@
##           breaking    #1082   +/-   ##
=========================================
  Coverage     86.29%   86.30%           
=========================================
  Files            56       56           
  Lines          5602     5606    +4     
=========================================
+ Hits           4834     4838    +4     
  Misses          768      768           

☔ 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.

@rafaqz
Copy link
Owner

rafaqz commented Aug 16, 2025

I'm really not sure how not copying metadata plays out for Rasters.jl lets leave it for now until we have a more coherent overall metadata strategy.

similar probably want a test too :)

tiemvanderdeure and others added 2 commits August 16, 2025 09:24
Co-authored-by: Rafael Schouten <[email protected]>
Co-authored-by: Rafael Schouten <[email protected]>
@tiemvanderdeure
Copy link
Collaborator Author

similar probably want a test too :)

It is really extensively tested - and had to make some changes so this change is tested as well

@rafaqz
Copy link
Owner

rafaqz commented Aug 16, 2025

I mean there is no test of what you changed here

(I guess it's hard because in the case it's a DimArray either way - we probably need to use a test AbstractDimArray)

@rafaqz rafaqz merged commit 8069385 into rafaqz:breaking Aug 17, 2025
9 of 10 checks passed
@felixcremer felixcremer mentioned this pull request Sep 23, 2025
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.

behaviour of similar with axes argument is inconsistent

2 participants