Skip to content
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

Move datapack from Depends to Suggests in data.land #3373

Merged
merged 6 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/depends/pecan_package_dependencies.csv
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"data.table","*","models/biocro","Imports",FALSE
"data.table","*","modules/data.remote","Suggests",FALSE
"dataone","*","modules/data.land","Suggests",FALSE
"datapack","*","modules/data.land","Imports",FALSE
"datapack","*","modules/data.land","Suggests",FALSE
"DBI","*","base/db","Imports",FALSE
"DBI","*","modules/data.remote","Imports",FALSE
"dbplyr",">= 2.4.0","base/db","Imports",FALSE
Expand Down
2 changes: 1 addition & 1 deletion modules/data.land/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Depends: R (>= 3.5.0)
Imports:
coda,
curl,
datapack,
dplyr,
dplR,
fs,
Expand Down Expand Up @@ -59,6 +58,7 @@ Imports:
XML (>= 3.98-1.4)
Suggests:
dataone,
datapack,
getPass,
glue,
PEcAn.settings,
Expand Down
2 changes: 1 addition & 1 deletion modules/data.land/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PEcAn.data.land 1.8.0.9000


- Dependency `datapack` is now optional. It is only used by `dataone_download()` (#3373).

# PEcAn.data.land 1.8.0

Expand Down
7 changes: 7 additions & 0 deletions modules/data.land/R/dataone_download.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ dataone_download = function(id, filepath = "/fs/data1/pecan.data/dbfiles", CNode
if (inherits(test, "try-error")) {
PEcAn.logger::logger.severe("wget system utility is not available on this system. Please install it to use this functionality.")
}
if (!requireNamespace("dataone", quietly = TRUE)
|| !requireNamespace("datapack", quietly = TRUE)) {
PEcAn.logger::logger.severe(
"Could not find one or more of packages `dataone` and `datapack`,",
"which are needed by `dataone_download()`.",
"Please install them to use this functionality.")
}

### automatically retrieve mnId
cn <- dataone::CNode(CNode)
Expand Down
2 changes: 1 addition & 1 deletion modules/data.land/tests/Rcheck_reference.log
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... NOTE
Imports includes 34 non-default packages.
Imports includes 33 non-default packages.
Importing from so many packages makes the package vulnerable to any of
them becoming unavailable. Move as many as possible to Suggests and
use conditionally.
Expand Down
Loading