Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
59f53aa
update set_cui to take only "PUBLIC, "RESTRICTED"; get rid of set_cui…
RobLBaker Sep 4, 2026
80f076f
updated set_legal_authority to coincide with feedback from DataStore …
RobLBaker Sep 10, 2026
a3cb2b6
Update function name from set_legal_authority to set_permissions. Upd…
RobLBaker Sep 10, 2026
8bf4367
updated via devtools::document and pkgdown::build_site_github_pages
RobLBaker Sep 10, 2026
5882276
add set_cui_marking back in.
RobLBaker Sep 10, 2026
ae9d177
fix set_cui cui_code selection options. move .strong_good <<- to utils.
RobLBaker Sep 10, 2026
82ea13c
add "distribution" to globally declared variabels; add .strong_good f…
RobLBaker Sep 10, 2026
da7108b
add NPSdatastore to imports; specify that QCkti and NPSdatastore come…
RobLBaker Sep 10, 2026
5cfc1b2
updated via devtools::document and pkgdown::build_site_github_pages
RobLBaker Sep 10, 2026
2c1d422
Bug fixes for set_permissions
RobLBaker Sep 10, 2026
b9ab1e1
add strong_good to globally declared variables
RobLBaker Sep 10, 2026
bc57751
add simple unit test for set_permissions
RobLBaker Sep 10, 2026
e56a763
update .strong_good to use crayon. Cli was throwing errors while unit…
RobLBaker Sep 11, 2026
5d11974
update console feedback to use new .strong_good and not throw errors …
RobLBaker Sep 11, 2026
dfddcdc
add unit tests for set_permissions
RobLBaker Sep 11, 2026
7cf7dc1
update documentation and templates to support set_permissions.
RobLBaker Sep 11, 2026
4a82bd2
update documentation to reflect new set_permissions function
RobLBaker Sep 11, 2026
dfd62e6
updated via pkgdown::build_site_github_pages
RobLBaker Sep 11, 2026
307a584
fix missing comma in description file.
RobLBaker Sep 15, 2026
3936f05
Merge pull request #233 from RobLBaker/cui_2026
RobLBaker Sep 15, 2026
f876b0a
fix bug in set_permissions when force = TRUE
RobLBaker Sep 22, 2026
5dd9319
Merge pull request #235 from RobLBaker/cui_2026
RobLBaker Sep 22, 2026
e77a5ad
fix bug in set_int_rights when force == TRUE
RobLBaker Sep 23, 2026
8e7b30c
update about force == TRUE bug fixes
RobLBaker Sep 23, 2026
a94b958
Merge pull request #236 from RobLBaker/cui_2026
RobLBaker Sep 23, 2026
18a1867
make get_title explicitly get the DATASET title, not a crossreference…
RobLBaker Sep 23, 2026
e046ce3
updated via devtools::document and pkgdown::build_site_github_pages
RobLBaker Sep 23, 2026
ba1ea73
add change to get_title
RobLBaker Sep 23, 2026
4c4acb1
Merge pull request #237 from RobLBaker/cui_2026
RobLBaker Sep 23, 2026
f5abb89
information about updating set_permissions and helper function .build…
RobLBaker Sep 23, 2026
9cbf7d0
add .build_access to set_permissions to include an access module in eml.
RobLBaker Sep 23, 2026
6e13dce
add .build_access helper function.
RobLBaker Sep 23, 2026
614a516
Update EML script to reflect new permissions protocols.
RobLBaker Sep 23, 2026
69c03dc
update vignettes to reflect new permissions protocols
RobLBaker Sep 23, 2026
8ff0789
version 1.2.0 -> 1.3.0
RobLBaker Sep 23, 2026
bbbc4c6
add info about helper .build_access function, additions to set_permis…
RobLBaker Sep 23, 2026
aa20c00
deprecate cui based functions in favor of set_permissions.
RobLBaker Sep 23, 2026
f2a8b8f
.build_access authSystem url update to irma.nps.gov/DataStore
RobLBaker Sep 24, 2026
f505991
fix bug in lifecycle::deprecate_soft for set_cui_marking
RobLBaker Sep 24, 2026
f343c3b
add suppressWarnings to handle tests for deprecated functions set_cui…
RobLBaker Sep 24, 2026
6b74ad8
updated via devtools::document and pkgdown::build_site_github_pages()
RobLBaker Sep 24, 2026
ebdc320
updated via devtools::document and pkgdown::build_site_github_pages
RobLBaker Sep 24, 2026
df1b2a9
Merge pull request #238 from RobLBaker/cui_2026
RobLBaker Sep 24, 2026
629fcec
Update docs/reference/set_cui_code.html
RobLBaker Oct 4, 2026
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
8 changes: 5 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: EMLeditor
Title: View and Edit EML Metadata
Version: 1.2.0
Version: 1.3.0
Authors@R: c(
person(given="Robert", family="Baker", email="robert_baker@nps.gov",
role = c("aut", "cre"),
Expand All @@ -20,7 +20,8 @@ BugReports: https://github.com/doi-NPS/EMLeditor/issues
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Remotes:
doi-NPS/QCkit
github::doi-nps/QCkit,
github::doi-nps/NPSdatastore
Imports:
httr,
readr,
Expand All @@ -43,7 +44,8 @@ Imports:
mockr,
rlang,
ISOcodes,
sf
sf,
NPSdatastore
Suggests:
stargazer,
knitr,
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export(set_lit)
export(set_methods)
export(set_missing_data)
export(set_new_creator)
export(set_permissions)
export(set_producing_units)
export(set_project)
export(set_protocol)
Expand Down
12 changes: 11 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# EMLeditor v1.2.1 (Development version)
# EMLeditor v1.3.0 ("Angel's Landing")
## 2026-09-23
* New release v1.3.0, "Angel's Landing"
* Deprecated `set_cui`, `set_cui_marking` and `set_cui_code` in favor of `set_permissions`
* Add helper function `.build_access` in utils.R; incorporate `.build_access` into `set_permissions` to add an informative block to the access element in EML.
* Update get_title to explicitly get the dataset title, not just the first title.

## 2026-09-22
* Bug fix for `set_int_rights` when force == TRUE
* Bug fix for `set_permissions` when force == TRUE

## 2026-09-02
* Bug fix for `set_cross_references`. Make sure cross reference URL is added to metadata!

Expand Down
271 changes: 241 additions & 30 deletions R/editEMLfunctions.R

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions R/getEMLfunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ get_additional_info <- function(eml_object) {
#'
#' @description get_title returns a text string that is the title of the data package
#'
#' @details accesses all of the <title> tags (there can be several, if each file was given a separate title). Assumes that the first instance of <title> referes to the entire data package and returns it as a text string, ignoring the contents of all other <title> tags.
#'
#' @inheritParams get_begin_date
#' @return a text string
#' @export
Expand All @@ -177,7 +175,7 @@ get_additional_info <- function(eml_object) {
#' get_title(eml_object)
#' }
get_title <- function(eml_object) {
doc <- get_eml_simple(eml_object, "title")[1]
doc <- eml_object[["dataset"]][["title"]]
if (is.null(doc)) {
doc <- NA
}
Expand Down
48 changes: 47 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ globalVariables(c("UnitCode",
"definition",
"unit",
"formatString",
"attributeDefinition"
"attributeDefinition",
"distribution",
"strong_good"
))


Expand Down Expand Up @@ -327,3 +329,47 @@ globalVariables(c("UnitCode",
if (NPS) eml_object <- .set_npspublisher(eml_object)
.set_version(eml_object)
}


#Call .strong_good for bold, blue font in cli messages
.strong_good <- function(x) crayon::bold(crayon::blue(x))


#' Build access component of EML
#'
#' @inheritParams set_permissions
#'
#' @returns acc
#' @noRd
#'
#' @examples
#' \dontrun{
#' .build_access("PUBLIC")
#' .build_access("INTERNAL", "edward_abbey@nps.gov")}
.build_access <- function(access, contact_email = NULL) {
if (access == "PUBLIC") {
list(
allow = list(
principal = "public",
permission = "read"
),
order = "allowFirst",
scope = "document",
authSystem = "https://irma.nps.gov/DataStore"
)
} else {
# RESTRICTED or INTERNAL: deny public read.
# No <allow> block — contact_email/authority info belongs in
# additionalMetadata, not in access, and including an allow here would
# misleadingly imply a specific grant of access via this record.
list(
deny = list(
principal = "public",
permission = "read"
),
order = "denyFirst",
scope = "document",
authSystem = "https://irma.nps.gov/DataStore"
)
}
}
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/a01_prereqs.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 38 additions & 34 deletions docs/articles/a02_EML_creation_script.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/a03_Template_edits.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-09-02T17:08Z
last_built: 2026-09-24T00:48Z
urls:
reference: https://doi-nps.github.io/EMLeditor/reference
article: https://doi-nps.github.io/EMLeditor/articles
2 changes: 1 addition & 1 deletion docs/reference/EMLeditor-package.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/get_abstract.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/get_additional_info.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading