Closed nwlandry closed 1 week ago
Attention: Patch coverage is 98.68421%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 92.49%. Comparing base (
c0f7593
) to head (c4b8a73
). Report is 1 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
xgi/core/views.py | 96.87% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@maximelucas - when do you think you will be able to take a look at this? Thanks!
I've had a look now, thanks! I left comments which are mostly questions for my own understanding.
The main one may be about about the choice between having H._node[node_id]["in"]
and not H._nodes["in"][node_id]
. I'm just wondering which one will be easier to generalise (don't know what I would choose). The first (current) option allows the call to H._[node_id] to be valid like before, but make it a bit more lengthy to access all "in" nodes. By the way, I'm just realising, what is an in-node again? 😛
If the API for the user is unchanged it's not needed, but otherwise we should document this somewhere.
I've had a look now, thanks! I left comments which are mostly questions for my own understanding.
The main one may be about about the choice between having
H._node[node_id]["in"]
and notH._nodes["in"][node_id]
. I'm just wondering which one will be easier to generalise (don't know what I would choose). The first (current) option allows the call to H._[node_id] to be valid like before, but make it a bit more lengthy to access all "in" nodes. By the way, I'm just realising, what is an in-node again? 😛If the API for the user is unchanged it's not needed, but otherwise we should document this somewhere.
Thanks for the review! I've thought quite a bit about your suggestion and I'd like to leave the structure (H._edge[e]["in]
for example) as is for the following reasons:
As far as your question goes, IMO it's most natural to think about it in the bipartite sense. If a node is specified as an input (in the tail) in a directed edge, that edge will add to its out-degree.
Thanks!
This PR changes the internals of
DiHypergraph
so that it is more consistent with the other classes. This is an attempt to start addressing #379. This PR_node_in
and_node_out
with_node
where_node[n]
is of the form{"in": {tail}, "out": {head}}
_edge_in
and_edge_out
with_edge
where_edge[n]
is of the form{"in": {}, "out": {}}
DiIDView
since now we can simply inherit fromIDView
.DiNodeView
andDiEdgeView
toviews.py
and deletesdiviews.py
test_views.py