Skip to content

Make sure docgen uses induced slots - #408

Merged
matentzn merged 5 commits into
masterfrom
docs-induced-slots
Jul 18, 2025
Merged

Make sure docgen uses induced slots#408
matentzn merged 5 commits into
masterfrom
docs-induced-slots

Conversation

@matentzn

@matentzn matentzn commented Jan 6, 2025

Copy link
Copy Markdown
Collaborator

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 necessary
  • make test has been run locally
  • tests have been added/updated (if applicable)
  • CHANGELOG.md has been updated.

If you are proposing a change to the SSSOM metadata model, you must

  • provide a full, working and valid example in examples/
  • provide a link to the related GitHub issue in the see_also field of the linkml model
  • provide a link to a valid example in the see_also field of the linkml model
  • run SSSOM-Py test suite against the updated model

Before, slot information was taken outside the context of a specific class (not induced), which led to wrong rendering in the docs.
@matentzn
matentzn requested a review from sujaypatil96 January 6, 2025 07:10

@sujaypatil96 sujaypatil96 left a comment

Copy link
Copy Markdown
Contributor

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!

Comment thread src/doc-templates/index.md.jinja2
Comment thread src/doc-templates/index.md.jinja2
@sujaypatil96

Copy link
Copy Markdown
Contributor

We might not need any changes here? See my response on the related issue: #406 (comment)

matentzn added 3 commits July 16, 2025 15:50
As pointed out by @gouttegd in #468, this template makes too many assumptions. A slot is not _generally_ optional or required, it is optional or required in the context of a specific class.
@matentzn
matentzn requested a review from sujaypatil96 July 16, 2025 17:06

@sujaypatil96 sujaypatil96 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Approving this PR 🚀

@matentzn
matentzn merged commit 11b214f into master Jul 18, 2025
4 checks passed
@matentzn
matentzn deleted the docs-induced-slots branch July 18, 2025 06:08
@matentzn

Copy link
Copy Markdown
Collaborator Author

Thanks a ton @sujaypatil96!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Contradiction in license Element Description for MappingSet Class

2 participants