Skip to content

Have a single source of truth for input and output metadata #749

@SouthEndMusic

Description

@SouthEndMusic

As a follow-up of #735 I would like to move the default values (and also the descriptions for completeness) of the variables from hardcoded in the docs to part of the standard_name structure. That way:

  • Data only has to be added/updated in one place reducing the risk of errors creeping in
  • The parameter tables in the docs can be generated automatically (I see that there's already an instance of running Julia code during rendering of the docs). We already do this for Ribasim: https://ribasim.org/reference/validation.html
  • Default values are no longer distributed over the code base but in one place

I would say use something like

struct VariableMetadata{L, D}
   lens::L
   unit::Unit
   default::D
   description::String
   flag::Symbol
end

where flag can be used to filter parameters during table generation.

Metadata

Metadata

Assignees

Labels

developer-experienceDevelopment quality of life improvementsdocumentationImprovements or additions to documentation

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions