Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traits based sub ecosystem & NodeAlingnedEdgeColored(Di)Graph #107

Merged
merged 25 commits into from
Jan 24, 2023

Conversation

pitmonticone and others added 20 commits January 7, 2023 22:43
Add JOSS submission badge.
Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
Add v1.1 announcement posts to README and docs
TODO:

write tests

Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
TODO:

- Debug precompilation up to abstractmultilayerugraph.jl

- Modify abstractmultilayerdigraph.jl just as abstractmultilayerugraph.jl

Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
Update "Future Developments" section in README and docs.
Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
Fix bugs in README and example
Some tests still error

Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
…ltilayer graph

Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
1. First complete implementation of synchronized edge colored graphs

2. Working sub-ecosystem prototype mainly based on abstract types. Traits are only used to discern between directed and undirercted graphs.

TODO:

Test the synchronized edge colored graphs

Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
Implementation of synchronized edge colored (di) graph completed

Implementation of sub-ecosystem endpoints completed

TODO
1. Update API.md
2. Update index.md
3. Update console printing of layers and interlayers
4. Add FAQ to readme.md & index.md
5. Clean up the code

Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
Code cleaning and reordering

Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

JuliaFormatter

src/directed.jl|267|
src/directed.jl|320|
src/directed.jl|345|
src/directed.jl|388|
src/directed.jl|475|
src/directed.jl|479|
src/directed.jl|487|
src/directed.jl|501|
src/graphs_extensions/graphs.jl|43|
src/graphs_extensions/simplevaluegraphs.jl|85|
src/multilayerdigraph.jl|25|
src/multilayerdigraph.jl|221|
src/multilayerdigraph.jl|237|
src/multilayerdigraph.jl|244|
src/multilayerdigraph.jl|253|
src/multilayerdigraph.jl|261|
src/multilayerdigraph.jl|293|
src/multilayerdigraph.jl|296|
src/multilayerdigraph.jl|303|
src/multilayerdigraph.jl|316|
src/multilayerdigraph.jl|324|
src/multilayergraph.jl|19|
src/multilayergraph.jl|25|
src/multilayergraph.jl|206|
src/multilayergraph.jl|222|
src/multilayergraph.jl|229|
src/multilayergraph.jl|234|
src/multilayergraph.jl|240|
src/multilayergraph.jl|247|
src/multilayergraph.jl|277|
src/multilayergraph.jl|281|
src/multilayergraph.jl|290|
src/multilayergraph.jl|301|
src/multilayergraph.jl|309|
src/special_multilayergraphs/synchronized_edge_colored/abstract_synchronized_edge_colored_graph.jl|11|
src/special_multilayergraphs/synchronized_edge_colored/abstract_synchronized_edge_colored_graph.jl|19|
src/special_multilayergraphs/synchronized_edge_colored/abstract_synchronized_edge_colored_graph.jl|29|
src/special_multilayergraphs/synchronized_edge_colored/abstract_synchronized_edge_colored_graph.jl|33|
src/special_multilayergraphs/synchronized_edge_colored/abstract_synchronized_edge_colored_graph.jl|40|
src/special_multilayergraphs/synchronized_edge_colored/abstract_synchronized_edge_colored_graph.jl|49|
src/special_multilayergraphs/synchronized_edge_colored/abstract_synchronized_edge_colored_graph.jl|65|
src/special_multilayergraphs/synchronized_edge_colored/abstract_synchronized_edge_colored_graph.jl|68|
src/special_multilayergraphs/synchronized_edge_colored/abstract_synchronized_edge_colored_graph.jl|74|
src/special_multilayergraphs/synchronized_edge_colored/abstract_synchronized_edge_colored_graph.jl|82|
src/special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_di_graph.jl|12|
src/special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_di_graph.jl|26|
src/special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_di_graph.jl|32|
src/special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_di_graph.jl|47|
src/special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_di_graph.jl|54|
src/special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_di_graph.jl|60|
src/special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_di_graph.jl|64|
src/special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_graph.jl|12|
src/special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_graph.jl|25|
src/special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_graph.jl|31|
src/special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_graph.jl|46|
src/special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_graph.jl|53|
src/special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_graph.jl|59|
src/special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_graph.jl|63|
src/special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_graph.jl|78|
src/subgraphs/abstractsubgraph.jl|29|
src/subgraphs/abstractsubgraph.jl|57|
src/subgraphs/abstractsubgraph.jl|64|
src/subgraphs/abstractsubgraph.jl|80|
src/subgraphs/abstractsubgraph.jl|87|
src/subgraphs/abstractsubgraph.jl|103|
src/subgraphs/abstractsubgraph.jl|110|
src/subgraphs/abstractsubgraph.jl|206|
src/subgraphs/abstractsubgraph.jl|213|
src/subgraphs/abstractsubgraph.jl|220|
src/subgraphs/layer.jl|310|
src/subgraphs/layer.jl|356|
src/subgraphs/layer.jl|359|
src/subgraphs/layer.jl|363|
src/subgraphs/layer.jl|435|
src/subgraphs/layer.jl|492|
src/traits.jl|47|
src/undirected.jl|10|
src/undirected.jl|21|
src/undirected.jl|46|
src/undirected.jl|99|
src/undirected.jl|115|
src/undirected.jl|122|
src/undirected.jl|143|
src/undirected.jl|151|
src/undirected.jl|175 col 1|
src/undirected.jl|176|
src/undirected.jl|182|
src/undirected.jl|190|
src/undirected.jl|223|
src/undirected.jl|231|
src/undirected.jl|257|
src/undirected.jl|308|
src/undirected.jl|327|
src/undirected.jl|335|
src/undirected.jl|378|
src/undirected.jl|447|
src/undirected.jl|456|
src/undirected.jl|466|
src/undirected.jl|477|
src/utilities.jl|818|
src/utilities.jl|825|
test/synchronized_edge_colored_graph.jl|10|
test/synchronized_edge_colored_graph.jl|17|

