This repository was archived by the owner on Apr 16, 2026. It is now read-only.
Repository navigation
schemaview.py: add tests for get_identifier_slot and get_key_slot - #464
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #464 +/- ##
==========================================
+ Coverage 77.37% 77.40% +0.02%
==========================================
Files 52 52
Lines 4478 4478
Branches 979 979
==========================================
+ Hits 3465 3466 +1
Misses 785 785
+ Partials 228 227 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ialarmedalien
commented
Oct 2, 2025
| :return: slot that acts as identifier, if present | ||
| """ | ||
| for sn in self.class_slots(cn, imports=imports): | ||
| for sn in sorted(self.class_slots(cn, imports=imports)): |
Collaborator
Author
There was a problem hiding this comment.
Allows the identifier (or key) slot to be predicted in cases where there are several slots marked as ID/key. Of course, the user will already have run the linter to eliminate the possibility of there being several ID/key slots...
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Add tests for
get_identifier_slotandget_key_slot.The method of generating the tests may look suspiciously familiar...
Ideally when linkml and linkml-runtime are merged into a single happy family, some of these repeated fixtures can be eliminated.