Skip to content

Commit

Permalink
ci: go back to stricter checks (#1012)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviator-app[bot] authored Jan 16, 2024
2 parents 28435ff + 2da3305 commit 4b5be17
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 415 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ jobs:
- name: Check R package
uses: r-lib/actions/check-r-package@v2
with:
error-on: '"error"'
error-on: '"note"'

coverage:
runs-on: ubuntu-20.04
Expand Down
111 changes: 1 addition & 110 deletions R/aaa-auto.R
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ edge_betweenness_subset_impl <- function(graph, eids=E(graph), directed=TRUE, so
on.exit( .Call(R_igraph_finalizer) )
# Function call
res <- .Call(R_igraph_edge_betweenness_subset, graph, eids-1, directed, sources-1, targets-1, weights)
if (igraph_opt("add.vertex.names") && is_named(graph)) {
if (igraph_opt("add.vertex.names") && is_named(graph)) {
names(res) <- vertex_attr(graph, "name", V(graph))
}
res
Expand Down Expand Up @@ -2297,25 +2297,6 @@ largest_cliques_impl <- function(graph) {
res
}

maximal_cliques_subset_impl <- function(graph, subset, outfile=NULL, min.size=0, max.size=0, details=FALSE) {
# Argument checks
ensure_igraph(graph)
subset <- as_igraph_vs(graph, subset)
min.size <- as.numeric(min.size)
max.size <- as.numeric(max.size)

on.exit( .Call(R_igraph_finalizer) )
# Function call
res <- .Call(R_igraph_maximal_cliques_subset, graph, subset-1, outfile, min.size, max.size)
if (igraph_opt("return.vs.es")) {
res$res <- lapply(res$res, unsafe_create_vs, graph = graph, verts = V(graph))
}
if (!details) {
res <- res$res
}
res
}

maximal_cliques_hist_impl <- function(graph, min.size=0, max.size=0) {
# Argument checks
ensure_igraph(graph)
Expand Down Expand Up @@ -2703,26 +2684,6 @@ from_hrg_dendrogram_impl <- function(hrg) {
res
}

get_adjacency_sparse_impl <- function(graph, type=c("both", "upper", "lower"), weights=NULL, loops=ONCE) {
# Argument checks
ensure_igraph(graph)
type <- switch(igraph.match.arg(type), "upper"=0L, "lower"=1L, "both"=2L)
if (is.null(weights) && "weight" %in% edge_attr_names(graph)) {
weights <- E(graph)$weight
}
if (!is.null(weights) && any(!is.na(weights))) {
weights <- as.numeric(weights)
} else {
weights <- NULL
}

on.exit( .Call(R_igraph_finalizer) )
# Function call
res <- .Call(R_igraph_get_adjacency_sparse, graph, type, weights, loops)

res
}

get_stochastic_sparse_impl <- function(graph, column.wise=FALSE, weights=NULL) {
# Argument checks
ensure_igraph(graph)
Expand Down Expand Up @@ -2755,17 +2716,6 @@ to_directed_impl <- function(graph, mode=c("mutual", "arbitrary", "random", "acy
res
}

read_graph_dimacs_flow_impl <- function(instream, directed=TRUE) {
# Argument checks
directed <- as.logical(directed)

on.exit( .Call(R_igraph_finalizer) )
# Function call
res <- .Call(R_igraph_read_graph_dimacs_flow, instream, directed)

res
}

dyad_census_impl <- function(graph) {
# Argument checks
ensure_igraph(graph)
Expand Down Expand Up @@ -3615,30 +3565,6 @@ dim_select_impl <- function(sv) {
res
}

almost_equals_impl <- function(a, b, eps) {
# Argument checks


on.exit( .Call(R_igraph_finalizer) )
# Function call
res <- .Call(R_igraph_almost_equals, a, b, eps)


res
}

cmp_epsilon_impl <- function(a, b, eps) {
# Argument checks


on.exit( .Call(R_igraph_finalizer) )
# Function call
res <- .Call(R_igraph_cmp_epsilon, a, b, eps)


res
}

solve_lsap_impl <- function(c, n) {
# Argument checks
c[] <- as.numeric(c)
Expand Down Expand Up @@ -3938,41 +3864,6 @@ stochastic_imitation_impl <- function(graph, vid, algo, quantities, strategies,
res
}

progress_impl <- function(message, percent) {
# Argument checks
percent <- as.numeric(percent)

on.exit( .Call(R_igraph_finalizer) )
# Function call
res <- .Call(R_igraph_progress, message, percent)


res
}

status_impl <- function(message) {
# Argument checks


on.exit( .Call(R_igraph_finalizer) )
# Function call
res <- .Call(R_igraph_status, message)


res
}

strerror_impl <- function(igraph.errno) {
# Argument checks


on.exit( .Call(R_igraph_finalizer) )
# Function call
res <- .Call(R_igraph_strerror, igraph.errno)


res
}

vertex_path_from_edge_path_impl <- function(graph, start, edge.path, mode=c("out", "in", "all", "total")) {
# Argument checks
Expand Down
1 change: 1 addition & 0 deletions R/structural.properties.R
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,7 @@ all_shortest_paths <- function(graph, from,
#' @param to The target vertex of the shortest paths.
#' @param k The number of paths to find. They will be returned in order of
#' increasing length.
#' @inheritParams rlang::args_dots_empty
#' @inheritParams shortest_paths
#' @return A named list with two components is returned:
#' \item{vpaths}{The list of \eqn{k} shortest paths in terms of vertices}
Expand Down
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

# Use pkg-config or xml2-config to get the include directory for libxml-2.0
xml2_include_dir=""
Expand All @@ -11,7 +11,7 @@ else
exit 1
fi

if [[ -n "$xml2_include_dir" ]]; then
if [ -n "$xml2_include_dir" ]; then
PKG_CFLAGS="-I\"$xml2_include_dir\""
echo "libxml2 include directory: $xml2_include_dir"
else
Expand Down
2 changes: 2 additions & 0 deletions man/k_shortest_paths.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ PKG_CFLAGS=$(C_VISIBILITY)
PKG_CXXFLAGS=$(CXX_VISIBILITY)
PKG_FFLAGS=$(F_VISIBILITY)

PKG_CPPFLAGS=@cflags@ -DUSING_R -I. -Ivendor -Ivendor/cigraph/src -Ivendor/cigraph/include -Ivendor/cigraph/vendor \
PKG_CPPFLAGS=-DUSING_R -I. -Ivendor -Ivendor/cigraph/src -Ivendor/cigraph/include -Ivendor/cigraph/vendor @cflags@ \
-DNDEBUG -DNTIMER -DNPRINT -DINTERNAL_ARPACK -DIGRAPH_THREAD_LOCAL= \
-DPRPACK_IGRAPH_SUPPORT \
-D_GNU_SOURCE=1

PKG_LIBS = -L"${LIB_XML}/lib" -lxml2 -lz -L"${GLPK_HOME}/lib" \
-lglpk -lgmp -L"${LIB_GMP}/lib" $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
PKG_LIBS = -lxml2 -lz -lglpk -lgmp $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

OBJECTS=${SOURCES}
16 changes: 0 additions & 16 deletions src/cpp11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ extern SEXP R_igraph_adjlist(void *, void *, void *);
extern SEXP R_igraph_all_minimal_st_separators(void *);
extern SEXP R_igraph_all_st_cuts(void *, void *, void *);
extern SEXP R_igraph_all_st_mincuts(void *, void *, void *, void *);
extern SEXP R_igraph_almost_equals(void *, void *, void *);
extern SEXP R_igraph_are_connected(void *, void *, void *);
extern SEXP R_igraph_arpack(void *, void *, void *, void *, void *);
extern SEXP R_igraph_arpack_unpack_complex(void *, void *, void *);
Expand Down Expand Up @@ -78,7 +77,6 @@ extern SEXP R_igraph_clique_number(void *);
extern SEXP R_igraph_clique_size_hist(void *, void *, void *);
extern SEXP R_igraph_cliques(void *, void *, void *);
extern SEXP R_igraph_closeness_cutoff(void *, void *, void *, void *, void *, void *);
extern SEXP R_igraph_cmp_epsilon(void *, void *, void *);
extern SEXP R_igraph_cocitation(void *, void *);
extern SEXP R_igraph_cohesion(void *, void *);
extern SEXP R_igraph_cohesive_blocks(void *);
Expand Down Expand Up @@ -175,7 +173,6 @@ extern SEXP R_igraph_full_multipartite(void *, void *, void *);
extern SEXP R_igraph_fundamental_cycles(void *, void *, void *, void *);
extern SEXP R_igraph_generalized_petersen(void *, void *);
extern SEXP R_igraph_get_adjacency(void *, void *, void *, void *);
extern SEXP R_igraph_get_adjacency_sparse(void *, void *, void *, void *);
extern SEXP R_igraph_get_adjedgelist(void *, void *, void *);
extern SEXP R_igraph_get_adjlist(void *, void *, void *, void *);
extern SEXP R_igraph_get_all_eids_between(void *, void *, void *, void *);
Expand Down Expand Up @@ -325,7 +322,6 @@ extern SEXP R_igraph_maximal_cliques(void *, void *, void *, void *);
extern SEXP R_igraph_maximal_cliques_count(void *, void *, void *, void *);
extern SEXP R_igraph_maximal_cliques_file(void *, void *, void *, void *, void *);
extern SEXP R_igraph_maximal_cliques_hist(void *, void *, void *);
extern SEXP R_igraph_maximal_cliques_subset(void *, void *, void *, void *, void *);
extern SEXP R_igraph_maximal_independent_vertex_sets(void *);
extern SEXP R_igraph_maximum_bipartite_matching(void *, void *, void *, void *);
extern SEXP R_igraph_maximum_cardinality_search(void *);
Expand Down Expand Up @@ -357,7 +353,6 @@ extern SEXP R_igraph_personalized_pagerank(void *, void *, void *, void *, void
extern SEXP R_igraph_personalized_pagerank_vs(void *, void *, void *, void *, void *, void *, void *, void *);
extern SEXP R_igraph_power_law_fit(void *, void *, void *);
extern SEXP R_igraph_preference_game(void *, void *, void *, void *, void *, void *, void *);
extern SEXP R_igraph_progress(void *, void *);
extern SEXP R_igraph_pseudo_diameter(void *, void *, void *, void *);
extern SEXP R_igraph_pseudo_diameter_dijkstra(void *, void *, void *, void *, void *);
extern SEXP R_igraph_radius(void *, void *);
Expand All @@ -367,7 +362,6 @@ extern SEXP R_igraph_random_sample(void *, void *, void *);
extern SEXP R_igraph_random_spanning_tree(void *, void *);
extern SEXP R_igraph_random_walk(void *, void *, void *, void *, void *, void *);
extern SEXP R_igraph_read_graph_dimacs(void *, void *);
extern SEXP R_igraph_read_graph_dimacs_flow(void *, void *);
extern SEXP R_igraph_read_graph_dl(void *, void *);
extern SEXP R_igraph_read_graph_edgelist(void *, void *, void *);
extern SEXP R_igraph_read_graph_gml(void *);
Expand Down Expand Up @@ -420,10 +414,8 @@ extern SEXP R_igraph_st_vertex_connectivity(void *, void *, void *);
extern SEXP R_igraph_star(void *, void *, void *);
extern SEXP R_igraph_static_fitness_game(void *, void *, void *, void *, void *);
extern SEXP R_igraph_static_power_law_game(void *, void *, void *, void *, void *, void *, void *);
extern SEXP R_igraph_status(void *);
extern SEXP R_igraph_stochastic_imitation(void *, void *, void *, void *, void *, void *);
extern SEXP R_igraph_strength(void *, void *, void *, void *, void *);
extern SEXP R_igraph_strerror(void *);
extern SEXP R_igraph_subcomponent(void *, void *, void *);
extern SEXP R_igraph_subgraph_from_edges(void *, void *, void *);
extern SEXP R_igraph_subisomorphic(void *, void *);
Expand Down Expand Up @@ -498,7 +490,6 @@ static const R_CallMethodDef CallEntries[] = {
{"R_igraph_all_minimal_st_separators", (DL_FUNC) &R_igraph_all_minimal_st_separators, 1},
{"R_igraph_all_st_cuts", (DL_FUNC) &R_igraph_all_st_cuts, 3},
{"R_igraph_all_st_mincuts", (DL_FUNC) &R_igraph_all_st_mincuts, 4},
{"R_igraph_almost_equals", (DL_FUNC) &R_igraph_almost_equals, 3},
{"R_igraph_are_connected", (DL_FUNC) &R_igraph_are_connected, 3},
{"R_igraph_arpack", (DL_FUNC) &R_igraph_arpack, 5},
{"R_igraph_arpack_unpack_complex", (DL_FUNC) &R_igraph_arpack_unpack_complex, 3},
Expand Down Expand Up @@ -546,7 +537,6 @@ static const R_CallMethodDef CallEntries[] = {
{"R_igraph_clique_size_hist", (DL_FUNC) &R_igraph_clique_size_hist, 3},
{"R_igraph_cliques", (DL_FUNC) &R_igraph_cliques, 3},
{"R_igraph_closeness_cutoff", (DL_FUNC) &R_igraph_closeness_cutoff, 6},
{"R_igraph_cmp_epsilon", (DL_FUNC) &R_igraph_cmp_epsilon, 3},
{"R_igraph_cocitation", (DL_FUNC) &R_igraph_cocitation, 2},
{"R_igraph_cohesion", (DL_FUNC) &R_igraph_cohesion, 2},
{"R_igraph_cohesive_blocks", (DL_FUNC) &R_igraph_cohesive_blocks, 1},
Expand Down Expand Up @@ -643,7 +633,6 @@ static const R_CallMethodDef CallEntries[] = {
{"R_igraph_fundamental_cycles", (DL_FUNC) &R_igraph_fundamental_cycles, 4},
{"R_igraph_generalized_petersen", (DL_FUNC) &R_igraph_generalized_petersen, 2},
{"R_igraph_get_adjacency", (DL_FUNC) &R_igraph_get_adjacency, 4},
{"R_igraph_get_adjacency_sparse", (DL_FUNC) &R_igraph_get_adjacency_sparse, 4},
{"R_igraph_get_adjedgelist", (DL_FUNC) &R_igraph_get_adjedgelist, 3},
{"R_igraph_get_adjlist", (DL_FUNC) &R_igraph_get_adjlist, 4},
{"R_igraph_get_all_eids_between", (DL_FUNC) &R_igraph_get_all_eids_between, 4},
Expand Down Expand Up @@ -793,7 +782,6 @@ static const R_CallMethodDef CallEntries[] = {
{"R_igraph_maximal_cliques_count", (DL_FUNC) &R_igraph_maximal_cliques_count, 4},
{"R_igraph_maximal_cliques_file", (DL_FUNC) &R_igraph_maximal_cliques_file, 5},
{"R_igraph_maximal_cliques_hist", (DL_FUNC) &R_igraph_maximal_cliques_hist, 3},
{"R_igraph_maximal_cliques_subset", (DL_FUNC) &R_igraph_maximal_cliques_subset, 5},
{"R_igraph_maximal_independent_vertex_sets", (DL_FUNC) &R_igraph_maximal_independent_vertex_sets, 1},
{"R_igraph_maximum_bipartite_matching", (DL_FUNC) &R_igraph_maximum_bipartite_matching, 4},
{"R_igraph_maximum_cardinality_search", (DL_FUNC) &R_igraph_maximum_cardinality_search, 1},
Expand Down Expand Up @@ -825,7 +813,6 @@ static const R_CallMethodDef CallEntries[] = {
{"R_igraph_personalized_pagerank_vs", (DL_FUNC) &R_igraph_personalized_pagerank_vs, 8},
{"R_igraph_power_law_fit", (DL_FUNC) &R_igraph_power_law_fit, 3},
{"R_igraph_preference_game", (DL_FUNC) &R_igraph_preference_game, 7},
{"R_igraph_progress", (DL_FUNC) &R_igraph_progress, 2},
{"R_igraph_pseudo_diameter", (DL_FUNC) &R_igraph_pseudo_diameter, 4},
{"R_igraph_pseudo_diameter_dijkstra", (DL_FUNC) &R_igraph_pseudo_diameter_dijkstra, 5},
{"R_igraph_radius", (DL_FUNC) &R_igraph_radius, 2},
Expand All @@ -835,7 +822,6 @@ static const R_CallMethodDef CallEntries[] = {
{"R_igraph_random_spanning_tree", (DL_FUNC) &R_igraph_random_spanning_tree, 2},
{"R_igraph_random_walk", (DL_FUNC) &R_igraph_random_walk, 6},
{"R_igraph_read_graph_dimacs", (DL_FUNC) &R_igraph_read_graph_dimacs, 2},
{"R_igraph_read_graph_dimacs_flow", (DL_FUNC) &R_igraph_read_graph_dimacs_flow, 2},
{"R_igraph_read_graph_dl", (DL_FUNC) &R_igraph_read_graph_dl, 2},
{"R_igraph_read_graph_edgelist", (DL_FUNC) &R_igraph_read_graph_edgelist, 3},
{"R_igraph_read_graph_gml", (DL_FUNC) &R_igraph_read_graph_gml, 1},
Expand Down Expand Up @@ -888,10 +874,8 @@ static const R_CallMethodDef CallEntries[] = {
{"R_igraph_star", (DL_FUNC) &R_igraph_star, 3},
{"R_igraph_static_fitness_game", (DL_FUNC) &R_igraph_static_fitness_game, 5},
{"R_igraph_static_power_law_game", (DL_FUNC) &R_igraph_static_power_law_game, 7},
{"R_igraph_status", (DL_FUNC) &R_igraph_status, 1},
{"R_igraph_stochastic_imitation", (DL_FUNC) &R_igraph_stochastic_imitation, 6},
{"R_igraph_strength", (DL_FUNC) &R_igraph_strength, 5},
{"R_igraph_strerror", (DL_FUNC) &R_igraph_strerror, 1},
{"R_igraph_subcomponent", (DL_FUNC) &R_igraph_subcomponent, 3},
{"R_igraph_subgraph_from_edges", (DL_FUNC) &R_igraph_subgraph_from_edges, 3},
{"R_igraph_subisomorphic", (DL_FUNC) &R_igraph_subisomorphic, 2},
Expand Down
Loading

0 comments on commit 4b5be17

Please sign in to comment.