Update for refined inherited slots#2
Merged
Conversation
Now that the code generator in LinkML-Py (at least in my dev branch) can generate suitable code for "refined inherited slots", we no longer need manually crafted test classes, we can instead generate them from a LinkML schema like the rest of the test classes.
Use my development branch (corresponding to LinkML PR linkml/linkml#3589) to re-generate all LinkML-derived classes. This replaces the previously manually written classes for the "refined inherited slots" test case by classes that are derived from the corresponding schema. This also updates some classes of LinkML’s own meta-schema, since a handful of them do fall in the "refined inherited slots" scenario (e.g. SlotDefinition refines the `is_a` slot so that it can only point to another SlotDefinition, rather than a more generic Definition).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR uses the updated Java code generator in LinkML-Py (PR linkml/linkml#3589) to
(1) automatically generates the classes needed to test the “refined inherited slots” scenario (replacing the existing test classes that were previously handcrafted);
(2) updates the classes derived from LinkML’s own meta-model, since a few of them do refine some inherited slots (e.g.
SlotDefinitionrefines theis_aslot so that it can only point to anotherSlotDefinitionobject, rather than a more genericDefinitionobject).