Skip to content

Commit 307fe68

Browse files
committed
switch to Graphs.jl
1 parent 1e48015 commit 307fe68

16 files changed

+70
-50
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: 0 0 * * *
5+
workflow_dispatch:
6+
jobs:
7+
CompatHelper:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: "Add the General registry via Git"
11+
run: |
12+
import Pkg
13+
ENV["JULIA_PKG_SERVER"] = ""
14+
Pkg.Registry.add("General")
15+
shell: julia --color=yes {0}
16+
- name: "Install CompatHelper"
17+
run: |
18+
import Pkg
19+
name = "CompatHelper"
20+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
21+
version = "3"
22+
Pkg.add(; name, uuid, version)
23+
shell: julia --color=yes {0}
24+
- name: "Run CompatHelper"
25+
run: |
26+
import CompatHelper
27+
CompatHelper.main()
28+
shell: julia --color=yes {0}
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/TagBot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: TagBot
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
7+
jobs:
8+
TagBot:
9+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: JuliaRegistries/TagBot@v1
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/daily.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/permanent.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v2
1111
- uses: julia-actions/setup-julia@latest
12-
with:
13-
version: '1.3'
1412
- uses: julia-actions/julia-docdeploy@releases/v1
1513
env:
1614
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17-
- uses: JuliaRegistries/TagBot@v1
18-
with:
19-
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
matrix:
1111
version:
1212
- '1.0'
13-
- '1.4'
13+
- '1'
1414
- 'nightly'
1515
steps:
1616
- uses: actions/checkout@v2
@@ -25,7 +25,3 @@ jobs:
2525
- uses: codecov/codecov-action@v1
2626
with:
2727
file: ./lcov.info
28-
- uses: domluna/JuliaFormatter-action@master
29-
with:
30-
args: -v .
31-
continue-on-error: true

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name = "MetaGraphsNext"
22
uuid = "fa8bd995-216d-47f1-8a91-f3b68fbeb377"
3-
version = "0.1.2"
3+
version = "0.2"
44

55
[deps]
66
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
7-
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
7+
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
88

99
[compat]
1010
JLD2 = "0.1.11, 0.2, 0.3, 0.4"
11-
LightGraphs = "1.2"
11+
Graphs = "1.4.1"
1212
julia = "1"
1313

