[feature/capgen-v1] Add missing check for (metadata-)protected variables, reorganize how Claude keeps track of future work - #773
Conversation
…ween different computers/users
…r to address missing Fortran vs metadata validation checks for 'protected' and other attributes post-capgen-unification
| 'out', 'K', '()', 'real', 'kind_phys') | ||
| arg = _resolve_one_arg(suite_var, 'run', hd, {}, 'my_scheme', set()) | ||
| self.assertEqual(arg.source, 'suite') | ||
|
|
There was a problem hiding this comment.
Broader question about the "protected" attribute: If someone puts protected = True in scheme metadata (either intentionally or by mistake), what would happen?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
ok thanks for the clarification. I agree that we have some unanswered questions!
peverwhee
left a comment
There was a problem hiding this comment.
thanks @climbfuji
I reviewed the code mods; don't have a huge desire to read the AI-generated .md files at this time.
|
Because of #762 (comment), I am going to merge this PR (approved by NCAR and NOAA) into |
Description
For
feature/capgen-v1:capgen/generator/suite_resolver.pyandcapgen/metadata/metadata_table.py).feature/capgen-v1intodevelop, 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
protectedin https://github.com/NCAR/ccpp-framework/pull/762/changes#r3554547165Testing: 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
protectedattributesystem tests: see open fake CAM-SIMA pull request to replace capgen v0 with capgen v1 (climbfuji/CAM-SIMA#1)
manual testing: n/a