Add type checking to graph construction#119
Conversation
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## main #119 +/- ##
==========================================
+ Coverage 80.31% 81.29% +0.97%
==========================================
Files 115 116 +1
Lines 1910 2042 +132
Branches 302 326 +24
==========================================
+ Hits 1534 1660 +126
Misses 247 247
- Partials 129 135 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
knoepfel
left a comment
There was a problem hiding this comment.
@beojan, bravo. I think you have hit all of the spots in the implementation that would be affected by imposing type constraints when establishing edges. I have several comments below for your consideration and for further discussion. A great start—thanks.
a711c33 to
10e3f6e
Compare
4a0904e to
76905a3
Compare
|
OK, should be ready now. I have some ideas for further cleaning up |
e4f9b70 to
07a8820
Compare
This type is used to store the "product concept"
Only warns if types don't match
Trying to fix a CI compilation issue
Also took a clang-tidy suggestion in product_specification
This fits better with the new class names, and should make it easier to extend the set of properties on which we match later
Not supported in CI
clang-tidy still complains, but I think this looks a bit better
Co-authored-by: Kyle Knoepfel <knoepfel@fnal.gov>
07a8820 to
ebc9771
Compare

Add type checking to products (at least when registering algorithms in C++).
The
qualified_namefor output products, and thespecified_labelfor input products now have type information attached (in the form of a customtype_idcurrently calculated mostly at compile time) that is compared infind_products.I had to use a custom
type_idso we could do things like treatinghandle<int>,int const&, andint const*as the same type. This should also simplify extending this type checking to Python algorithms.I think I've done the best I can with code coverage. I don't know why it thinks the formatting code isn't covered, it definitely should be in my
type_id.cpptest.