microbiomedata / nmdc-runtime

Runtime system for NMDC data management and orchestration
https://microbiomedata.github.io/nmdc-runtime/
Other
4 stars 3 forks source link

False postivie type errors from ref integrity code #576

Open aclum opened 2 days ago

aclum commented 2 days ago

We need to get to the bottom of what I believe are related issues. In both cases the range in linkml is specified with any_of but Jing's code, which i believe is using the schema.json, complains about a type error in https://github.com/microbiomedata/nmdc-runtime/issues/555

'data_object_set doc nmdc:dobj-13-c1z03e41: field was_generated_by referenced doc nmdc:omprc-13-pwcfhd56 not of type Activity' 'library_preparation_set doc nmdc:libprp-11-wy2dc553: field has_input referenced doc nmdc:procsm-11-w0rz8234 not of type Biosample'

Note that the linkml documentation the global slot the definition appears to list range correctly https://microbiomedata.github.io/nmdc-schema/was_generated_by/ but the induced linkml source is not correct https://microbiomedata.github.io/nmdc-schema/DataObject/

cc @turbomam @sierra-moxon @pkalita-lbl Would one of you please pair with Jing to get to the bottom of this?

There was some discussion over slack, unexplored, that the cause may be lack inlined: true

cc @shreddd

pkalita-lbl commented 2 days ago

@PeopleMakeCulture can you point me to the code that is producing the error messages quoted above and in #555?

sierra-moxon commented 2 days ago

I have a feeling that the same issue that Eric found and reported here: https://github.com/linkml/linkml/issues/2103 is what is causing the mismatch between the induced NMDC schema and the source NMDC schema (a fix is in the works on the LinkML side), but it would be good to see the code generating this error to make sure I'm not jumping to conclusions.