simphony / simphony-metadata

[LEGACY] This repository contains the metadata definitions used in SimPhoNy project.
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

yaml file "shape" specification is ambiguous for strings #60

Closed stefanoborini closed 7 years ago

stefanoborini commented 7 years ago

shape is used inconsistently in the metadata.

When used with a numerical type, it indicates the number of entries, in this case, a linearized 3x3 matrix.

410   STRESS_TENSOR:
411     definition: Stress tensor
412     shape: [9]
413     type: double

In the case of string, it seems to represent the length of this string

 10   UUID:
 11     definition: Universal unique id represented as a hex string size 32
 12     shape: [32]
 13     type: string

Which is ambiguous and inconsistent with the precedent case. I would expect an array of 32 strings in this case.

ahashibon commented 7 years ago

how about if we change type to char for string? the other option is to review cuba.yml schema to include shape and length?

stefanoborini commented 7 years ago

@ahashibon Do we have a schema description?

mehdisadeghi commented 7 years ago

I would suggest to use the same shape definition as we use in simphony_metadata.yml, i.e. shape: (3, 3). Moreover, I think sooner or later we would need to merge cuba.yml into simphony_metadata.yml and designate primary keys from CUDS structure in a better way.