You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A schema therefore only describes the most verbose of the variations.
It is important that all variations of the value are covered by the schema
in a uniform manner.
NOTE: this is not about a kind of an or operator; this is about
variations of incoming data with a "canonical" verbose form to which the data
can/should be automatically converted. This point is not very clear and needs
to be thinked over.
The existing functions unfold_to_list and unfold_list_of_dicts
probably should be converted to a more powerful universal merger function
(or set of functions) that can predictably generate structures based on
given Rule instance and value.
The schema is defined in a uniform way for validation and manipulation
as it describes the possible variations of values.
Open question: whether validate() should call the merger or it should be done
manually before validation.
Note: This issue has been automatically migrated from Bitbucket
Created by @neithere on 2013-05-16 22:11:51+00:00
The text was updated successfully, but these errors were encountered:
Automated rule-based transformation (e.g. unfolding).
Use Case
A model contains nested structures allowing variable verbosity:
The
plan
key has a strictly defined set of variations.The existing function
monk.manipulation.unfold_list_of_dicts
,applied to the value, predictably converts it to the verbose form.
Problem
In its current state Monk supports the use case via a couple of functions that
must be applied to the value before its validation:
A schema therefore only describes the most verbose of the variations.
It is important that all variations of the value are covered by the schema
in a uniform manner.
NOTE: this is not about a kind of an
or
operator; this is aboutvariations of incoming data with a "canonical" verbose form to which the data
can/should be automatically converted. This point is not very clear and needs
to be thinked over.
Proposed Examples
A more complex example of the same behaviour:
Implementation
The existing functions
unfold_to_list
andunfold_list_of_dicts
probably should be converted to a more powerful universal merger function
(or set of functions) that can predictably generate structures based on
given Rule instance and value.
The schema is defined in a uniform way for validation and manipulation
as it describes the possible variations of values.
Open question: whether
validate()
should call the merger or it should be donemanually before validation.
Note: This issue has been automatically migrated from Bitbucket
Created by @neithere on 2013-05-16 22:11:51+00:00
The text was updated successfully, but these errors were encountered: