Closed RichardBruskiewich closed 11 months ago
Attention: 10 lines
in your changes are missing coverage. Please review.
Comparison is base (
b86c1fa
) 62.11% compared to head (0be3c4a
) 62.09%. Report is 6 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The use case in which the input to the patched code is a simple JSON List of (otherwise LinkML-schema compliant) class objects crashes with the code. I noted that the case of a single JSON dictionary object works fine in the line below the patched one (that processes a list of objects).
One notes that
BaseModel.parse_obj()
appears to only want a dictionary as its argument, not **kwargs from the 'x' dictionary object.It is suggested that some kind of LinkML defined 'collection' class slot needs be present to constrain data entry. I understand the motivation for that. I suppose there is an argument here that the Model should constraint the presence or absence of "multivalued" inputs.
That said, it seems in fact, However, reading in a simple list of instances of data seems a helpful use case to support by default.
However, this tiny PR patch to the code allows the otherwise correct code to validate and correctly return a JSON List of (LinkML schema class compliant and wrapped) data objects.