Change substring matching to use of constants in SpatialCoordsRemapper - #1673
Change substring matching to use of constants in SpatialCoordsRemapper#1673erogluorhan wants to merge 2 commits into
Conversation
Sevans711
left a comment
There was a problem hiding this comment.
Noting that this change breaks backwards compatibility for anyone who was using SpatialCoordsRemapper with nonstandard dimension names like "nMesh2_face". Can you clarify here, is this actually the intended behavior?
I noticed that _yac_remap seems to intentionally support dimension inputs like "face centers" (see LABEL_TO_COORD). On skimming, it looks like those names might all be converted to the standard dimension names like "n_face" before getting passed to _construct_remapped_ds (which uses SpatialCoordsRemapper), so it might be fine for this case. Just wanted to confirm the intention here is to drop support for nonstandard dimension names in this remapper.
That's technically correct; however, in practice, it'd be fair to expect no one to have used this outside its implicit use under remap functions, which should already input either of "n_face", "n_node", or "n_edge" only. The call trace so far should have been: either of ( Does that make sense? |
Sevans711
left a comment
There was a problem hiding this comment.
With function docstring update, and clarifications in comments that this was almost certainly only being used inside internal methods, I think it looks good and is ready to merge!
Closes #1671
Overview
We already have global constants for geometric element dim names, but I realized we used lowercase substring matching in
SpatialCoordsRemapper. This PR fixes that.PR Checklist
General
AI Disclosure
AI Usage: N/A