Replies: 1 comment
-
This is now supported. https://github.com/linkml/linkml/tree/main/tests/test_compliance We would still like to generate a markdown page summarizing the results of running the suite |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The linkml repo includes many tests for different aspects of LinkML - generators, validation of example data files using various schema constructs, ...
Ideally it would be very easy to navigate from any given schema construct (e.g.
any_of
; or use of combinations ofis_a
andslot_usage
), and see very clearly:This would help with one of the main barriers people face - it's not always obvious that for example json-schema generation doesn't and can't support referential integrity, or that all aspects of the language can be supported in python.
This compliance suite would be complementary to the existing linkml unit tests, but there may be some redundancy. It may make sense for this to live in the linkml-model repo, since it is part of the language specification.
I can see a few ways of doing this:
The first approach is the most straightforward, but may involve a lot of repetitive boilerplate. It could also be hard to refactor if we want to do something like change conventions or layout.
The second approach has the advantage that it's easy to programmatically generate different combinations (as a trivial example, to test validation of simple literal types like int/string/float, this could be done with a single parameterized pytest function). It fits will into our existing structure. And it should not be hard to come up with some routines and conventions to generate publishable output.
The jupyter approach has certain advantages, it's easy to extend, and would also work well as a general educational tool on how to use the linkml framework programmatically. From a software engineering perspective it seems odd to use a notebook as part of testing.
Beta Was this translation helpful? Give feedback.
All reactions