Skip to content

base tests and docs also on Graph.jl #45

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

Merged
merged 2 commits into from
Oct 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,14 @@ jobs:
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using NetworkLayout
DocMeta.setdocmeta!(NetworkLayout, :DocTestSetup, :(using NetworkLayout); recursive=true)
doctest(NetworkLayout)'
- run: julia --project=docs docs/make.jl
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
- run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using GraphMakie
DocMeta.setdocmeta!(GraphMakie, :DocTestSetup, :(using GraphMakie); recursive=true)
doctest(GraphMakie)'
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ julia = "1"
[extras]
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
GeometryTypes = "4d00f742-c7ba-57c2-abde-4428a4b178cb"
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["LightGraphs", "Test", "DelimitedFiles", "GeometryTypes"]
test = ["Graphs", "Test", "DelimitedFiles", "GeometryTypes"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ positions` where the positions are represented by the `Point` datatype from

``` julia
using NetworkLayout
using LightGraphs
using Graphs

adj_matrix = adjacency_matrix(wheel_graph(10))

Expand All @@ -32,4 +32,4 @@ There is also a "delayed" functor version of each algorithm:
layout = Spring(; iterations=20)
pos = layout(adj_matrix)
```
Instead of passing a adjacency matrix on can also pass `LightGraphs.jl` graphs directly.
Instead of passing a adjacency matrix on can also pass `Graphs.jl` graphs directly.
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
GraphMakie = "1ecd5474-83a3-4783-bb4f-06765db800d2"
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
NetworkLayout = "46757867-2c16-5918-afeb-47bfcb05e46a"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Documenter
using NetworkLayout
using LightGraphs
using Graphs
using GraphMakie
using CairoMakie

Expand Down
4 changes: 2 additions & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CairoMakie.activate!(type="png") # hide
set_theme!(resolution=(800, 400)) #hide
CairoMakie.inline!(true) # hide
using NetworkLayout
using GraphMakie, LightGraphs
using GraphMakie, Graphs
nothing #hide
```

Expand All @@ -32,7 +32,7 @@ Each of the layouts comes with a lowercase function version:
positions = layoutalgorithm(adj_matrix; p1="foo", b2=:bar)
```

Instead of using the adjacency matrix you can use `AbstractGraph` types from [`LightGraphs.jl`](https://github.com/JuliaGraphs/LightGraphs.jl) directly.
Instead of using the adjacency matrix you can use `AbstractGraph` types from [`Graphs.jl`](https://github.com/JuliaGraphs/Graphs.jl) directly.
```
g = complete_graph(10)
positions = layoutalgorithm(g)
Expand Down
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using NetworkLayout
using LightGraphs
using Graphs
using GeometryBasics
using DelimitedFiles: readdlm
using SparseArrays: sparse
Expand Down Expand Up @@ -295,8 +295,8 @@ jagmesh_adj = jagmesh()
end
end

@testset "test LightGraphs glue code" begin
println("Test LightGraphs glue code")
@testset "test Graphs glue code" begin
println("Test Graphs glue code")
g = complete_graph(10)
pos = Spring()(g)
@test pos isa Vector{Point{2,Float64}}
Expand Down