-
Notifications
You must be signed in to change notification settings - Fork 35
schemaview.py: deprecate permissible_value_parent, replace with permissible_value_parents
#479
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
Merged
ialarmedalien
merged 3 commits into
main
from
schemaview_fix_permissible_value_parent_plurality
Oct 22, 2025
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
You are changing a public interface here.
Is this decoration enough for downstream projects? Or are they expecting deprecations to follow the LinkML guidelines?
BTW funny enough in the SchemaView public documentation you can find functions (like
permissible_value_ancestors) reporting closure of permissible_value_parents, confirming the need of this change.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.
I was debating this point for a while (especially since deprecation was top-of-mind from looking at your PR). In the end, I followed the approach that was used with other functions in the SchemaView class as the only references that I could find to the method were in the tests. 🤷
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.
Being a public interface, some projects might have used it and you won't notice it.
In the end I'm not sure if downstream projects are already taking into consideration the current deprecation guidelines or not.
Why aren't you following the guidelines?
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.
Strictly speaking, it isn't changing a public interface because the existing function redirects to a second function that does exactly the same thing. The existing function will not now stop working or return a different result. Downstream consumers can continue to use
permissible_value_parentwithout any negative side effects.I used this deprecation method partially because the public API has been preserved, and partially because there are existing functions in
schemaview.pythat have "deprecated" aliases that are set up in the same way, e.g.The same applies to the functions
all_*for * inclass,enum,type,prefix,subset, andelement.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.
Added an issue about the
@deprecateddecorator:linkml/linkml#2969
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.
You are right on that. But if someone else in the future comes to the idea of cleaning up all deprecations, then it will happen. Therefore I think that with the issue that you've created it should be fine.