1414
[extras]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ Welcome to `MetaGraphsNext.jl`, an experimental, type-stable replacement for [Me
77

88
## Getting started
99

10-
To see how the package works, take a look at the tutorial in the [documentation](https://juliagraphs.org/MetaGraphsNext.jl/dev/). We first explain [the basics](tutorial_basics.md) of the `MetaGraph` structure, before moving on to its [integration](tutorial_lightgraphs.md) with `LightGraphs.jl`.
10+
To see how the package works, take a look at the tutorial in the [documentation](https://juliagraphs.org/MetaGraphsNext.jl/dev/). We first explain [the basics](tutorial_basics.md) of the `MetaGraph` structure, before moving on to its [integration](tutorial_graphs.md) with `Graphs.jl`.

docs/make.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ makedocs(
1414
"Home" => "index.md",
1515
"Tutorial" => [
1616
"Basics" => "tutorial_basics.md",
17-
"LightGraphs.jl interface" => "tutorial_lightgraphs.md",
17+
"Graphs.jl interface" => "tutorial_graphs.md",
1818
"Reading / writing" => "tutorial_files.md",
1919
],
2020
"API reference" => "api.md",

docs/src/api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ Modules = [MetaGraphsNext]
2222
Pages = ["weights.jl"]
2323
```
2424

25-
## LightGraphs.jl interface
25+
## Graphs.jl interface
2626

2727
```@autodocs
2828
Modules = [MetaGraphsNext]
29-
Pages = ["lightgraphs.jl"]
29+
Pages = ["graphs.jl"]
3030
```
3131

3232
```@autodocs

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Welcome to `MetaGraphsNext.jl`, an experimental, type-stable replacement for [Me
44

55
## Getting started
66

7-
To see how the package works, take a look at the tutorial. We first explain [the basics](tutorial_basics.md) of the `MetaGraph` structure, before moving on to its [integration](tutorial_lightgraphs.md) with `LightGraphs.jl`.
7+
To see how the package works, take a look at the tutorial. We first explain [the basics](tutorial_basics.md) of the `MetaGraph` structure, before moving on to its [integration](tutorial_graphs.md) with `Graphs.jl`.
88

99
## Index
1010

docs/src/tutorial_basics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Working with metagraphs
22

33
```jldoctest example
4-
julia> using LightGraphs
4+
julia> using Graphs
55
66
julia> using MetaGraphsNext
77
```
@@ -120,7 +120,7 @@ julia> weighted[:red] = nothing; weighted[:blue] = nothing; weighted[:yellow] =
120120
121121
julia> weighted[:red, :blue] = 1.0; weighted[:blue, :yellow] = 2.0;
122122
123-
julia> the_weights = LightGraphs.weights(weighted)
123+
julia> the_weights = Graphs.weights(weighted)
124124
metaweights
125125
126126
julia> size(the_weights)

docs/src/tutorial_files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Read / write
22

33
```jldoctest readwrite
4-
julia> using LightGraphs
4+
julia> using Graphs
55
66
julia> using MetaGraphsNext
77
```

docs/src/tutorial_lightgraphs.md renamed to docs/src/tutorial_graphs.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# LightGraphs.jl interface
1+
# Graphs.jl interface
22

3-
```jldoctest lightgraphs
4-
julia> using LightGraphs
3+
```jldoctest graphs
4+
julia> using Graphs
55
66
julia> using MetaGraphsNext
77
```
88

9-
`MetaGraph`s inherit many methods from LightGraphs.jl. In general, inherited methods refer to vertices by codes, not labels, for compatibility with AbstractGraph. Vertex codes get reassigned after `rem_vertex!` to remain contiguous, so we recommend using labels if possible.
9+
`MetaGraph`s inherit many methods from Graphs.jl. In general, inherited methods refer to vertices by codes, not labels, for compatibility with AbstractGraph. Vertex codes get reassigned after `rem_vertex!` to remain contiguous, so we recommend using labels if possible.
1010

1111
## Undirected graphs
1212

13-
```jldoctest lightgraphs
13+
```jldoctest graphs
1414
julia> colors = MetaGraph(Graph(), VertexMeta = String, EdgeMeta = Symbol, gprops = "special");
1515
1616
julia> colors[:red] = "warm";
@@ -56,10 +56,10 @@ false
5656
julia> has_vertex(colors, 1)
5757
true
5858
59-
julia> LightGraphs.SimpleGraphs.fadj(colors, 1) == Int[]
59+
julia> Graphs.SimpleGraphs.fadj(colors, 1) == Int[]
6060
true
6161
62-
julia> LightGraphs.SimpleGraphs.badj(colors, 1) == Int[]
62+
julia> Graphs.SimpleGraphs.badj(colors, 1) == Int[]
6363
true
6464
6565
julia> colors == colors
@@ -76,7 +76,7 @@ julia> SimpleGraph(colors)
7676

7777
You can seemlessly make MetaGraphs based on DiGraphs as well.
7878

79-
```jldoctest lightgraphs
79+
```jldoctest graphs
8080
julia> rock_paper_scissors = MetaGraph(DiGraph(), Label = Symbol, EdgeMeta = Symbol);
8181
8282
julia> rock_paper_scissors[:rock] = nothing; rock_paper_scissors[:paper] = nothing; rock_paper_scissors[:scissors] = nothing;

src/MetaGraphsNext.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module MetaGraphsNext
22

33
using JLD2
4-
using LightGraphs
4+
using Graphs
55

66
import Base:
77
Tuple,
@@ -18,7 +18,7 @@ import Base:
1818
size,
1919
zero
2020

21-
import LightGraphs:
21+
import Graphs:
2222
AbstractGraph,
2323
AbstractGraphFormat,
2424
add_edge!,
@@ -41,7 +41,7 @@ import LightGraphs:
4141
vertices,
4242
weights
4343

44-
import LightGraphs.SimpleGraphs: SimpleGraph, SimpleDiGraph, fadj, badj
44+
import Graphs.SimpleGraphs: SimpleGraph, SimpleDiGraph, fadj, badj
4545

4646
export MetaGraph, weighttype, defaultweight, weightfunction
4747
export MGFormat, DOTFormat
@@ -51,7 +51,7 @@ export label_for, code_for
5151
include("metagraph.jl")
5252
include("metaundigraph.jl")
5353
include("metadigraph.jl")
54-
include("lightgraphs.jl")
54+
include("graphs.jl")
5555
include("weights.jl")
5656
include("dict_utils.jl")
5757
include("overrides.jl")

src/dict_utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ end
9393
"""
9494
code_for(meta::MetaGraph, vertex_label)
9595
96-
Find the code associated with a `vertex_label`. This can be useful to pass to methods inherited from `LightGraphs`. Note, however, that vertex codes could be
96+
Find the code associated with a `vertex_label`. This can be useful to pass to methods inherited from `Graphs`. Note, however, that vertex codes could be
9797
reassigned after vertex deletion.
9898
"""
9999
function code_for(meta::MetaGraph, vertex_label)
@@ -104,7 +104,7 @@ end
104104
"""
105105
label_for(meta::MetaGraph, vertex_code)
106106
107-
Find the label associated with a `vertex_code`. This can be useful to interpret the results of methods inherited from `LightGraphs`. Note, however, that vertex codes could be reassigned after vertex deletion.
107+
Find the label associated with a `vertex_code`. This can be useful to interpret the results of methods inherited from `Graphs`. Note, however, that vertex codes could be reassigned after vertex deletion.
108108
"""
109109
function label_for(meta::MetaGraph, vertex_code)
110110
meta.metaindex[vertex_code]
File renamed without changes.

0 commit comments

Comments
 (0)