Skip to content

Commit

Permalink
CICD Updates for Igraph changes and Ubuntu Tidy patch (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
bburns632 authored Apr 7, 2024
1 parent 9354e79 commit a904eca
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
uses: actions/checkout@v3.1.0
with:
fetch-depth: 1
- name: Install Tidy Ubuntu
if: matrix.os == 'ubuntu-latest'
run: sudo apt install -y tidy
- name: set up R
uses: r-lib/actions/setup-r@v2
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/smoke-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
uses: actions/checkout@v3.1.0
with:
fetch-depth: 1
- name: Install Tidy
run: sudo apt install -y tidy
- name: set up R
shell: bash
run: |
Expand Down
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ License: BSD_3_clause + file LICENSE
URL: https://github.com/uptake/pkgnet, https://uptake.github.io/pkgnet/
BugReports: https://github.com/uptake/pkgnet/issues
RoxygenNote: 7.1.0
Roxygen: list(r6 = FALSE)
6 changes: 3 additions & 3 deletions tests/testthat/test-DependencyReporter-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ test_that('DependencyReporter works end-to-end for typical use', {
expect_true({"DirectedGraph" %in% class(testObj$pkg_graph)})
expect_true({igraph::is_igraph(testObj$pkg_graph$igraph)})
expect_setequal(
object = igraph::get.vertex.attribute(testObj$pkg_graph$igraph)[['name']]
object = igraph::vertex_attr(testObj$pkg_graph$igraph)[['name']]
, expected = testObj$nodes[, node]
)
expect_setequal(
object = igraph::get.edgelist(testObj$pkg_graph$igraph)[,1]
object = igraph::as_edgelist(testObj$pkg_graph$igraph)[,1]
, expected = testObj$edges[, SOURCE]
)
expect_setequal(
object = igraph::get.edgelist(testObj$pkg_graph$igraph)[,2]
object = igraph::as_edgelist(testObj$pkg_graph$igraph)[,2]
, expected = testObj$edges[, TARGET]
)

Expand Down
7 changes: 5 additions & 2 deletions tests/testthat/test-DirectedGraph.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,13 @@ for (thisTest in testList) {
, expected = expectedNodeMeasuresDT[, lapply(.SD, function(x) replace(x, is.na(x), NaN)), .SDcols = c('node', nodeMeas)]
, ignore.col.order = TRUE
, ignore.row.order = TRUE
, info = sprintf("Value testing for %s, %s : %s"
, info = sprintf("Value testing for %s, %s : %s /n obj: %s /n exp %s"
, thisTest[['pkg']]
, thisTest[['reporter']]
, nodeMeas)
, nodeMeas
, reporter$pkg_graph$node_measures(nodeMeas)
, expectedNodeMeasuresDT[, lapply(.SD, function(x) replace(x, is.na(x), NaN)), .SDcols = c('node', nodeMeas)]
)
)
} # /for nodeMeas
}) # /test_that
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-FunctionReporter-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ test_that('FunctionReporter works end-to-end for typical use', {
expect_true({"DirectedGraph" %in% class(testObj$pkg_graph)})
expect_true({igraph::is_igraph(testObj$pkg_graph$igraph)})
expect_setequal(
object = igraph::get.vertex.attribute(testObj$pkg_graph$igraph)[['name']]
object = igraph::vertex_attr(testObj$pkg_graph$igraph)[['name']]
, expected = testObj$nodes[, node]
)
expect_setequal(
object = igraph::get.edgelist(testObj$pkg_graph$igraph)[,1]
object = igraph::as_edgelist(testObj$pkg_graph$igraph)[,1]
, expected = testObj$edges[, SOURCE]
)
expect_setequal(
object = igraph::get.edgelist(testObj$pkg_graph$igraph)[,2]
object = igraph::as_edgelist(testObj$pkg_graph$igraph)[,2]
, expected = testObj$edges[, TARGET]
)

Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-InheritanceReporter-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ test_that('InheritanceReporter Methods Work', {
expect_true({"DirectedGraph" %in% class(testObj$pkg_graph)})
expect_true({igraph::is_igraph(testObj$pkg_graph$igraph)})
expect_setequal(
object = igraph::get.vertex.attribute(testObj$pkg_graph$igraph)[['name']]
object = igraph::vertex_attr(testObj$pkg_graph$igraph)[['name']]
, expected = testObj$nodes[, node]
)
expect_setequal(
object = igraph::get.edgelist(testObj$pkg_graph$igraph)[,1]
object = igraph::as_edgelist(testObj$pkg_graph$igraph)[,1]
, expected = testObj$edges[, SOURCE]
)
expect_setequal(
object = igraph::get.edgelist(testObj$pkg_graph$igraph)[,2]
object = igraph::as_edgelist(testObj$pkg_graph$igraph)[,2]
, expected = testObj$edges[, TARGET]
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
node,type,isExported,outDegree,inDegree,outCloseness,inCloseness,numRecursiveDeps,numRecursiveRevDeps,betweenness,pageRank,hubScore,authorityScore
on_base_pct,function,TRUE,0,0,,,0,0,0,0.120882441825325,0,0
OPS,function,TRUE,2,0,0.75,0.75,3,0,0,0.120882441825325,1,0
slugging_avg,function,TRUE,1,1,1.00,1.0,1,1,0.5,0.172257479601088,1,1
slugging_avg,function,TRUE,1,1,1.00,1.0,1,1,0.5,0.172257479601088,1,0.5
at_bats,function,TRUE,0,2,,,0,3,0,0.413720157147174,0,1
batting_avg,function,TRUE,1,1,1.00,1.0,1,1,0.5,0.172257479601088,1,1
batting_avg,function,TRUE,1,1,1.00,1.0,1,1,0.5,0.172257479601088,1,0.5

0 comments on commit a904eca

Please sign in to comment.