Skip to content

feat(meta.analysis): in-memory trait_data/prior_distns for run.meta.analysis.pft (Modularity Part 2)#4010

Open
omkarrr2533 wants to merge 2 commits into
PecanProject:developfrom
omkarrr2533:feat/ma-in-memory-inputs
Open

feat(meta.analysis): in-memory trait_data/prior_distns for run.meta.analysis.pft (Modularity Part 2)#4010
omkarrr2533 wants to merge 2 commits into
PecanProject:developfrom
omkarrr2533:feat/ma-in-memory-inputs

Conversation

@omkarrr2533
Copy link
Copy Markdown
Member

Follows #3978. Cuts the second disk hop in the chain — right now run.meta.analysis.pft() reloads trait.data.Rdata/prior.distns.Rdata that get.trait.data.pft() just wrote seconds earlier.

  • Added optional trait_data + prior_distns. Pass both and the load() from pft$outdir is skipped. Pass only one and it errors instead of doing a half-disk/half-memory load.
  • Added return_data (default FALSE). On TRUE the MA outputs get attached to the returned pft; on FALSE you get the bare pft like before. Did it this way because of your feat(db): extract get_trait_data_pft() as standalone file-I/O-free function #3978 point — attaching these to a pft that goes back into settings breaks serialization, so default stays legacy-safe.
  • runModule.run.meta.analysis() left on default FALSE since that's the one writing into settings.
  • Provenance saves / dbfile.insert() unchanged.
  • Also fixed a broken roxygen title on run.meta.analysis.pft.

Format-agnostic on purpose — doesn't touch file formats, that's the separate saveRDS/CSV track. Independent of #3810.
Tests green: FAIL 0 | WARN 0 | SKIP 1 | PASS 116.
GSoC 2026 Week 2.

@omkarrr2533 omkarrr2533 marked this pull request as ready for review May 24, 2026 13:16
@mdietze mdietze added this pull request to the merge queue May 26, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 26, 2026
omkarrr2533 added a commit to omkarrr2533/pecan that referenced this pull request Jun 3, 2026
query_pfts(strict = TRUE) only catches missing PFTs via setequal(),
not multi-row results (duplicates are equal under set semantics).
Drop strict and do both nrow == 0L and nrow > 1L checks explicitly,
matching the wrapper's canonical error wording so existing test
patterns continue to match.

Addresses review feedback on PecanProject#4010.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants