Skip to content

Commit 5379bc4

Browse files
InterdisciplinaryPhysicsTeamClaudMorpitmonticone
committed
Update example and docs
Co-Authored-By: Claudio Moroni <[email protected]> Co-Authored-By: Pietro Monticone <[email protected]>
1 parent 7d1cf04 commit 5379bc4

File tree

4 files changed

+30
-1
lines changed

4 files changed

+30
-1
lines changed

docs/src/index.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ Pkg.add(url="https://github.com/JuliaGraphs/MultilayerGraphs.jl")
6464
Here we illustrate how to define, handle and analyse a `MultilayerGraph` (the directed version is completely analogous).
6565

6666
```julia
67+
# Install necessary tutorial dependencies
68+
using Pkg
69+
Pkg.add(["Revise", "Distributions", "SimpleValueGraph",
70+
"LoggingExtras", "StatsBase", "SimpleWeightedGraphs",
71+
"MetaGraphs", "Agents", "MultilayerGraphs"])
72+
73+
# Import necessary tutorial dependencies
6774
using Revise
6875
using StatsBase, Distributions
6976
using Graphs, SimpleWeightedGraphs, MetaGraphs, SimpleValueGraphs
@@ -116,7 +123,7 @@ MultilayerVertex(
116123
)
117124
```
118125

119-
Let's contruct a list of `MultilayerVertex`s to use in the remainder of the tutorial:
126+
Let's construct a list of `MultilayerVertex`s to use in the remainder of the tutorial:
120127

121128
```julia
122129
## Convert nodes to multilayer vertices without metadata

example/Project.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[deps]
2+
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
3+
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
4+
MultilayerGraphs = "af984530-d72f-4904-8b81-b992bbbeaf3f"
5+
SimpleValueGraphs = "b43c691f-cac2-5415-8122-396fe16a49fc"

example/example.md renamed to example/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ Pkg.add(url="https://github.com/JuliaGraphs/MultilayerGraphs.jl")
2323
Let's begin by importing the necessary dependencies and setting the relevant constants.
2424

2525
```julia
26+
# Import the package manager
27+
using Pkg
28+
# Activate the environment
29+
Pkg.activate(@__DIR__)
30+
# Instantiate the environment
31+
Pkg.instantiate()
2632
# Import necessary dependencies
2733
using Distributions, Graphs, SimpleValueGraphs
2834
using MultilayerGraphs

example/example.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
#################################################
2+
################# ENVIRONMENT ###################
3+
#################################################
4+
5+
# Import the package manager
6+
using Pkg
7+
# Activate the environment
8+
Pkg.activate(@__DIR__)
9+
# Instantiate the environment
10+
Pkg.instantiate()
11+
112
#################################################
213
################### PACKAGES ####################
314
#################################################

0 commit comments

Comments
 (0)