Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ixpantia/orbweaver-r
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.14.0
Choose a base ref
...
head repository: ixpantia/orbweaver-r
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 18 commits
  • 34 files changed
  • 4 contributors

Commits on Oct 17, 2024

  1. Verified

    This commit was signed with the committer’s verified signature.
    andyquinterom Andrés Felipe Quintero Moreano
    Copy the full SHA
    3611c8a View commit details
  2. feat: Adds find_path_one_to_many

    andyquinterom committed Oct 17, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    andyquinterom Andrés Felipe Quintero Moreano
    Copy the full SHA
    54cc929 View commit details
  3. Merge pull request #29 from andyquinterom/T28

    T28
    pierina-ixpantia authored Oct 17, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b0ba571 View commit details
  4. chore: Cran checks updated for msrv

    andyquinterom committed Oct 17, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    andyquinterom Andrés Felipe Quintero Moreano
    Copy the full SHA
    c80ffa6 View commit details
  5. chore: Bumps version to 0.15 for cran

    andyquinterom committed Oct 17, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    andyquinterom Andrés Felipe Quintero Moreano
    Copy the full SHA
    9089d41 View commit details
  6. Merge pull request #30 from andyquinterom/T28

    Version 0.15
    pierina-ixpantia authored Oct 17, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c1a6660 View commit details

Commits on Oct 27, 2024

  1. Copy the full SHA
    ce31851 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    andyquinterom Andrés Felipe Quintero Moreano
    Copy the full SHA
    f3448d0 View commit details
  3. chore: Add methods to DESCRIPTION

    andyquinterom committed Oct 27, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    andyquinterom Andrés Felipe Quintero Moreano
    Copy the full SHA
    13295d7 View commit details
  4. Merge pull request #31 from andyquinterom/prepare_for_cran

    Prepare for cran
    andyquinterom authored Oct 27, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    926ea9b View commit details

Commits on Jan 9, 2025

  1. Add the suffix "-r" in the repo specs

    mauro-ixpantia authored and andyquinterom committed Jan 9, 2025
    Copy the full SHA
    4f24d0d View commit details

Commits on Jan 21, 2025

  1. Verified

    This commit was signed with the committer’s verified signature.
    andyquinterom Andrés Felipe Quintero Moreano
    Copy the full SHA
    6165874 View commit details
  2. chore: Bumps version to 0.17.1

    andyquinterom committed Jan 21, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    andyquinterom Andrés Felipe Quintero Moreano
    Copy the full SHA
    3d96ebb View commit details
  3. chore: Adds check task

    andyquinterom committed Jan 21, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    andyquinterom Andrés Felipe Quintero Moreano
    Copy the full SHA
    8981748 View commit details
  4. Merge pull request #37 from andyquinterom/T35

    feat: Adds subsets by multiple nodes
    cristhian-ixpantia authored Jan 21, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    3c8f8c4 View commit details