@@ -194,14 +205,15 @@ include("representations/abstracttensorrepresentation.jl")
include("representations/abstractmatrixrepresentation.jl")
include("representations/weighttensor.jl")
include("representations/metadatatensor.jl")
include("representations/supraweightmatrix.jl")
include("traits.jl")
include("representations/supraweightmatrix.jl")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
include("representations/supraweightmatrix.jl")
include("representations/supraweightmatrix.jl")

Comment on lines 214 to 216
include("special_multilayergraphs/synchronized_edge_colored/abstract_synchronized_edge_colored_graph.jl")
include("special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_graph.jl")
include("special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_di_graph.jl")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
include("special_multilayergraphs/synchronized_edge_colored/abstract_synchronized_edge_colored_graph.jl")
include("special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_graph.jl")
include("special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_di_graph.jl")
include(
"special_multilayergraphs/synchronized_edge_colored/abstract_synchronized_edge_colored_graph.jl",
)
include(
"special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_graph.jl"
)
include(
"special_multilayergraphs/synchronized_edge_colored/synchronized_edge_colored_di_graph.jl",
)

# General MultilayerGraph Utilities
fadjlist(mg::AbstractMultilayerGraph) = mg.fadjlist


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

"""
function add_node!(mg::AbstractMultilayerGraph, n::Node)
function _add_node!(mg::AbstractMultilayerGraph, n::Node; add_vertex_to_layers::Union{Vector{Symbol}, Symbol} = Symbol[])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
function _add_node!(mg::AbstractMultilayerGraph, n::Node; add_vertex_to_layers::Union{Vector{Symbol}, Symbol} = Symbol[])
function _add_node!(
mg::AbstractMultilayerGraph,
n::Node;
add_vertex_to_layers::Union{Vector{Symbol},Symbol}=Symbol[],
)

_add_vertex!(mg, MV(n, layer_name))
end
end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

src/directed.jl Outdated
@debug "An edge between $(src(me)) and $(dst(me)) already exists"
return false
end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

src/directed.jl Outdated
return true
end


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

src/directed.jl Outdated
"""
@traitfn function _rem_edge!(
mg::M, src::MultilayerVertex, dst::MultilayerVertex
) where {M<:AbstractMultilayerGraph; IsDirected{M}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
) where {M<:AbstractMultilayerGraph; IsDirected{M}}
) where {M <: AbstractMultilayerGraph; IsDirected{M}}

src/directed.jl Outdated
return true
end


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

src/directed.jl Outdated
mg::M, src::MultilayerVertex, dst::MultilayerVertex, weight::U
) where {T,U,M<:AbstractMultilayerDiGraph{T,U}}
) where {T,U,M<:AbstractMultilayerGraph{T,U}; IsDirected{M}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
) where {T,U,M<:AbstractMultilayerGraph{T,U}; IsDirected{M}}
) where {T,U,M<:AbstractMultilayerGraph{T,U};IsDirected{M}}

@coveralls
Copy link

coveralls commented Jan 22, 2023

Pull Request Test Coverage Report for Build 3980839972

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 174 of 191 (91.1%) changed or added relevant lines in 9 files are covered.
  • 144 unchanged lines in 6 files lost coverage.
  • Overall coverage increased (+0.2%) to 83.498%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/utilities.jl 2 3 66.67%
src/abstractmultilayergraph.jl 28 32 87.5%
src/directed.jl 69 74 93.24%
src/undirected.jl 54 61 88.52%
Files with Coverage Reduction New Missed Lines %
src/multilayerdigraph.jl 1 89.58%
src/multilayergraph.jl 3 91.49%
src/subgraphs/abstractsubgraph.jl 21 71.43%
src/utilities.jl 34 77.33%
src/abstractmultilayergraph.jl 41 88.07%
src/subgraphs/layer.jl 44 75.81%
Totals Coverage Status
Change from base Build 3940940912: 0.2%
Covered Lines: 1695
Relevant Lines: 2030

💛 - Coveralls

@codecov
Copy link

codecov bot commented Jan 22, 2023

Codecov Report

Merging #107 (c9a6b2d) into main (94e0a7a) will increase coverage by 0.09%.
The diff coverage is 89.69%.

@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
+ Coverage   83.32%   83.42%   +0.09%     
==========================================
  Files          30       32       +2     
  Lines        2015     2057      +42     
==========================================
+ Hits         1679     1716      +37     
- Misses        336      341       +5     
Impacted Files Coverage Δ
src/graphs_extensions/graphs_extensions.jl 100.00% <ø> (ø)
src/graphs_extensions/metagraphs.jl 60.00% <ø> (-1.54%) ⬇️
src/graphs_extensions/simplevaluegraphs.jl 64.86% <ø> (+1.70%) ⬆️
src/graphs_extensions/simpleweightedgraphs.jl 84.61% <ø> (+6.04%) ⬆️
src/subgraphs/abstractsubgraph.jl 72.41% <ø> (ø)
src/utilities.jl 77.33% <0.00%> (-0.70%) ⬇️
...olored/abstract_node_aligned_edge_colored_graph.jl 80.00% <80.00%> (ø)
src/multilayerdigraph.jl 88.46% <87.50%> (-2.24%) ⬇️
src/multilayergraph.jl 90.19% <87.50%> (+1.18%) ⬆️
src/undirected.jl 96.39% <89.23%> (ø)
... and 10 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

- Rename new graph
- Fix APis (to be completed)

Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
docs/make.jl Outdated
if f isa Function
for method in methods
tv, decls, file, line = arg_decl_parts(m)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
Co-Authored-By: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-Authored-By: Claudio Moroni <43729990+ClaudMor@users.noreply.github.com>
Copy link
Member

@pitmonticone pitmonticone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now.

Copy link
Member

@ClaudMor ClaudMor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update docs in main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement NodeAlignedEdgeColored(Di)Graph Implement a sub-ecosystem for multilayer graphs (preliminary)
4 participants