linkml / linkml-runtime

Runtime support for linkml generated models
https://linkml.io/linkml/
Creative Commons Zero v1.0 Universal
22 stars 21 forks source link

Fixed typos in schemview.py functions: delete_enum(), delete_slot(), delete_subset() #301

Closed puja-trivedi closed 4 months ago

puja-trivedi commented 4 months ago

When using the functions delete_enum, delete_slot, and delete_subset I was getting these errors:

  1. AttributeError: 'SchemaDefinition' object has no attribute 'enumes'.
    Which traces back to line 1663, in delete_enum: del self.schema.enumes[enum_name]

2.AttributeError: 'SchemaDefinition' object has no attribute 'slotes'. Which traces back to line 1655, in delete_slot: del self.schema.slotes[slot_name]

  1. AttributeError: 'SchemaDefinition' object has no attribute 'subsetes'. Which traces back to line 1679, in delete_subset: del self.schema.subsetes[subset_name]

When I change enumes to enums, slotes to slots, and subsetes to subsets the functions seem to work as expected.

codecov[bot] commented 4 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (51d2fce) 62.80% compared to head (a959a20) 62.90%. Report is 5 commits behind head on main.

Files Patch % Lines
linkml_runtime/utils/schemaview.py 0.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #301 +/- ## ========================================== + Coverage 62.80% 62.90% +0.10% ========================================== Files 61 62 +1 Lines 8506 8529 +23 Branches 2239 2239 ========================================== + Hits 5342 5365 +23 - Misses 2553 2554 +1 + Partials 611 610 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.