Commits on Jan 27, 2025

  1. feat: Adds subset with limit

    andyquinterom committed Jan 27, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    andyquinterom Andrés Felipe Quintero Moreano
    Copy the full SHA
    f542111 View commit details
  2. chore: Updates to orbweaver 0.18 release

    andyquinterom committed Jan 27, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    andyquinterom Andrés Felipe Quintero Moreano
    Copy the full SHA
    545b714 View commit details
  3. Merge pull request #39 from andyquinterom/T38

    feat: Adds subset with limit
    cristhian-ixpantia authored Jan 27, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    77dfd82 View commit details
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: orbweaver
Title: Fast and Efficient Graph Data Structures
Version: 0.14.0
Version: 0.18.0
Authors@R:
c(person(given = "ixpantia, SRL",
role = "cph",
@@ -23,14 +23,15 @@ BugReports: https://github.com/ixpantia/orbweaver-r/issues
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Config/rextendr/version: 0.3.1.9000
SystemRequirements: Cargo (Rust's package manager) >= 1.70, rustc >= 1.70
Depends:
R (>= 4.2.0)
Imports:
glue,
rlang
rlang,
methods
Suggests:
testthat (>= 3.0.0),
tibble
230 changes: 3 additions & 227 deletions LICENSE.note
Original file line number Diff line number Diff line change
@@ -15,231 +15,7 @@ the licenses are the same as listed here.

===============================

Name: adler
Files: vendor/adler/*
Authors: Jonas Schievink
License: 0BSD OR MIT OR Apache-2.0

------------------------------

Name: ahash
Files: vendor/ahash/*
Authors: Tom Kaitchuck
License: MIT OR Apache-2.0

------------------------------

Name: byteorder
Files: vendor/byteorder/*
Authors: Andrew Gallant
License: Unlicense OR MIT

------------------------------

Name: cfg-if
Files: vendor/cfg-if/*
Authors: Alex Crichton
License: MIT/Apache-2.0

------------------------------

Name: crc32fast
Files: vendor/crc32fast/*
Authors: Sam Rijs, Alex Crichton
License: MIT OR Apache-2.0

------------------------------

Name: crossbeam-deque
Files: vendor/crossbeam-deque/*
Authors:
License: MIT OR Apache-2.0

------------------------------

Name: crossbeam-epoch
Files: vendor/crossbeam-epoch/*
Name:
Files: vendor//*
Authors:
License: MIT OR Apache-2.0

------------------------------

Name: crossbeam-utils
Files: vendor/crossbeam-utils/*
Authors:
License: MIT OR Apache-2.0

------------------------------

Name: either
Files: vendor/either/*
Authors: bluss
License: MIT OR Apache-2.0

------------------------------

Name: extendr-api
Files: vendor/extendr-api/*
Authors: andy-thomason, Thomas Down, Mossa Merhi Reimert, Claus O. Wilke, Hiroaki Yutani, Ilia A. Kosenkov, Michael Milton
License: MIT

------------------------------

Name: extendr-macros
Files: vendor/extendr-macros/*
Authors: andy-thomason, Thomas Down, Mossa Merhi Reimert, Claus O. Wilke, Hiroaki Yutani, Ilia A. Kosenkov
License: MIT

------------------------------

Name: flate2
Files: vendor/flate2/*
Authors: Alex Crichton, Josh Triplett
License: MIT OR Apache-2.0

------------------------------

Name: fxhash
Files: vendor/fxhash/*
Authors: cbreeden
License: Apache-2.0/MIT

------------------------------

Name: half
Files: vendor/half/*
Authors: Kathryn Long
License: MIT OR Apache-2.0

------------------------------

Name: hashbrown
Files: vendor/hashbrown/*
Authors: Amanieu d'Antras
License: MIT OR Apache-2.0

------------------------------

Name: libR-sys
Files: vendor/libR-sys/*
Authors: andy-thomason, Thomas Down, Mossa Merhi Reimert, Claus O. Wilke, Ilia A. Kosenkov, Hiroaki Yutani
License: MIT

------------------------------

Name: miniz_oxide
Files: vendor/miniz_oxide/*
Authors: Frommi, oyvindln
License: MIT OR Zlib OR Apache-2.0

------------------------------

Name: once_cell
Files: vendor/once_cell/*
Authors: Aleksey Kladov
License: MIT OR Apache-2.0

------------------------------

Name: orbweaver
Files: vendor/orbweaver/*
Authors: ixpantia, Andrés F. Quintero
License: MIT

------------------------------

Name: paste
Files: vendor/paste/*
Authors: David Tolnay
License: MIT OR Apache-2.0

------------------------------

Name: proc-macro2
Files: vendor/proc-macro2/*
Authors: David Tolnay, Alex Crichton
License: MIT OR Apache-2.0

------------------------------

Name: quote
Files: vendor/quote/*
Authors: David Tolnay
License: MIT OR Apache-2.0

------------------------------

Name: rayon-core
Files: vendor/rayon-core/*
Authors: Niko Matsakis, Josh Stone
License: MIT OR Apache-2.0

------------------------------

Name: rayon
Files: vendor/rayon/*
Authors: Niko Matsakis, Josh Stone
License: MIT OR Apache-2.0

------------------------------

Name: serde_cbor
Files: vendor/serde_cbor/*
Authors: Pyfisch, Steven Fackler
License: MIT/Apache-2.0

------------------------------

Name: serde_derive
Files: vendor/serde_derive/*
Authors: Erick Tryzelaar, David Tolnay
License: MIT OR Apache-2.0

------------------------------

Name: serde
Files: vendor/serde/*
Authors: Erick Tryzelaar, David Tolnay
License: MIT OR Apache-2.0

------------------------------

Name: string-interner
Files: vendor/string-interner/*
Authors: Robbepop
License: MIT/Apache-2.0

------------------------------

Name: syn
Files: vendor/syn/*
Authors: David Tolnay
License: MIT OR Apache-2.0

------------------------------

Name: unicode-ident
Files: vendor/unicode-ident/*
Authors: David Tolnay
License: (MIT OR Apache-2.0) AND Unicode-DFS-2016

------------------------------

Name: version_check
Files: vendor/version_check/*
Authors: Sergio Benitez
License: MIT/Apache-2.0

------------------------------

Name: zerocopy-derive
Files: vendor/zerocopy-derive/*
Authors: Joshua Liebow-Feeser
License: BSD-2-Clause OR Apache-2.0 OR MIT

------------------------------

Name: zerocopy
Files: vendor/zerocopy/*
Authors: Joshua Liebow-Feeser
License: BSD-2-Clause OR Apache-2.0 OR MIT
License:
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -4,13 +4,13 @@ vendor:
$(MAKE) -C src/rust vendor

document:
Rscript -e "rextendr::document()"
NOT_CRAN="true" Rscript -e "rextendr::document()"

install: document
Rscript -e "devtools::install()"
NOT_CRAN="true" Rscript -e "devtools::install()"

test:
Rscript -e "devtools::test()"
NOT_CRAN="true" Rscript -e "devtools::test()"

covr:
Rscript -e "covr::report()"
NOT_CRAN="true" Rscript -e "covr::report()"
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -15,6 +15,8 @@ S3method(find_all_paths,DirectedAcyclicGraph)
S3method(find_all_paths,DirectedGraph)
S3method(find_path,DirectedAcyclicGraph)
S3method(find_path,DirectedGraph)
S3method(find_path_one_to_many,DirectedAcyclicGraph)
S3method(find_path_one_to_many,DirectedGraph)
S3method(get_all_leaves,DirectedAcyclicGraph)
S3method(get_all_leaves,DirectedGraph)
S3method(get_all_roots,DirectedAcyclicGraph)
@@ -47,6 +49,7 @@ export(build_directed)
export(children)
export(find_all_paths)
export(find_path)
export(find_path_one_to_many)
export(get_all_leaves)
export(get_all_roots)
export(get_leaves_under)
24 changes: 14 additions & 10 deletions R/bin.R
Original file line number Diff line number Diff line change
@@ -5,9 +5,9 @@
#' @export
graph_to_bin <- function(graph, path) {
if (missing(path)) {
return(graph$to_bin_mem())
return(throw_if_error(graph$to_bin_mem()))
}
graph$to_bin_disk(path)
throw_if_error(graph$to_bin_disk(path))
}

#' @title Read the graph from a binary blob
@@ -22,19 +22,23 @@ graph_from_bin <- function(path, bin, type = c("directed", "dag")) {
}
if (!missing(bin)) {
return(
switch(
type[1],
"directed" = DirectedGraph$from_bin_mem(bin),
"dag" = DirectedAcyclicGraph$from_bin_mem(bin)
throw_if_error(
switch(
type[1],
"directed" = DirectedGraph$from_bin_mem(bin),
"dag" = DirectedAcyclicGraph$from_bin_mem(bin)
)
)
)
}
if (missing(path)) {
rlang::abort("Must provide `path` or `bin` arguments")
}
switch(
type[1],
"directed" = DirectedGraph$from_bin_disk(path),
"dag" = DirectedAcyclicGraph$from_bin_disk(path)
throw_if_error(
switch(
type[1],
"directed" = DirectedGraph$from_bin_disk(path),
"dag" = DirectedAcyclicGraph$from_bin_disk(path)
)
)
}
12 changes: 7 additions & 5 deletions R/builder.R
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ graph_builder <- function(type = "directed") {
#' @return The updated graph builder object
#' @export
add_edge <- function(graph_builder, from, to) {
graph_builder$add_edge(from, to)
throw_if_error(graph_builder$add_edge(from, to))
return(graph_builder)
}

@@ -33,7 +33,7 @@ add_edge <- function(graph_builder, from, to) {
#' @return The updated graph builder object
#' @export
add_path <- function(graph_builder, path) {
graph_builder$add_path(path)
throw_if_error(graph_builder$add_path(path))
return(graph_builder)
}

@@ -50,7 +50,7 @@ add_path <- function(graph_builder, path) {
#' @return A DirectedGraph Object
#' @export
build_directed <- function(graph_builder) {
graph_builder$build_directed()
throw_if_error(graph_builder$build_directed())
}

#' @title Build a DirectedAcyclicGraph from a builder
@@ -64,7 +64,7 @@ build_directed <- function(graph_builder) {
#' @return A DirectedAcyclicGraph Object
#' @export
build_acyclic <- function(graph_builder) {
graph_builder$build_acyclic()
throw_if_error(graph_builder$build_acyclic())
}

#' @title Populates the edges of a graph from a `tibble`
@@ -88,6 +88,8 @@ populate_edges <- function(graph_builder, edges_df, parent_col, child_col) {
rlang::abort(glue::glue("Column {child_col} is not of class `character`"))
}

rs_populate_edges_builder(graph_builder, parent_iter, child_iter)
throw_if_error(
rs_populate_edges_builder(graph_builder, parent_iter, child_iter)
)
return(graph_builder)
}
4 changes: 2 additions & 2 deletions R/children.R
Original file line number Diff line number Diff line change
@@ -13,10 +13,10 @@ children <- function(graph, nodes) {

#' @export
children.DirectedGraph <- function(graph, nodes) {
graph$children(nodes)
throw_if_error(graph$children(nodes))
}

#' @export
children.DirectedAcyclicGraph <- function(graph, nodes) {
graph$children(nodes)
throw_if_error(graph$children(nodes))
}
Loading