LLNL / shroud

Shroud: generate Fortran and Python wrappers for C and C++ libraries
BSD 3-Clause "New" or "Revised" License
90 stars 7 forks source link

Attr to meta #346

Closed ltaylor16 closed 6 months ago

ltaylor16 commented 6 months ago

attrs is used to store attributes from the YAML file. Changed from a defaultdict to a dict to avoid creating entries when querying the dictionary (attrs["rank"] to attrs.get("rank")). Assign values in metaattrs from attrs. metaattrs also contains computed attributes based on the declarations. For example, vector implies rank(1). There are cases where it is necessary to know what was in the YAML file and the defaultdict was causing misleading entries.