Skip to content

Cleanup/manual review of feature/cagen-v1 part 1 + 2 minor improvements#764

Merged
climbfuji merged 15 commits into
feature/capgen-v1from
feature/capgen-v1-cleanup-01
Jul 16, 2026
Merged

Cleanup/manual review of feature/cagen-v1 part 1 + 2 minor improvements#764
climbfuji merged 15 commits into
feature/capgen-v1from
feature/capgen-v1-cleanup-01

Conversation

@climbfuji

@climbfuji climbfuji commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

This PR targets the feature/capgen-v1 branch with follow-up and cleanup changes from manual code reviews (capgen/metadata/parse-tools/*) plus a few selected, minor improvements. This branch is being used by the CAM-SIMA feature branches that replace the original capgen v0 with the new capgen v1.

  1. Temporary: run CI tests also for pull requests against branch feature/capgen-v1.
  2. Simplify capgen/metadata/parse_tools/parse_source.py. Some of the removed features were (ab)used by CAM-SIMA and are now in the updated capgen compatibility layer in the CAM-SIMA feature branch.
  3. Simplify capgen/metadata/parse_tools/parse_log.py. Requires a tiny change in the CAM-SIMA compatibility layer (now in the (CAM-SIMA feature branch).
  4. Add documentation, simplify, and add a comment about a latent bug that doesn't hurt is today w.r.t. escaping periods in decimals in capgen/metadata/parse_tools/fortran_conditional.py.
  5. capgen/metadata/parse_tools/io_helpers.py: better documentation, preserve default umask.
  6. Simplify capgen/metadata/parse_tools/xml_tools.py: remove unneeded arguments, trim down docstring tests (covered in unit tests and end-to-end tests). Requires small changes in the CAM-SIMA compatibility layer (now in the (CAM-SIMA feature branch).
  7. Strip down capgen/metadata/parse_tools/parse_checkers.py, update capgen/metadata/metadata_table.py accordingly.
  8. Not cleanup: Fix the trailing comments after the variable conversions in the Group cap ([feature/capgen-v1-cleanup-01] Add correct comment to supported variable conversions (#767) + bug fixes + unit test updates #768) by @dustinswales.
  9. Not cleanup: Add additional report option --suite-variables to retrieve suite-owned variables from datatable.
  10. Not cleanup: Log variable transformations during capgen call at default logging level (0d48ab0).

User interface changes?: No (so far - the goal of these clean up changes is no API changes).

Issues

This is part 1 of the cleanup/complete manual review of the capgen v1 codebase.

Testing

  • CI (docstring, unit, end-to-end tests)
  • NEPTUNE
  • CAM-SIMA testing in progress/queued

@climbfuji climbfuji self-assigned this Jul 8, 2026
climbfuji and others added 12 commits July 8, 2026 11:01
…t doesn't hurt is today w.r.t. escaping periods in decimals in capgen/metadata/parse_tools/fortran_conditional.py
…guments, trim down docstring tests (covered in unit tests and end-to-end tests
…apgen/metadata/metadata_table.py accordingly
… case insensitive (#766)

Adds to_lower routine to capgen/src/ccpp_constituent_prop_mod.F90 and uses that to make the ccpp_constituent_index, ccpp_constituent_indices, and <host>_const_get_index interfaces case insensitive.
…ble conversions (#767) + bug fixes + unit test updates (#768)

Fix the trailing comments after the variable conversions in the Group caps.

Contributors: @dustinswales
@climbfuji climbfuji changed the title WIP - IGNORE - follow-up/cleanup for feature/cagen-v1 Cleanup/manual review of feature/cagen-v1 part 1 Jul 14, 2026
@climbfuji
climbfuji marked this pull request as ready for review July 14, 2026 20:15
@climbfuji
climbfuji requested review from a team as code owners July 14, 2026 20:15
@climbfuji climbfuji changed the title Cleanup/manual review of feature/cagen-v1 part 1 Cleanup/manual review of feature/cagen-v1 part 1 + 2 minor improvements Jul 14, 2026

@dustinswales dustinswales left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like the idea of being able to query the datatable for suite-variables.
Looks good to me.

@climbfuji

Copy link
Copy Markdown
Collaborator Author

Tested this successfully with NEPTUNE, CAM-SIMA tests are waiting for an update of the test data.

@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.

did a very high-level review of the clean-up stuff. looks OK to me.

Officially signing off on this despite the couple of CAM-SIMA tests that are failing - those test will pass once ESCOMP/CAM-SIMA#518 is merged

@climbfuji

Copy link
Copy Markdown
Collaborator Author

Great, thanks. I'll keep an eye on the CAM-SIMA PR.

@climbfuji
climbfuji merged commit 1078058 into feature/capgen-v1 Jul 16, 2026
8 checks passed
@climbfuji
climbfuji deleted the feature/capgen-v1-cleanup-01 branch July 16, 2026 21:16
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