Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Juice-jl/DAGs.jl into main
Browse files Browse the repository at this point in the history
  • Loading branch information
khosravipasha committed Nov 16, 2021
2 parents cef1c37 + 9541bf9 commit 74c7460
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ name: Deploy Docs
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
workflow_dispatch:

push:

workflow_dispatch:

pull_request:
branches:
master
main


env:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DAGs.jl

[![Unit Tests](https://github.com/Juice-jl/DAGs.jl/workflows/Unit%20Tests/badge.svg)](https://github.com/Juice-jl/DAGs.jl/actions?query=workflow%3A%22Unit+Tests%22+branch%3Amain) [![codecov](https://codecov.io/gh/Juice-jl/DAGs.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/Juice-jl/DAGs.jl)
[![Unit Tests](https://github.com/Juice-jl/DAGs.jl/workflows/Unit%20Tests/badge.svg)](https://github.com/Juice-jl/DAGs.jl/actions?query=workflow%3A%22Unit+Tests%22+branch%3Amain) [![codecov](https://codecov.io/gh/Juice-jl/DAGs.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/Juice-jl/DAGs.jl) [![](https://img.shields.io/badge/docs-dev-blue.svg)](https://juice-jl.github.io/DAGs.jl/dev/)

Infrastructure to work with Directed Acyclic Graphs in Julia
6 changes: 3 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pages = [

format = Documenter.HTML(
prettyurls = !("local" in ARGS),
canonical = "https://github.com/Juice-jl/DAGs.jl/stable/",
canonical = "https://juice-jl.github.io/DAGs.jl/stable/",
assets = ["assets/favicon.ico"],
analytics = "UA-136089579-2",
highlights = ["yaml"],
Expand All @@ -41,7 +41,7 @@ deploydocs(
target = "build",
repo = "github.com/Juice-jl/DAGs.jl.git",
branch = "gh-pages",
devbranch = "master",
devbranch = "main",
devurl = "dev",
versions = ["stable" => "v^", "v#.#"],
)
)
4 changes: 3 additions & 1 deletion src/graphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ function num_parents(root::DAG)
count[root] = 0
foreach(root) do n
if isinner(n)
count[n] = get(count,n,0) + 1
for c in children(n)
count[c] = get(count, c, 0) + 1
end
end
end
count
Expand Down
4 changes: 4 additions & 0 deletions test/graphs_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ module TestNodes
@test left_most_descendent(r) == l1
@test right_most_descendent(r) == l2

np = num_parents(r)
@test np[r] == 0
@test np[l1] == 2
@test np[j1] == 1
end

end

0 comments on commit 74c7460

Please sign in to comment.