NCAR / NCAR/ccpp-framework

capgen: check handling of type attribute for ddts

Open
#516 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

capgen enhancement
Dominant language
Python
Stars
25
Forks
67
Avg merge
3d 8h
Merged PRs (30d)
2

Description

Description

https://github.com/NCAR/ccpp-framework/blob/e86d0a7681ed96c206a44ba26bf9fd4cd302058f/scripts/metavar.py#L303

We should check why the ddt_type attribute is copied into the kind attribute and then deleted. Maybe that is not necessary? Because of this behavior, PR https://github.com/NCAR/ccpp-framework/pull/512 is introducing a workaround in add_var_debug_check (around line 1257 in scripts/suite_objects.py in the PR). Also, there is a workaround in ccpp_prebuild.py for this: https://github.com/NCAR/ccpp-framework/blob/0eca5c2c8885f3acadfed1f4945d19d1e97bb25f/scripts/metadata_parser.py#L212

Solution

Check whether this behavior is needed or not. If yes, provide more information in form of inline comments, maybe referring to this issue, so that we don't ask ourselves the same questions in a years time. If not, change the code and remove the workarounds as applicable.

Alternatives (optional)

n/a

Related to (optional)

n/a

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the ddt_type handling at line 303 of scripts/metavar.py, then trace the related workaround at line 212 of scripts/metadata_parser.py. Review add_var_debug_check around line 1257 in the referenced PR 512. Done means either the behavior and its rationale are documented inline, or the behavior and applicable workarounds are removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.