Skip to content

Add GGD helpers migrated from IMASggd (grid_ggd path-linking, subset ∈) - #106

Merged
jmcclena merged 2 commits into
masterfrom
ggd-methods
Jul 27, 2026
Merged

jmcclena merged 2 commits into
masterfrom
ggd-methods

Conversation

@tomneiser

@tomneiser tomneiser commented Jul 26, 2026 •

Copy link
Copy Markdown
Member

IMASggd defines 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. 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.jl adds:

  • the type unions all__grid_ggd, all__space, all__grid_subset,
  • the grid_ggd path-linking getproperty (e.g. radiation.grid_ggd[1].path = "edge_profiles/grid_ggd(1)" transparently dereferences). The no-path fallback is direct getfield, matching the canonical IDSvectorRawElement behavior 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 path itself 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

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

codecov Bot commented Jul 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 3.57143% with 81 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.89%. Comparing base (3ddd207) to head (e303a6d).

Files with missing lines Patch % Lines
src/ggd.jl 3.57% 81 Missing ⚠️
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.
📢 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.

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
jmcclena merged commit 0d12f98 into master Jul 27, 2026
8 of 10 checks passed
@tomneiser
tomneiser deleted the ggd-methods branch July 27, 2026 17:21
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.

3 participants