Repository navigation
Add GGD helpers migrated from IMASggd (grid_ggd path-linking, subset ∈) - #106
Merged
Merged
Conversation
IMASggd defined Base.getproperty(::all__grid_ggd, ::Symbol) and
Base.:∈(::Tuple{Real,Real}, ::Tuple{all__grid_subset, all__space}) on Unions
of IMASdd types — type piracy that belongs here, and a precompilation hazard
downstream (method overwriting is a hard error during precompilation, e.g. in
PackageCompiler sysimage builds of environments that load both packages,
first seen building the FUSE v1.1.6 container where SOLPS2imas pulls IMASggd).
New src/ggd.jl adds the type unions (all__grid_ggd, all__space,
all__grid_subset), the grid_ggd path-linking getproperty (now falling back to
the standard IDS property machinery via invoke, instead of IMASggd's raw
getfield bypass), add_subset_element!, get_subset_boundary(_inds), and the
point-in-subset ∈. Functionally verified: path deref across IDSs, and ∈ on a
hand-built one-cell grid. Bumps version to 8.6.0.
Companion change removes the two methods from IMASggd (compat IMASdd = "8.6").
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #106 +/- ##
==========================================
- Coverage 44.01% 43.89% -0.12%
==========================================
Files 16 17 +1
Lines 31454 31538 +84
==========================================
+ Hits 13844 13845 +1
- Misses 17610 17693 +83 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
grid_ggd types are IDSvectorRawElement — their canonical getproperty is direct getfield with no processing. Fall back to that (as IMASggd's original did) instead of invoking the full IDS property machinery, and drop the stray to_cocos kwarg. Path-linking behavior unchanged.
jmcclena
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IMASggd defines
Base.getproperty(::all__grid_ggd, ::Symbol)andBase.:∈(::Tuple{Real,Real}, ::Tuple{all__grid_subset, all__space})on Unions of IMASdd types — type piracy that belongs here. Beyond hygiene, it is a precompilation hazard: method overwriting is a hard error during precompilation, which surfaced building the FUSE v1.1.6 container sysimage (SOLPS2imas pulls IMASggd from General into the same environment as the FUSE stack).New
src/ggd.jladds:all__grid_ggd,all__space,all__grid_subset,getproperty(e.g.radiation.grid_ggd[1].path = "edge_profiles/grid_ggd(1)"transparently dereferences). The no-path fallback is directgetfield, matching the canonicalIDSvectorRawElementbehavior of these types (identical semantics to IMASggd's method),add_subset_element!(both overloads),get_subset_boundary(_inds), and the point-in-subset∈.Verified: cross-IDS path deref (with
pathitself staying local), and∈inside/outside checks on a hand-built one-cell grid. Combined-load test with the companion IMASggd branch precompiles with no overwriting warnings and dispatches to the IMASdd method.Bumps version to 8.6.0. Companion PR: ProjectTorreyPines/IMASggd.jl#90 (removal, compat
IMASdd = "8.6") — this PR must merge and register first.🤖 Generated with Claude Code