Skip to content

[feature/capgen-v1] Add missing check for (metadata-)protected variables, reorganize how Claude keeps track of future work - #773

Merged
climbfuji merged 4 commits into
feature/capgen-v1from
feature/claude_followups_and_protected_attribute
Aug 10, 2026
Merged

[feature/capgen-v1] Add missing check for (metadata-)protected variables, reorganize how Claude keeps track of future work#773
climbfuji merged 4 commits into
feature/capgen-v1from
feature/claude_followups_and_protected_attribute

Conversation

@climbfuji

@climbfuji climbfuji commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Description

For feature/capgen-v1:

  1. Add missing check for protected variables (per metadata), mirroring the functionality in capgen v0 (capgen/generator/suite_resolver.py and capgen/metadata/metadata_table.py).
  2. Reorganize bookkeeping of future/deferred work in Claude so that it travels between different computers/users. Ultimately, at the time we merge feature/capgen-v1 into develop, any open work items will be converted into GitHub issues if still required (all other files).

User interface changes?: No

Fixes: Addresses comment/question about protected in https://github.com/NCAR/ccpp-framework/pull/762/changes#r3554547165

Testing: all pass (ran full CAM-SIMA GNU tests in addition to docstring, unit, and end-to-end tests)
test removed: none
unit tests: added several unit tests for protected attribute
system tests: see open fake CAM-SIMA pull request to replace capgen v0 with capgen v1 (climbfuji/CAM-SIMA#1)
manual testing: n/a

…r to address missing Fortran vs metadata validation checks for 'protected' and other attributes post-capgen-unification
@climbfuji climbfuji changed the title [WIP feature/capgen-v1] Add missing check for (metadata-)protected variables, reorganize how Claude keeps track of future work [feature/capgen-v1] Add missing check for (metadata-)protected variables, reorganize how Claude keeps track of future work Aug 2, 2026
@climbfuji
climbfuji marked this pull request as ready for review August 2, 2026 12:20
@climbfuji
climbfuji requested review from a team as code owners August 2, 2026 12:20
'out', 'K', '()', 'real', 'kind_phys')
arg = _resolve_one_arg(suite_var, 'run', hd, {}, 'my_scheme', set())
self.assertEqual(arg.source, 'suite')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Broader question about the "protected" attribute: If someone puts protected = True in scheme metadata (either intentionally or by mistake), what would happen?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is lines 800-805 in the PR for file capgen/metadata/metadata_table.py - if the scheme has protected=True as metadata attribute, and the intent is not in, you'll get an error at metadata parse time.

Is protected a valid attribute for schemes at all? That's a good question, and it ties with a broader question that neither this PR nor the existing capgen v0 answer: if a variable has protected = True in metadata, should it also have a corresponding attribute in Fortran?

There are also other attributes in this category. This PR doesn't answer that question, but defers it to later - see this PR file doc/followups.md line 37.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ok thanks for the clarification. I agree that we have some unanswered questions!

@peverwhee peverwhee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks @climbfuji

I reviewed the code mods; don't have a huge desire to read the AI-generated .md files at this time.

@climbfuji

Copy link
Copy Markdown
Collaborator Author

Because of #762 (comment), I am going to merge this PR (approved by NCAR and NOAA) into feature/capgen-v1 to unblock other pull requests and current work.

@climbfuji
climbfuji merged commit affc025 into feature/capgen-v1 Aug 10, 2026
@climbfuji
climbfuji deleted the feature/claude_followups_and_protected_attribute branch August 10, 2026 18:54
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