-
Notifications
You must be signed in to change notification settings - Fork 18
fix: improve netzschleuder internals #40
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some unsollicited feedback 😸
@@ -129,10 +133,10 @@ ns_metadata <- function(name, collection = FALSE) { | |||
"i" = "see {.url {collection_url}}" | |||
) | |||
) | |||
} else if (net_ident[[1]] == net_ident[[2]]) { | |||
} else if (net_ident[["collection"]] == net_ident[["network"]]) { | |||
return(raw) | |||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't some of the else if
in this file be removed to instead just have if's?
if bla
return thing
if blop
return thing
@@ -163,14 +167,15 @@ ns_df <- function(name, token = NULL, size_limit = 1) { | |||
} | |||
meta <- name | |||
net_ident <- c(meta[["collection_name"]], meta[["nets"]]) | |||
names(net_ident) <- c("collection", "network") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could the names be added in the previous call?
net_ident <- c(
collection = meta[["collection_name"]],
network = meta[["nets"]]
)
|
||
on.exit(close(con_edge)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to take a dependency on withr and use withr::local_connection()
? Or to define a helper since we'd call it at least four times?
Thank you! I will have a look at this soonish (I actually forgot about this PR...) |
Co-authored-by: Maëlle Salmon <[email protected]>
fix #38