common-workflow-language / schema_salad

Semantic Annotations for Linked Avro Data
https://www.commonwl.org/v1.2/SchemaSalad.html
Apache License 2.0
72 stars 62 forks source link

Implement smarter `is_subtype` logic #741

Closed GlassOfWhiskey closed 11 months ago

GlassOfWhiskey commented 11 months ago

Thic commit improves the is_subtype method to correctly handle a larger number of cases. In particular, it now deals with complex type definitions (i.e., those using record and array data structures) by correctly identifying when nested and recursive type definitions come with inheritance bounds.

codecov[bot] commented 11 months ago

Codecov Report

Merging #741 (fef7256) into main (cfde2e6) will increase coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #741      +/-   ##
==========================================
+ Coverage   83.47%   83.50%   +0.02%     
==========================================
  Files          22       22              
  Lines        4502     4510       +8     
  Branches     1207     1212       +5     
==========================================
+ Hits         3758     3766       +8     
  Misses        482      482              
  Partials      262      262              
Files Changed Coverage Δ
schema_salad/avro/schema.py 70.55% <100.00%> (+0.61%) :arrow_up:
schema_salad/schema.py 78.32% <100.00%> (+0.06%) :arrow_up: