Catchup 18: Add agent paper reproduction#52
Merged
jmsexton03 merged 235 commits intoMar 26, 2026
Conversation
…8_add_agent_paper_reproduction
jmsexton03
commented
Mar 26, 2026
Comment on lines
+156
to
+220
| @classmethod | ||
| def get_viz_variable_catalog(cls, repo_root: Path | None = None) -> list[dict[str, Any]]: | ||
| """ | ||
| Build ERF visualization variable catalog from live ERF source files. | ||
| """ | ||
| if repo_root: | ||
| root = Path(repo_root) | ||
| else: | ||
| root = Path(__file__).resolve().parents[2].parent / "ERF" | ||
|
|
||
| header = root / "Source" / "ERF.H" | ||
| if not header.exists(): | ||
| return [] | ||
|
|
||
| try: | ||
| text = header.read_text(encoding="utf-8", errors="ignore") | ||
| except OSError: | ||
| return [] | ||
|
|
||
| vector_pattern = re.compile( | ||
| r'const\s+amrex::Vector<std::string>\s+(cons_names|derived_names|derived_names_2d)\s*\{(.*?)\};', | ||
| re.DOTALL, | ||
| ) | ||
| names: list[str] = [] | ||
| for _, body in vector_pattern.findall(text): | ||
| names.extend(re.findall(r'"([^"]+)"', body)) | ||
|
|
||
| units = { | ||
| "density": "kg/m^3", | ||
| "temp": "K", | ||
| "pressure": "Pa", | ||
| "qv": "kg/kg", | ||
| "qc": "kg/kg", | ||
| "qi": "kg/kg", | ||
| "qrain": "kg/kg", | ||
| "qsnow": "kg/kg", | ||
| "qgraup": "kg/kg", | ||
| "qt": "kg/kg", | ||
| } | ||
| aliases = { | ||
| "temp": ["temperature"], | ||
| "magvel": ["velocity", "speed"], | ||
| "vorticity_z": ["vorticity", "vertical vorticity"], | ||
| "qc": ["cloud water", "cloud_water", "liquid water", "cloud liquid"], | ||
| "qv": ["water vapor", "vapor mixing ratio", "humidity"], | ||
| } | ||
|
|
||
| catalog: list[dict[str, Any]] = [] | ||
| seen: set[str] = set() | ||
| source_ref = str(header) | ||
| for name in names: | ||
| if name in seen: | ||
| continue | ||
| seen.add(name) | ||
| catalog.append( | ||
| { | ||
| "name": name, | ||
| "aliases": aliases.get(name, []), | ||
| "units": units.get(name), | ||
| "description": None, | ||
| "source": source_ref, | ||
| } | ||
| ) | ||
| return catalog | ||
|
|
Collaborator
Author
There was a problem hiding this comment.
maybe too specific and you could get it from the llm instead of more catalog listing
Collaborator
Author
There was a problem hiding this comment.
maybe a better place for this to live or way to be set up?
Collaborator
Author
There was a problem hiding this comment.
maybe too hard-coded
Collaborator
Author
There was a problem hiding this comment.
This hardcoded which direction is interesting may not be documented well even though it's tested
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.
Summary
18on branchcatchup_18_add_agent_paper_reproduction.c6bf31ae0ca6..2c2d60017707(sourceapply_stack_slice_118-> canonicalfix_stack_main)1/2/2/0(total5)fix_stack_mainat73f37cf9e86d.Related or overlapping functionality / DRY guidance
fix_stack_main); avoid duplicating logic that is already hardened in shared services/nodes.src/models/graph_state_canonical.pyandtests/contracts/*when touching shared flows.artifacts/integration/findings_reconciliation.jsonandartifacts/integration/fix_branch_remap_impact.md.docs/adr/(one short file describing context, decision, consequences).Impact checklist
Tests run (CI runs:
pytest tests/unit,pytest tests/quality,pytest tests/integration -m "integration_l1 or integration_l2 or integration_l3 or integration_l4 or integration_full")pytest tests/unitpytest tests/qualitypytest tests/integration -m "integration_l1 or integration_l2 or integration_l3 or integration_l4 or integration_full"fix_stack_mainnot executedfix_stack_main(73f37cf9e86d)1663 passed, 31 skipped, 3 warnings(coverage56.82%)1813 passed, 78 skipped, 10 xfailed, 11 warnings(coverage58.63%)20 passed, 1 skipped, 5 warnings47 passed, 36 skipped, 92 deselected, 1 xfailed, 7 warningsartifacts/integration/reports/fix_stack_main_20260318_034847/unit.junit.xml,artifacts/integration/reports/fix_stack_main_20260318_034847/full.junit.xmlrequires_solver(...)implies repo + schema + default indices are available locally.-k pelec|erf|amrex|warpxto filter solver-specific tests.Tests not run in CI (required if any)
tests/unit,tests/quality, andtests/integrationwithintegration_l1..l4+integration_fullmarkers via micromamba; list anything else not covered by CI here.fix_stack_main) rather than re-running each catchup branch independently.Notes (optional)
artifacts/integration/reports/fix_stack_main_20260318_034847total_findings=109,addressed=109artifacts/integration/fix_branch_remap_impact.mdfix_stack_mainartifacts.Labels (optional)