Skip to content

Add API for checking for model consistency? #29

@f4lco

Description

@f4lco

I'd consider adding an API for extensive consistency checks in the model definitions. The annotations like @FixedField or @FixedFormat leave room for errors and inconsistencies. For example:

  1. All @FixedField annotations together do not describe the dataset exhaustively, meaning there are gaps in the data which do not map onto a @FixedField.
  2. The length of a format pattern exceeds the length allocated by @FixedField.
  3. The length of the @FixedField is too small to accommodate the nested @FixedObject.
  4. ...

I have already prototyped the first rule - all fields must be 'contiguous' / 'gapless' - and found it to be very useful, because the check already identified a typo in one of my model objects.

Mind that this is not only about detectable error conditions, but also about heuristics. As a result, one could have different severity levels like 'error', or 'warning'.

What do you think? Does such a feature fit the scope of your project?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions