Skip to content

Rename sgrid.DimDimPadding to sgrid.FaceNodePadding#2557

Merged
VeckoTheGecko merged 2 commits intoParcels-code:mainfrom
VeckoTheGecko:sgrid
Mar 25, 2026
Merged

Rename sgrid.DimDimPadding to sgrid.FaceNodePadding#2557
VeckoTheGecko merged 2 commits intoParcels-code:mainfrom
VeckoTheGecko:sgrid

Conversation

@VeckoTheGecko
Copy link
Contributor

After doing the diagrams in #2553 , I thought that this naming was more expressive.

Closes None

Comment on lines 318 to 329
@dataclass
class DimDimPadding:
"""A data class representing a dimension-dimension-padding triplet for SGrid metadata.
class FaceNodePadding:
"""A data class representing a face-node-padding triplet for SGrid metadata.

This triplet can represent different relations depending on context within the standard
For example - for "face_dimensions" this can show the relation between an edge (dim1) and a node
(dim2).
In the context of a 2D grid, "face" corresponds with an edge.

Use the .to_diagram() method to visualize the representation.
"""

dim1: str
dim2: str
face: Dim
node: Dim
padding: Padding
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test suite for the sgrid parsing etc. is very thorough, so the main thing to review is this block.

Copy link
Member

@erikvansebille erikvansebille left a comment

Choose a reason for hiding this comment

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

Very good change; I always found the DimDim naming a bit confusing. This makes it much clearer!

@VeckoTheGecko VeckoTheGecko merged commit 9dd7e47 into Parcels-code:main Mar 25, 2026
13 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in Parcels development Mar 25, 2026
@VeckoTheGecko VeckoTheGecko deleted the sgrid branch March 25, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants