From 7092ba8a8704033094b4e1e3b6420c0bc1a2314a Mon Sep 17 00:00:00 2001 From: Rob Baker Date: Wed, 2 Sep 2026 08:47:15 -0600 Subject: [PATCH 1/4] in set_cross_reference, make sure all calls are to secure api. --- R/editEMLfunctions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/editEMLfunctions.R b/R/editEMLfunctions.R index 1ee78b9..5fbdf02 100644 --- a/R/editEMLfunctions.R +++ b/R/editEMLfunctions.R @@ -1768,7 +1768,7 @@ set_cross_reference <- function(eml_object, get_url <- if (dev) { paste0(.ds_dev_api(), "ReferenceCodeSearch?q=", cross_ref_id[i]) } else { - paste0(.ds_api(), "ReferenceCodeSearch?q=", cross_ref_id[i]) + paste0(.ds_secure_api(), "ReferenceCodeSearch?q=", cross_ref_id[i]) } req2 <- httr::GET(get_url, From d40e135821067ae18c143d71ce1c11bccdd409a8 Mon Sep 17 00:00:00 2001 From: Rob Baker Date: Wed, 2 Sep 2026 11:06:28 -0600 Subject: [PATCH 2/4] Bug fix for set_cross_reference to make sure cross reference URL is included in metadata. --- R/editEMLfunctions.R | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/R/editEMLfunctions.R b/R/editEMLfunctions.R index 5fbdf02..dea83d8 100644 --- a/R/editEMLfunctions.R +++ b/R/editEMLfunctions.R @@ -1782,7 +1782,7 @@ set_cross_reference <- function(eml_object, cli::cli_abort(c("x" = msg)) return(invisible()) } - #get project information: + #get cross ref information: rjson2 <- jsonlite::fromJSON(httr::content(req2, "text")) if (rjson2$isDOI == "True") { @@ -1792,10 +1792,7 @@ set_cross_reference <- function(eml_object, } cross_ref_type[i] <- rjson2$referenceType cross_ref_title[i] <- rjson2$title - - #cross_ref_url <- append(cross_ref_url, cross_url) - #cross_ref_type <- append(cross_ref_type, cross_type) - #cross_ref_title <- append(cross_ref_title, cross_title) + cross_ref_url[i] <- stringr::str_trim(cross_url) } build_cross_ref_items <- function(urls, titles, types) { From ed2ac8a96e4b4b49791417489956fd9c207f6ab6 Mon Sep 17 00:00:00 2001 From: Rob Baker Date: Wed, 2 Sep 2026 11:08:24 -0600 Subject: [PATCH 3/4] bug fix for set_cross_references --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index 59b058c..70d87b5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,6 @@ # EMLeditor v1.2.1 (Development version) +## 2026-09-02 + * Bug fix for `set_cross_references`. Make sure cross reference URL is added to metadata! ## 2026-08-05 * Update DESCRIPTION: move sf from Suggests to Imports. Hopefully fixes issues with `set_content_units` etc. From 815b8d60896bc93388714864b1f9a7eaec58d4e9 Mon Sep 17 00:00:00 2001 From: Rob Baker Date: Wed, 2 Sep 2026 11:19:00 -0600 Subject: [PATCH 4/4] updated via pkgdown::build_site_github_pages --- docs/CONTRIBUTING.html | 2 +- docs/articles/a01_prereqs.html | 2 +- docs/articles/a02_EML_creation_script.html | 28 +++++++++++----------- docs/index.html | 8 +++---- docs/pkgdown.yml | 2 +- docs/reference/EMLeditor-package.html | 3 ++- docs/reference/upload_data_package.html | 4 ++-- 7 files changed, 25 insertions(+), 24 deletions(-) diff --git a/docs/CONTRIBUTING.html b/docs/CONTRIBUTING.html index 8c55cd2..1c565ab 100644 --- a/docs/CONTRIBUTING.html +++ b/docs/CONTRIBUTING.html @@ -134,7 +134,7 @@

How Do I Submit a Good En

Your First Code Contribution

-

If you would like to contribute code please make the adjustments and issue a pull request. The development team will review your code prior to merging and pull request. Before issuing a pull request make sure: 1) You have added a description of any changes made to the changelog in NEWS.md 2) If you have added a function, make sure you also include unit tests that cover the function. If you have changed a function, make sure the unit tests still pass. 3) If you have added or changed a function, make sure that the package loads using devtools::load_all(). 2) You have updated any necessary documentation using devtools::document() 3) You have updated the associated web pages using pkgdown::build_site_github_pages() 4) You have checked that there are no errors or warnings when the package is built using devtools::check().

+

If you would like to contribute code please make the adjustments and issue a pull request. The development team will review your code prior to merging and pull request. Before issuing a pull request make sure: 1) You have added a description of any changes made to the changelog in NEWS.md 2) If you have added a function, make sure you also include unit tests that cover the function. If you have changed a function, make sure the unit tests still pass. 3) If you have added or changed a function, make sure that the package loads using devtools::load_all(). 2) You have updated any necessary documentation using devtools::document() 3) You have updated the associated web pages using pkgdown::build_site_github_pages() 4) You have checked that there are no errors or warnings when the package is built using devtools::check().

diff --git a/docs/articles/a01_prereqs.html b/docs/articles/a01_prereqs.html index 2e8b0a4..eb41bf9 100644 --- a/docs/articles/a01_prereqs.html +++ b/docs/articles/a01_prereqs.html @@ -103,7 +103,7 @@

Softwareinstall.packages(c("remotes", "tidyverse")) #the NPSdataverse includes EMLassemblyline, EMLeditor, and several other useful packages: -remotes::install_github("doi-nps/NPSdataverse") +remotes::install_github("doi-nps/NPSdataverse") library(tidyverse) library(NPSdataverse)

diff --git a/docs/articles/a02_EML_creation_script.html b/docs/articles/a02_EML_creation_script.html index 941efbe..a63a36e 100644 --- a/docs/articles/a02_EML_creation_script.html +++ b/docs/articles/a02_EML_creation_script.html @@ -125,7 +125,7 @@

Install and Load R Packages
 #install packages
 install.packages(c("remotes", "tidyverse"))
-remotes::install_github("doi-nps/NPSdataverse")
+remotes::install_github("doi-nps/NPSdataverse")
 # When loading packages, you may be advised to update to more recent versions
 # of dependent packages. Most of these updates likely are not critical.  
@@ -277,8 +277,8 @@ 

Temporal information
-startdate <- ymd("2010-01-26")
-enddate <- ymd("2013-01-04")

+startdate <- ymd("2010-01-26") +enddate <- ymd("2013-01-04")
@@ -331,7 +331,7 @@

FUNCTION 1 - Core Metadata Infor using EMLeditor::set_int_rights(). There is no need to edit this .txt file.

-EMLassemblyline::template_core_metadata(path = working_folder, 
+EMLassemblyline::template_core_metadata(path = working_folder, 
                        license = "CC0") # that '0' is a zero!

@@ -347,7 +347,7 @@

FUNCTION 2 - Data Table Attributes
-EMLassemblyline::template_table_attributes(path = working_folder, 
+EMLassemblyline::template_table_attributes(path = working_folder, 
                           data.table = data_files, 
                           write.file = TRUE)

@@ -367,7 +367,7 @@

FUNCTION 3 - Data Table Ca these files already exist from a previous run, they are not overwritten.

-EMLassemblyline::template_categorical_variables(path = working_folder, 
+EMLassemblyline::template_categorical_variables(path = working_folder, 
                                data.path = working_folder, 
                                write.file = TRUE)
@@ -387,7 +387,7 @@

FUNCTION 4 - Geographic CoverageQCkit for R functions that will convert UTM to lat/long).

-EMLassemblyline::template_geographic_coverage(path = working_folder, 
+EMLassemblyline::template_geographic_coverage(path = working_folder, 
                              data.path = working_folder,
                              data.table = data_coordinates_table, 
                              lat.col = data_latitude, 
@@ -404,7 +404,7 @@ 

FUNCTION 5 - Taxonomic Coverage
-EMLassemblyline::template_taxonomic_coverage(path = working_folder, 
+EMLassemblyline::template_taxonomic_coverage(path = working_folder, 
                             data.path = working_folder, 
                             taxa.table = data_taxa_tables,
                             taxa.col = data_taxa_fields, 
@@ -423,7 +423,7 @@ 

Create an EML object
-my_metadata <- EMLassemblyline::make_eml(path = working_folder,
+my_metadata <- EMLassemblyline::make_eml(path = working_folder,
                dataset.title = package_title,
                data.table = data_files,
                data.table.name = data_names,
@@ -440,7 +440,7 @@ 

Check for EML validity

This is a good point to pause and test whether your EML is valid.

-EML::eml_validate(my_metadata)
+EML::eml_validate(my_metadata)

if your EML is valid you should see the following (admittedly cryptic) result:

# [1] TRUE
@@ -656,7 +656,7 @@ 

Validate your EML
-EML::eml_validate(my_metadata)

+EML::eml_validate(my_metadata)

if your EML is valid you should see the following (admittedly crypitic):

# [1] TRUE
@@ -674,7 +674,7 @@ 

Write your EML to an xml file
-EML::write_eml(my_metadata, "mymetadatafilename_metadata.xml")
+EML::write_eml(my_metadata, "mymetadatafilename_metadata.xml")

Check your .xml file @@ -684,7 +684,7 @@

Check your .xml file
 # This assumes that you have written your metadata to an .xml file and that the .xml file is in the current working directory.
-DPchecker::run_congruence_checks(check_metadata_only = TRUE)
+DPchecker::run_congruence_checks(check_metadata_only = TRUE)
 
 # If you .xml file with metadata is in a different directory, you will have to specify that:
 # DPchecker::run_congruence_checks("C:/Users/<yourusername>/Documents/my_data_package", check_metadata_only = TRUE)

@@ -700,7 +700,7 @@

Check your data package
 # this assumes that the data package is the working directory
-DPchecker::run_congruence_checks()
+DPchecker::run_congruence_checks()
 
 # if your data package is somewhere else, specify that:
 # DPchecker::run_congruence_checks("C:/Users/<yourusername>/Documents/my_data_package")
diff --git a/docs/index.html b/docs/index.html index fd5c5d6..47e5b46 100644 --- a/docs/index.html +++ b/docs/index.html @@ -71,15 +71,15 @@

Installation and updatesYou can install and update the development version of EMLeditor from GitHub with:

 # install.packages("pak")
-pak::pkg_install("doi-nps/EMLeditor")
+pak::pkg_install("doi-nps/EMLeditor")
 
 # alternatively:
-remotes::install_github("doi-nps/eMLeditor")
+remotes::install_github("doi-nps/eMLeditor")

To install all the packages in the NPSdataverse (including EMLeditor):

-pak::pkg_install("doi-nps/NPSdataverse")
+pak::pkg_install("doi-nps/NPSdataverse")
 #alternatively:
-remotes::install_github("doi-nps/NPSdataverse")
+remotes::install_github("doi-nps/NPSdataverse")

Workflow outline diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index ef4522a..d28214e 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -7,7 +7,7 @@ articles: a03_Template_edits: a03_Template_edits.html a04_Editing_fixing_eml: a04_Editing_fixing_eml.html a05_advanced_functionality: a05_advanced_functionality.html -last_built: 2026-08-05T17:44Z +last_built: 2026-09-02T17:08Z urls: reference: https://doi-nps.github.io/EMLeditor/reference article: https://doi-nps.github.io/EMLeditor/articles diff --git a/docs/reference/EMLeditor-package.html b/docs/reference/EMLeditor-package.html index ba9d38e..91d2f5e 100644 --- a/docs/reference/EMLeditor-package.html +++ b/docs/reference/EMLeditor-package.html @@ -56,7 +56,8 @@

See also

Author

Maintainer: Robert Baker robert_baker@nps.gov (ORCID)

-

Authors:

diff --git a/docs/reference/upload_data_package.html b/docs/reference/upload_data_package.html index 154875b..5cbb5e6 100644 --- a/docs/reference/upload_data_package.html +++ b/docs/reference/upload_data_package.html @@ -47,7 +47,7 @@

Upload a data package to DataStore

Usage

-
upload_data_package(directory = here::here(), force = FALSE, dev = FALSE)
+
upload_data_package(directory = here::here(), force = FALSE, dev = FALSE)
@@ -82,7 +82,7 @@

Details

Examples

 if (FALSE) { # \dontrun{
-dir <- here::here("..", "Downloads", "BICY")
+dir <- here::here("..", "Downloads", "BICY")
 upload_data_package(dir)
 } # }