Open GeorgeR227 opened 3 months ago
Some calls may be better off as @generated
functions. We should talk about what it would take for this to be in ACSets main at Wednesday's Catlab Developer's meeting.
I'd rather not be writing @generated
calls since we've seen that they don't have their intended effects in ACSets anyway and that'd severely complicate the code.
Having this in ACSets main sounds fine but it leads me to wonder what exactly is supposed to be the difference between ACSets and DiagrammaticEquations.
To ACSets.jl belong data structures and algorithms over generic (not only compute-graph like) schemas. Partitioning the code as of the most recent commit, src/query.jl
and test/query.jl
are ACSets.jl-like.
The "query" related code is quite similar to the chained-subparts code, which Sean contributed to ACSets.jl, in that case using CompTime. A recent draft PR demonstrates how using @generated
to replace that feature allows the Julia compiler to e.g. eliminate intermediate allocations from certain loops.
Sean's PR provides syntactic sugar for nested calls to incident
. This current PR for adjacent. The code written for the current PR can only be improved by consulting with those sister ones.
Attention: Patch coverage is 80.00000%
with 6 lines
in your changes missing coverage. Please review.
Project coverage is 86.55%. Comparing base (
55d2972
) to head (e54b692
).
Files | Patch % | Lines |
---|---|---|
src/deca/deca_query.jl | 40.00% | 6 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR adds a higher level
collected_incident
function that is meant to serve as a replacement to the many reduce-vcats we tend to use when trying to call incident on multiple things at once. Since results from this function are always combined into a single vector of unique results, as opposed toincident
which may return a vector of vector of results, care must be taken when calling this function into different tables or when calling with multiple inputs.This function is meant to be generic to work well with the idea that DiagrammaticEquations should have abstracted algorithms but I've also added specific helper functions for Decapodes that may be useful.