Skip to content

No clear default for inlined_as_list #2813

@Silvanoc

Description

@Silvanoc

Describe the bug

No default is neither documented nor implemented for inlined_as_list. In the end it gets the default Python value None. The robust conditional <value> is not True will make it equivalent to False, but the not so robust <value> == False would make that None equivalent to True 🤯

Neither the schema loader nor the viewer provide such a default.

Since the documentation says that "inlining as a dictionary [...] is only possible if the range of the slot is a class that has an identifier slot", we should:

  1. Specify that the default depends on the attributes of the range class.
  2. Fix the implementation so that inlined_as_list gets a default value.
    • If the class does not have an identifier, then inlined: True and inlined_as_list: True.
    • The question is what happens if inlined: True (explicitly set), it has an identifier and no value has been specified for inlined_as_list. Should we have by default set inlined_as_list: False whenever the range classes have an identifier?

Version of LinkML you are using v1.9.2

Please provide a schema (and if applicable, a data file) that replicates the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that should work but isn't, with an example and a test case.community-generatedloadingrelated to loaders

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions