From 3e2ffdd2bc6e0bd3f3da4e37cec894aa4ac9b915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKristen?= Date: Thu, 27 Aug 2020 16:54:02 -0700 Subject: [PATCH 01/15] Adjustments for package website --- DESCRIPTION | 3 ++- R/eml.R | 8 ++++---- R/helpers.R | 12 ++++++------ README.md | 8 ++------ index.md | 9 +++------ 5 files changed, 17 insertions(+), 23 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 70bc003..d1b7853 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -10,7 +10,8 @@ Authors@R: c( person("Emily", "O'Dean", email = "eodean10@gmail.com", role = "ctb"), person("Robyn", "Thiessen-Bock", email = "robyn.thiessenbock@gmail.com", role = "ctb"), person("Derek", "Strong", email = "dstrong@nceas.ucsb.edu", role = "ctb"), - person("Rachel", "Sun", email = "rachelsun@ucsb.edu", role = "ctb") + person("Rachel", "Sun", email = "rachelsun@ucsb.edu", role = "ctb"), + person("Jasmine", "Lai", email = "jasminelai@nceas.ucsb.edu", role = "ctb") ) Description: A set of utilities for working with the Arctic Data Center (https://arcticdata.io). diff --git a/R/eml.R b/R/eml.R index b081074..4147668 100644 --- a/R/eml.R +++ b/R/eml.R @@ -1,6 +1,6 @@ # Helper functions for creating EML metadata -#' Create EML entity with physical section from a DataONE PID +#' Create EML entity with physical section from any DataONE PID #' #' @param mn (MNode) Member Node where the PID is associated with an object. #' @param pid (character) The PID of the object to create the sub-tree for. @@ -74,7 +74,7 @@ pid_to_eml_entity <- function(mn, #' Create an EML physical object from system metadata #' -#' This function creates a pre-canned EML physical object from what's in the +#' This function creates an EML physical object based on what's in the #' System Metadata of an object. Note that it sets an Online Distribution URL #' of the DataONE v2 resolve service for the PID. #' @@ -276,7 +276,7 @@ eml_party <- function(type="associatedParty", } -#' Create an EML creator +#' Create an EML creator. #' #' See [eml_party()] for details. #' @@ -298,7 +298,7 @@ eml_creator <- function(...) { } -#' Create an EML contact +#' Create an EML contact. Contact information is passed on to [eml_party()] #' #' See [eml_party()] for details. #' diff --git a/R/helpers.R b/R/helpers.R index a9d110e..a35b8b4 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -64,7 +64,7 @@ create_dummy_metadata <- function(mn, data_pids = NULL) { #' Create a test object #' -#' Create a test data object. +#' Create a test data object. Make sure the member node you use is not a production node. #' #' @param mn (MNode) The Member Node. #' @@ -121,7 +121,7 @@ create_dummy_object <- function(mn) { #' Create a test package #' -#' Create a test data package. +#' Create a full test data package with data objects and 1 metadata object. Size = the number of data objects you want in the dummy package + 1 metadata object. #' #' @param mn (MNode) The Member Node. #' @param size (numeric) The number of files in the package, including the metadata file. @@ -195,7 +195,7 @@ create_dummy_package <- function(mn, size = 2) { #' Create a test parent package #' -#' Create a test parent data package. +#' Create a test parent data package. Make sure the node is not a production node. #' #' @param mn (MNode) The Member Node. #' @param children (character) Child package (resource maps) PIDs. @@ -324,7 +324,7 @@ create_dummy_enumeratedDomain_dataframe <- function(factors) { #' Create dummy package with fuller metadata #' -#' Creates a fuller package than [create_dummy_package()] +#' Creates a more complete package than [create_dummy_package()] #' but is otherwise based on the same concept. This dummy #' package includes multiple data objects, responsible parties, #' geographic locations, method steps, etc. @@ -579,7 +579,7 @@ list_submissions <- function(mn, from = Sys.Date(), to = Sys.Date(), formatType #' Read a shapefile from a pid #' -#' Read a shapefile from a pid that points to the zipped directory of the shapefile and associated files +#' Read a shapefile 'sf' from a pid that points to the zipped directory of the shapefile and associated files #' on a given member node. #' #' @param mn (MNode) A DataOne Member Node @@ -626,7 +626,7 @@ read_zip_shapefile <- function(mn, pid){ #' Recovers failed submissions #' -#' Recovers failed submissions and write the new, valid EML to a given path +#' Recovers failed submissions and writes the new, valid EML to a given path #' #' @param node (MNode) The Member Node to publish the object to. #' @param pid The PID of the EML metadata document to be recovered. diff --git a/README.md b/README.md index b5e15a8..545a29b 100644 --- a/README.md +++ b/README.md @@ -11,16 +11,12 @@ Note: The package is intended to be used by NCEAS staff and may not make much se ## Installing -We recommend installing from the latest [release](https://github.com/NCEAS/arcticdatautils/releases) (aka tag) instead of from `master`. Install the latest release with the [`remotes`](https://github.com/r-lib/remotes) package: +To install the latest version of this package we recommend installing from Github: ```r -remotes::install_github("nceas/arcticdatautils@*release") -``` - -If you're feeling adventurous, you can install from the bleeding edge: -```r remotes::install_github("nceas/arcticdatautils") + ``` ## Contributing diff --git a/index.md b/index.md index f6f90e1..b6a2bf2 100644 --- a/index.md +++ b/index.md @@ -11,14 +11,11 @@ Note: The package is intended to be used by NCEAS staff and may not make much se ## Installing -We recommend installing from the latest [release](https://github.com/NCEAS/arcticdatautils/releases) (aka tag) instead of from `master`. Install the latest release with the [`remotes`](https://github.com/r-lib/remotes) package: -```r -remotes::install_github("nceas/arcticdatautils@*release") -``` - -If you're feeling adventurous, you can install from the bleeding edge: +To install the latest version of this package we recommend installing from Github: ```r + remotes::install_github("nceas/arcticdatautils") + ``` From 1241c17d477a983e6745c9aec267573f464ef86a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKristen?= Date: Fri, 28 Aug 2020 13:27:23 -0700 Subject: [PATCH 02/15] Made adjustments to .yml doc to create function subsections in the references tab --- _pkgdown.yml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/_pkgdown.yml b/_pkgdown.yml index 3b06c25..99dd765 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -2,3 +2,50 @@ navbar: right: - icon: fa-github href: https://github.com/NCEAS/arcticdatautils +reference: + + +- title: Access functions + subtitle: Functions to change who can access the package + contents: + - starts_with("add_") + +- title: Functions to edit sysmeta + subtitle: Functions to access or edit the sysmeta of the package + contents: + - 'replace_subject' + - 'clear_replication_policy' + - 'get_all_sysmeta' + - 'translate' + +- title: Editing Functions + subtitle: Functions to edit a package + contents: + - 'publish_object' + - 'update_object' + - 'publish_update' + - 'create_resource_map' + - 'update_resource_map ' + - 'set_file_name' + - 'reformat_file_name' + +- title: Helper Functions + subtitle: Functions to help test a package + contents: + - starts_with("create_") + - 'get_orcid_name' + - 'get_orcid_email' + +- title: EML Functions + subtitle: Functions for creating EML metadata + contents: + - starts_with("pid_") + - starts_with("eml_") + - 'sysmeta_to_eml_physical' + - 'get_orcid_email' + - 'set_abstract' + - 'which_in_eml' + - 'reorder_pids' + + + From 2fa760db7263d7faff0bb532d4de4772b2f67918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKristen?= Date: Fri, 28 Aug 2020 14:40:40 -0700 Subject: [PATCH 03/15] More adjustments to pkgdown .yml doc --- _pkgdown.yml | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index 99dd765..867a20d 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -6,12 +6,12 @@ reference: - title: Access functions - subtitle: Functions to change who can access the package + desc: Functions to change who can access the package contents: - starts_with("add_") - title: Functions to edit sysmeta - subtitle: Functions to access or edit the sysmeta of the package + desc: Functions to access or edit the sysmeta of the package contents: - 'replace_subject' - 'clear_replication_policy' @@ -19,7 +19,7 @@ reference: - 'translate' - title: Editing Functions - subtitle: Functions to edit a package + desc: Functions to edit a package contents: - 'publish_object' - 'update_object' @@ -30,14 +30,14 @@ reference: - 'reformat_file_name' - title: Helper Functions - subtitle: Functions to help test a package + desc: Functions to help test a package contents: - starts_with("create_") - 'get_orcid_name' - 'get_orcid_email' - title: EML Functions - subtitle: Functions for creating EML metadata + desc: Functions for creating and changing EML metadata contents: - starts_with("pid_") - starts_with("eml_") @@ -47,5 +47,35 @@ reference: - 'which_in_eml' - 'reorder_pids' +- title: Environment Functions + desc: Functions related to loading configuriation based upon the environment + contents: + - starts_with("env_") + +- title: Format Functions + desc: Functions related to data object formats + contents: + - 'get_formats' + - 'check_format' + - 'guess_format_id' + - 'get_netcdf_format_id' + - 'is_format_id' + - 'format_eml' + + - title: Quality Function + desc: Function to check the quality of an EML document you are authoring + contents: + - 'mdq_run' + + + - title: ISO Metadata Functions + desc: Functions related to fixing invalid ISO metadata + contents: + - starts_with("test_") + + + + + From 8689ed30cbdd7e2863bec6a7a44711b2846ae0d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKristen?= Date: Fri, 28 Aug 2020 15:00:13 -0700 Subject: [PATCH 04/15] Removed some functions from index that had been marked as '@noRd' --- _pkgdown.yml | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index 867a20d..85a6f8f 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -10,13 +10,29 @@ reference: contents: - starts_with("add_") -- title: Functions to edit sysmeta - desc: Functions to access or edit the sysmeta of the package +- title: DataOne functions + desc: Helper functions for the dataone package + contents: + - 'is_token_set' + - 'get_token' + - 'is_token_expired' + - 'get_mn_base_url' + - 'is_authorized' + +- title: NetCDF Attribute functions + desc: Get a data.frame of attributes from a NetCDF object + contents: + - 'get_ncdf4_attributes' + - 'get_token' + - 'is_token_expired' + - 'get_mn_base_url' + - 'is_authorized' + +- title: Sysmeta Function + desc: Function to access the sysmeta of the package contents: - - 'replace_subject' - - 'clear_replication_policy' - 'get_all_sysmeta' - - 'translate' + - title: Editing Functions desc: Functions to edit a package @@ -55,11 +71,9 @@ reference: - title: Format Functions desc: Functions related to data object formats contents: - - 'get_formats' - - 'check_format' - 'guess_format_id' - - 'get_netcdf_format_id' - - 'is_format_id' + - 'format_eml' + - 'format_iso' - 'format_eml' - title: Quality Function From 249c7f758a76ffbabf79c51a3dd35c435d8e9b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKristen?= Date: Fri, 28 Aug 2020 15:07:02 -0700 Subject: [PATCH 05/15] switched index up a bit --- _pkgdown.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index 85a6f8f..2855e0c 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -4,13 +4,14 @@ navbar: href: https://github.com/NCEAS/arcticdatautils reference: +-title: Functions -- title: Access functions +- subtitle: Access functions desc: Functions to change who can access the package contents: - starts_with("add_") -- title: DataOne functions +- subtitle: DataOne functions desc: Helper functions for the dataone package contents: - 'is_token_set' @@ -19,7 +20,7 @@ reference: - 'get_mn_base_url' - 'is_authorized' -- title: NetCDF Attribute functions +- subtitle: NetCDF Attribute functions desc: Get a data.frame of attributes from a NetCDF object contents: - 'get_ncdf4_attributes' @@ -28,13 +29,13 @@ reference: - 'get_mn_base_url' - 'is_authorized' -- title: Sysmeta Function +- subtitle: Sysmeta Function desc: Function to access the sysmeta of the package contents: - 'get_all_sysmeta' -- title: Editing Functions +- subtitle: Editing Functions desc: Functions to edit a package contents: - 'publish_object' @@ -45,14 +46,14 @@ reference: - 'set_file_name' - 'reformat_file_name' -- title: Helper Functions +- subtitle: Helper Functions desc: Functions to help test a package contents: - starts_with("create_") - 'get_orcid_name' - 'get_orcid_email' -- title: EML Functions +- subtitle: EML Functions desc: Functions for creating and changing EML metadata contents: - starts_with("pid_") @@ -63,12 +64,12 @@ reference: - 'which_in_eml' - 'reorder_pids' -- title: Environment Functions +- subtitle: Environment Functions desc: Functions related to loading configuriation based upon the environment contents: - starts_with("env_") -- title: Format Functions +- subtitle: Format Functions desc: Functions related to data object formats contents: - 'guess_format_id' @@ -76,15 +77,15 @@ reference: - 'format_iso' - 'format_eml' - - title: Quality Function + - subtitle: Quality Function desc: Function to check the quality of an EML document you are authoring contents: - 'mdq_run' - - title: ISO Metadata Functions + - subtitle: ISO Metadata Functions desc: Functions related to fixing invalid ISO metadata - contents: + - contents: - starts_with("test_") From 0cc6a88f33cb26cde6cd42b7cf15045272704843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKristen?= Date: Wed, 2 Sep 2020 13:00:20 -0700 Subject: [PATCH 06/15] Change to yml doc --- .Rbuildignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.Rbuildignore b/.Rbuildignore index f71e5af..4227c32 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -7,3 +7,5 @@ ^\.travis\.yml$ ^LICENSE$ ^MAINTENANCE\.md$ +^_pkgdown\.yml$ +^pkgdown$ From 7ca8d2eef5cb5a1d4561e6a390839ae4c771a680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKristen?= Date: Thu, 3 Sep 2020 15:45:56 -0700 Subject: [PATCH 07/15] I had one function listed twice under the Format Functions subheading in the references tab so I deleted one. I also removed the overall title and switched subtitles to titles. Some examples use subtitle some just use title and description so maybe that was the problem. --- _pkgdown.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index 2855e0c..fa5a4ae 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -4,14 +4,12 @@ navbar: href: https://github.com/NCEAS/arcticdatautils reference: --title: Functions - -- subtitle: Access functions +- title: Access functions desc: Functions to change who can access the package contents: - starts_with("add_") -- subtitle: DataOne functions +- title: DataOne functions desc: Helper functions for the dataone package contents: - 'is_token_set' @@ -20,7 +18,7 @@ reference: - 'get_mn_base_url' - 'is_authorized' -- subtitle: NetCDF Attribute functions +- title: NetCDF Attribute functions desc: Get a data.frame of attributes from a NetCDF object contents: - 'get_ncdf4_attributes' @@ -29,13 +27,13 @@ reference: - 'get_mn_base_url' - 'is_authorized' -- subtitle: Sysmeta Function +- title: Sysmeta Function desc: Function to access the sysmeta of the package contents: - 'get_all_sysmeta' -- subtitle: Editing Functions +- title: Editing Functions desc: Functions to edit a package contents: - 'publish_object' @@ -46,14 +44,14 @@ reference: - 'set_file_name' - 'reformat_file_name' -- subtitle: Helper Functions +- title: Helper Functions desc: Functions to help test a package contents: - starts_with("create_") - 'get_orcid_name' - 'get_orcid_email' -- subtitle: EML Functions +- title: EML Functions desc: Functions for creating and changing EML metadata contents: - starts_with("pid_") @@ -64,7 +62,7 @@ reference: - 'which_in_eml' - 'reorder_pids' -- subtitle: Environment Functions +- title: Environment Functions desc: Functions related to loading configuriation based upon the environment contents: - starts_with("env_") @@ -75,14 +73,12 @@ reference: - 'guess_format_id' - 'format_eml' - 'format_iso' - - 'format_eml' - subtitle: Quality Function desc: Function to check the quality of an EML document you are authoring contents: - 'mdq_run' - - subtitle: ISO Metadata Functions desc: Functions related to fixing invalid ISO metadata - contents: From 85bdec6304984b9c5a7dad3e2bd220259fb75a8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKristen?= Date: Thu, 3 Sep 2020 15:53:01 -0700 Subject: [PATCH 08/15] Small formatting adjustment --- _pkgdown.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index fa5a4ae..abd0de3 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -81,7 +81,7 @@ reference: - subtitle: ISO Metadata Functions desc: Functions related to fixing invalid ISO metadata - - contents: + contents: - starts_with("test_") From 39b8aade74374b853e1a60ec44078dbfc154f418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKristen?= Date: Thu, 10 Sep 2020 12:27:16 -0700 Subject: [PATCH 09/15] Removed quotation from package names in yml doc --- _pkgdown.yml | 70 ++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index abd0de3..6c413ae 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -7,82 +7,82 @@ reference: - title: Access functions desc: Functions to change who can access the package contents: - - starts_with("add_") + - starts_with('add_') - title: DataOne functions desc: Helper functions for the dataone package contents: - - 'is_token_set' - - 'get_token' - - 'is_token_expired' - - 'get_mn_base_url' - - 'is_authorized' + - is_token_set + - get_token + - is_token_expired + - get_mn_base_url + - is_authorized - title: NetCDF Attribute functions desc: Get a data.frame of attributes from a NetCDF object contents: - - 'get_ncdf4_attributes' - - 'get_token' - - 'is_token_expired' - - 'get_mn_base_url' - - 'is_authorized' + - get_ncdf4_attributes + - get_token + - is_token_expired + - get_mn_base_url + - is_authorized - title: Sysmeta Function desc: Function to access the sysmeta of the package contents: - - 'get_all_sysmeta' + - get_all_sysmeta - title: Editing Functions desc: Functions to edit a package contents: - - 'publish_object' - - 'update_object' - - 'publish_update' - - 'create_resource_map' - - 'update_resource_map ' - - 'set_file_name' - - 'reformat_file_name' + - publish_object + - update_object + - publish_update + - create_resource_map + - update_resource_map + - set_file_name + - reformat_file_name - title: Helper Functions desc: Functions to help test a package contents: - - starts_with("create_") - - 'get_orcid_name' - - 'get_orcid_email' + - starts_with('create_') + - get_orcid_name + - get_orcid_email - title: EML Functions desc: Functions for creating and changing EML metadata contents: - - starts_with("pid_") - - starts_with("eml_") - - 'sysmeta_to_eml_physical' - - 'get_orcid_email' - - 'set_abstract' - - 'which_in_eml' - - 'reorder_pids' + - starts_with('pid_') + - starts_with('eml_') + - sysmeta_to_eml_physical + - get_orcid_email + - set_abstract + - which_in_eml + - reorder_pids - title: Environment Functions desc: Functions related to loading configuriation based upon the environment contents: - - starts_with("env_") + - starts_with('env_') - subtitle: Format Functions desc: Functions related to data object formats contents: - - 'guess_format_id' - - 'format_eml' - - 'format_iso' + - guess_format_id + - format_eml + - format_iso - subtitle: Quality Function desc: Function to check the quality of an EML document you are authoring contents: - - 'mdq_run' + - mdq_run - subtitle: ISO Metadata Functions desc: Functions related to fixing invalid ISO metadata contents: - - starts_with("test_") + - starts_with('test_') From 80cb8ac3fdfc9a1a351ab541ed80d20d15706afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKristen?= Date: Thu, 10 Sep 2020 13:22:32 -0700 Subject: [PATCH 10/15] Fixed errors in yml it builds the site fine now --- _pkgdown.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index 6c413ae..aa75e66 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -2,14 +2,14 @@ navbar: right: - icon: fa-github href: https://github.com/NCEAS/arcticdatautils -reference: -- title: Access functions - desc: Functions to change who can access the package +reference: +- title: Package access functions + desc: High-level utility functions for getting and setting access rules for DataONE objects contents: - starts_with('add_') -- title: DataOne functions +- title: DataOne Functions desc: Helper functions for the dataone package contents: - is_token_set @@ -18,7 +18,7 @@ reference: - get_mn_base_url - is_authorized -- title: NetCDF Attribute functions +- title: NetCDF Functions desc: Get a data.frame of attributes from a NetCDF object contents: - get_ncdf4_attributes @@ -28,13 +28,13 @@ reference: - is_authorized - title: Sysmeta Function - desc: Function to access the sysmeta of the package + desc: Utility function for modifying System Metadata objects contents: - get_all_sysmeta -- title: Editing Functions - desc: Functions to edit a package +- title: Package editing functions + desc: Functions for managing package contents contents: - publish_object - update_object @@ -44,15 +44,15 @@ reference: - set_file_name - reformat_file_name -- title: Helper Functions - desc: Functions to help test a package +- title: Functions to help test a package + desc: Various helper functions for things like testing a package contents: - - starts_with('create_') + - starts_with('create_') - get_orcid_name - get_orcid_email - title: EML Functions - desc: Functions for creating and changing EML metadata + desc: Helper functions for creating EML metadata contents: - starts_with('pid_') - starts_with('eml_') @@ -67,19 +67,19 @@ reference: contents: - starts_with('env_') -- subtitle: Format Functions +- title: Format Functions desc: Functions related to data object formats contents: - guess_format_id - format_eml - format_iso - - subtitle: Quality Function - desc: Function to check the quality of an EML document you are authoring +- title: QA Function + desc: Functions related to metadata quality contents: - mdq_run - - subtitle: ISO Metadata Functions +- title: ISO Metadata Functions desc: Functions related to fixing invalid ISO metadata contents: - starts_with('test_') From f28cad217ea11939ee7df757434b729ffd93923d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKristen?= Date: Thu, 10 Sep 2020 14:34:44 -0700 Subject: [PATCH 11/15] Removed function under ISO Metadata Functions heading --- _pkgdown.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index aa75e66..fd2fb30 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -79,10 +79,6 @@ reference: contents: - mdq_run -- title: ISO Metadata Functions - desc: Functions related to fixing invalid ISO metadata - contents: - - starts_with('test_') From ccb47dcf13dd0e59f2d86e40dfc11208596f64a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKristen?= Date: Thu, 10 Sep 2020 15:06:58 -0700 Subject: [PATCH 12/15] additional adjustments to yml --- _pkgdown.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index fd2fb30..d00a6ef 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -4,10 +4,16 @@ navbar: href: https://github.com/NCEAS/arcticdatautils reference: -- title: Package access functions +- title: Access functions desc: High-level utility functions for getting and setting access rules for DataONE objects contents: - - starts_with('add_') + - set_rights_holder + - set_access + - remove_access + - set_rights_and_access + - set_public_read + - remove_public_read + - is_public_read - title: DataOne Functions desc: Helper functions for the dataone package @@ -54,8 +60,8 @@ reference: - title: EML Functions desc: Helper functions for creating EML metadata contents: - - starts_with('pid_') - - starts_with('eml_') + - starts_with('pid_') + - starts_with('eml_') - sysmeta_to_eml_physical - get_orcid_email - set_abstract @@ -63,9 +69,9 @@ reference: - reorder_pids - title: Environment Functions - desc: Functions related to loading configuriation based upon the environment + desc: Function related to loading configuriation based upon the environment contents: - - starts_with('env_') + - starts_with('env_') - title: Format Functions desc: Functions related to data object formats @@ -75,7 +81,7 @@ reference: - format_iso - title: QA Function - desc: Functions related to metadata quality + desc: Function related to metadata quality contents: - mdq_run From 6856c2debda8dc2688ec8a34db7e0bac05a1b064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKristen?= Date: Thu, 10 Sep 2020 16:13:05 -0700 Subject: [PATCH 13/15] Added an rmd with list of names and descriptions of functions that are intentionally not shown on the pkgdown. Tomorrow I will go through and make more notes on each to begin to determine which ought to be moved to datamgmt package and questions for Jeannette and Jasmine --- functions_not_shown_in_pkgdown_site.Rmd | 265 ++++++++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 functions_not_shown_in_pkgdown_site.Rmd diff --git a/functions_not_shown_in_pkgdown_site.Rmd b/functions_not_shown_in_pkgdown_site.Rmd new file mode 100644 index 0000000..951f171 --- /dev/null +++ b/functions_not_shown_in_pkgdown_site.Rmd @@ -0,0 +1,265 @@ +--- +title: "Functions_not_shown_in_pkgdown" +output: html_document +--- + +```{r setup, include=FALSE} +knitr::opts_chunk$set(echo = TRUE) +``` + +*add_access_rules* + +This is a function to add a standard set of access rules to every object so that the access rules don't differ across objects. + + +*add_admin_group_access* + +Add access to the given System Metadata for the arctic-data-admins group + +*get_doc_id* + +Get the Metacat docid for the given identifier + +*env_load* + +Load environmental variables from a YAML-formatted environment file. + +*get_formats* + +Get the list of valid formats from DataONE + +*check_format* + +Check that the given format is valid. Validity is determined by the given format being found in the list on . + +*get_netcdf_format_id* + +Determine the DataONE format ID for a NetCDF file provided by path. + +*is_format_id* + +Test whether an object has a particular format ID + +*create_from_folder* + +This function handles the process of inserting the original ISO package and updating it with an EML package. + +*view_packages* + +Functions for interactive viewing of the inventory and other objects + +*inv_init* + +Functions relating to keeping up an inventory of files that exist on the KNB and may or may not be copied to another computer and untarred + +*inv_load_files* + +Load files into the inventory from a text file + +*inv_load_checksums* + +Load checksums into the inventory file from a text file + +*inv_load_dois* + +Load DOIs from a text file into the inventory + +*inv_load_identifiers* + +This function removes the column 'identifier' from inventory before doing a left join. + +*inv_add_extra_columns* + +Add a set of extra columns to the inventory that are useful for working with them. + +*inv_add_parent_package_column* + +Add a column for parent packages + +*inv_update* + +Update an inventory with a new inventory + +*theme_packages* + +Themes divide packages into groups based upon how the actions we will take to insert them. Packages are divided into one of three themes: + +"many-files" + +The package has more files than we'd like to include in a Resource Map and we will want to archive its contents before inserting. + +"has-versions" + +The package has version information embedded into its folder structure. These packages will be hand-verified and inserted manually when a plan is developed to insert them. + +"ready-to-go" + +All other packages not in the above themes. + +*fix_bad_enum* + +Fix a metadata record with a bad topicCategory. This is the case where the ISO schema says what's inside a gmd:MD_TopicCategoryCode element should match items from a controlled vocabulary. But in the ISO metadata we have, there are newlines and spaces around that text which causes a check for string equality to fail. i.e. 'oceans' != ' oceans ' + +*fix_bad_topic* + +Fix a metadata record with multiple MD_TopicCategory children elements inside a single topicCategory element. + +*pretty_print* + +Use XMLStarlet to pretty-print an XML document. This command just runs `xmlstarlet path > path`, doing a simple pretty-printing of the file located at `path`. Note that this function is doing an in-place pretty printing instead of returning the pretty-printed text. + +Note that this command uses a temporary file as an intermediate step in the pretty-printing process. For some reason, when running xmlstarlet from within R, the same file can't be used as the input to `xmlstarlet format` and as the shell redirection file (`> somefile.txt`). If you try to run `xmlstarlet format` on the same file as you redirect to, you get a weird parse error from xmlstarlet. + +*insert_file* + +Insert a file from a single row of the inventory + +*insert_package* + +Create a single data package from files in the inventory + +*generate_resource_map_pid* + +Generate a PID for a new resource map by appending "resource_map_" to it + +*get_or_create_pid* + +Get the already-minted PID from the inventory or mint a new one + +*create_sysmeta* + +Create a sysmeta object. + +This is a wrapper function around the constructor for a SystemMetadata object. + +*create_object* + +Create an object from a row of the inventory + +*validate_inventory* + +Validate an inventory + +*validate_environment* + +Validate an environment + +*determine_child_pids* + +Calculate a set of child PIDs for the given package + +*update_package* + +The modified metadata should be set in the `env` variable. For example, if your original metadata is: + + /home/you/originals/dir/a.xml + +and your modified metadata is in + +/home/someone_else/modified/dir/a.xml + +Then your env should be: + +env$base_path <- "/home/you/" +env$alternate_path <- "/home/someone_else" + +Note that the data files are not updated either so all that's happening is the metadata object and resource map are being updated. + +Note that this function checks if the old objects (metadata and resource map) exist on the Member Node before doing their work and will call createObject() instead of updateObject() if the object didn't already exist + +*filter_packaging_statements* + +Filter statements related to packaging + +This is intended to be called after [datapack::getTriples()] has been called on a resource map. + +This function was written specifically for the case of updating a resource map while preserving any extra statements that have been added such as PROV statements. + +*replace_subject* + +Utility functions for modifying System Metadata objects. Replace subjects in the accessPolicy section of a System Metadata entries. This function was written out to fix capitalization errors in a set of existing System Metadata entries but can be used to replace any subject. + +*clear_replication_policy* + +Clear the replication policy from a System Metadata object + +*extract_local_identifier* + +Extract the local identifier for an ACADIS ISO metadata XML file + +*show_random_dataset* + +Print a random dataset + +*log_message* + +Log a message to the console and to a logfile. Reads from the environment variable 'LOG_PATH' and uses the value set there to decide the location of the log file. If that envvar isn't set, it defaults to 'arcticdata-log.txt'. + +*substitute_eml_party* + +Modify name structure for EML parties. Extract the EML responsible-party blocks in a document and parse the +surName field to create proper givenName/surName structure. + +*change_eml_name* + +Change EML name. Utility function to extract a name string from an XML individualName node, parse it into tokens,and reformat the individualName with new children nodes. + +*replace_package_id* + +Replace EML packageId with value. Replace the EML 'packageId' attribute on the root element with a certain value. + +*add_string_to_title* + +Add a string to the title element in the given file + +*add_additional_identifiers* + +Add a set of additional identifiers to an EML document + +*path_join* + +Intelligently join possibly redundant path parts together. Joins path strings like "./" to "./my/dir" as "./my/dir" instead of as "././my/dir. + +*is_resource_map* + +Determine whether the object with the given PID is a resource map + +*get_token_subject* + +Return the subject of the set dataone_test_token + +*get_identifier* + +Get the identifier from a DataONE response. Example response: + + +urn:uuid:12aaf494-5840-434d-9cdb-c2597d58543e + + +*get_current_version* + +Get the current package version. This function parses the installed DESCRIPTION file to get the latest +version of the package. + +*get_latest_release* + +Use the GitHub API to find the latest release for the package + +*warn_current_version* + +Warns if the currently-installed version of the package is not the same version as the latest release on GitHub. + +*get_package_direct* + +Get a structured list of PIDs for the objects in a package + +*find_newest_resource_map* + +Get the resource map(s) for the given object + +~Note: Why is find_newest_resource_map hidden but not find_newest_object?~ + +*filter_obsolete_pids* + +Filters PIDs that are obsolete. Whether or not a PID is obsolete is determined by whether its "obsoletedBy" +property is set to another PID (`TRUE`) or is `NA` (`FALSE`). From d5095ad05d4a69e3f5f6afd7932803dec066d565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKristen?= Date: Wed, 16 Sep 2020 15:35:06 -0700 Subject: [PATCH 14/15] Added logo as footer --- README.md | 4 ++++ index.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 545a29b..a4d2793 100644 --- a/README.md +++ b/README.md @@ -60,3 +60,7 @@ If you *do* want to run integration tests options(dataone_test_token = "{YOUR_TOKEN_HERE}") # <- Modify this line devtools::test() ``` + + diff --git a/index.md b/index.md index b6a2bf2..f4d8aaa 100644 --- a/index.md +++ b/index.md @@ -19,3 +19,7 @@ To install the latest version of this package we recommend installing from Githu remotes::install_github("nceas/arcticdatautils") ``` + + From 825640ae0baa321250f254a35fec838a9c9a5a64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CKristen?= Date: Fri, 18 Sep 2020 14:58:34 -0700 Subject: [PATCH 15/15] image --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a4d2793..d70dcce 100644 --- a/README.md +++ b/README.md @@ -62,5 +62,5 @@ devtools::test() ```