-
Notifications
You must be signed in to change notification settings - Fork 25
Make sure docgen uses induced slots #408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Before, slot information was taken outside the context of a specific class (not induced), which led to wrong rendering in the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic you've written here is partially correct, but iterating over c.slots
is not as comprehensive as using class_slots() from SchemaView.
It might be better to switch over to using the class_induced_slots()
method which i've linked out to in my review comments.
I'm happy to do it too, so let me know if you need help!
{%- for slot in c.slots %} | ||
{%- set slot_info = schemaview.get_slot(slot) %} | ||
{%- set slot_info = schemaview.induced_slot(slot, c.name) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the logic in these lines and some lines above can be reduced using the class_induced_slots() method in SchemaView?
Like if you know the name of the class (mapping/mapping set) for which you want to retrieve a list of induced slots, then you can simply make calls to class_induced_slots()
and pass mapping/mapping set as arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @sujaypatil96 I dropped the ball on this; can you please tell exactly the code I should be using here with code suggestion feature?
{%- for slot in c.slots %} | ||
{%- set slot_info = schemaview.get_slot(slot) %} | ||
{%- set slot_info = schemaview.induced_slot(slot, c.name) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above for these lines as well.
We might not need any changes here? See my response on the related issue: #406 (comment) |
Before, slot information was taken outside the context of a specific class (not induced), which led to wrong rendering in the docs.
Resolves #406
docs/
have been added/updated if necessarymake test
has been run locallytests have been added/updated (if applicable)CHANGELOG.md has been updated.If you are proposing a change to the SSSOM metadata model, you must
examples/
see_also
field of the linkml modelsee_also
field of the linkml model