Skip to content

Conversation

ialarmedalien
Copy link
Collaborator

Similar in function to slot_range_as_union but performs a number of checks and removes linkml:Any or None from the results.

I am not particularly stuck on the name so if anyone has a better one, go ahead and suggest it!

@ialarmedalien ialarmedalien self-assigned this Oct 9, 2025
@ialarmedalien ialarmedalien added the enhancement New feature or request label Oct 9, 2025
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.77%. Comparing base (ff268a3) to head (8bc877a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #471      +/-   ##
==========================================
+ Coverage   77.65%   77.77%   +0.11%     
==========================================
  Files          52       52              
  Lines        4480     4499      +19     
  Branches      973      979       +6     
==========================================
+ Hits         3479     3499      +20     
  Misses        779      779              
+ Partials      222      221       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +1712 to +1713
"induced_slot_range",
"induced_range_strict",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

two new elements here -- testing the induced_slot_range function and induced_slot_range with the strict kwarg set

(sv_range, range_tuple) = sv_range_riid_gen

slots_by_name = {s.name: s for s in sv_range.class_induced_slots("ClassWithRanges")}
slot_object = sv_range.induced_slot(slot_name, "ClassWithRanges")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

was

slots_by_name = {s.name: s for s in sv_range.class_induced_slots("ClassWithRanges")}

No real need to generate induced slots for all the slots in ClassWithRanges -- just generate the induced slot for the slot under investigation.

Comment on lines +1927 to +1928
if slot_range:
return {slot_range}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unlike slot_range_as_union, if the slot range is None, this function does not return [None]; it returns an empty set. If the slot range is defined, it returns a set containing that range.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant