From 2941ba26a2e503871f0966dea812a0d90be0f630 Mon Sep 17 00:00:00 2001 From: Rob Baker Date: Wed, 3 Jul 2024 07:28:05 -0600 Subject: [PATCH 01/10] finish basic version of set_project function --- R/editEMLfunctions.R | 51 +++++++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/R/editEMLfunctions.R b/R/editEMLfunctions.R index 80dd2c9..607b738 100644 --- a/R/editEMLfunctions.R +++ b/R/editEMLfunctions.R @@ -1349,7 +1349,15 @@ set_language <- function(eml_object, lang, force = FALSE, NPS = TRUE) { #' set_protocol(eml_object, 2222140) #' } #' -set_protocol <- function(eml_object, protocol_id, force = FALSE, NPS = TRUE) { +set_protocol <- function(eml_object, + protocol_id, + force = FALSE, + NPS = TRUE) { + + ###### WARNING ###### + # this function actually puts info into the project and not protocl + # needs re-written and soon. + # get data to construct project: # get protocol profile via rest services: @@ -1371,8 +1379,6 @@ set_protocol <- function(eml_object, protocol_id, force = FALSE, NPS = TRUE) { org_name <- httr::content( httr::GET(paste0(.ds_api(), "Profile/", ref)))$bibliography$title - # Construct a project to inject into EML. Note 'role' is required but not sure what to put there. - # Also i find it confusing that onlineURL references projTitle not orgName but hopefully we will hash that out soon. proj <- list( title = proj_title, @@ -1461,7 +1467,7 @@ set_project <- function(eml_object, project_reference_id, dev = FALSE, force = FALSE, - NPS = TRUE){ + NPS = TRUE) { if (nchar(project_reference_id) != 7) { cat("You must supply a 7-digit project_reference_id") @@ -1505,9 +1511,9 @@ set_project <- function(eml_object, # to verify that the email address belongs to the user #project title - title <- rjson$bibliography$title - organization <- rjson$bibliography$publisher$publisherName - role <- "a DataStore Project" + project_title <- rjson$bibliography$title + project_org <- rjson$bibliography$publisher$publisherName + project_role <- "a DataStore Project" #generate URL (check whether project has DOI) if (dev == TRUE) { @@ -1525,7 +1531,7 @@ set_project <- function(eml_object, httr::add_headers('Content-Type'='application/json')) status_code <- httr::stop_for_status(req2$status_code) - if(!status_code == 200){ + if (!status_code == 200) { stop("ERROR: DataStore connection failed. Are you logged in to the VPN?\n") } @@ -1533,16 +1539,35 @@ set_project <- function(eml_object, json2 <- httr::content(req2, "text") rjson2 <- jsonlite::fromJSON(json2) - url <- NULL - if (rjson2$isDOI == "TRUE") { - url <- paste0("https://doi.org/10.57830/", project_reference_id) + project_url <- NULL + if (rjson2$isDOI == "True") { + project_url <- paste0("https://doi.org/10.57830/", project_reference_id) } else { - url <- rjson2$referenceUrl + project_url <- rjson2$referenceUrl } + #create project: + proj <- list( + title = project_title, + personnel = list( + organizationName = project_org, + onlineUrl = project_url, + role = project_role + ) + ) + eml_object$dataset$project <- proj -} + # Set NPS publisher, if it doesn't already exist. Also sets byorForNPS in additionalMetadata to TRUE. + if (NPS == TRUE) { + eml_object <- .set_npspublisher(eml_object) + } + # add/update EMLeditor and version to metadata: + eml_object <- .set_version(eml_object) + + return(eml_object) + + } #' Set Publisher From 88543fa80840939957f2ea6f64f9c72a369bdd3c Mon Sep 17 00:00:00 2001 From: Rob Baker Date: Wed, 10 Jul 2024 10:25:50 -0600 Subject: [PATCH 02/10] add ownership check for projects in set_project --- R/editEMLfunctions.R | 164 +++++++++++++++++++++++++++++++------------ 1 file changed, 120 insertions(+), 44 deletions(-) diff --git a/R/editEMLfunctions.R b/R/editEMLfunctions.R index 607b738..8596c14 100644 --- a/R/editEMLfunctions.R +++ b/R/editEMLfunctions.R @@ -1340,8 +1340,9 @@ set_language <- function(eml_object, lang, force = FALSE, NPS = TRUE) { #' #' @inheritParams set_title #' @param protocol_id a string. The 7-digit number identifying the DataStore reference number for the Project that describes your inventory or monitoring project. +#' @param dev Logical. Defaults to FALSE, meaning all API calls will be to the production version of DataStore. To test the function, set dev = TRUE to use the development environment for DataStore. #' -#' @return emlObject +#' @return eml_object #' @export #' #' @examples @@ -1351,56 +1352,108 @@ set_language <- function(eml_object, lang, force = FALSE, NPS = TRUE) { #' set_protocol <- function(eml_object, protocol_id, + dev = FALSE, force = FALSE, NPS = TRUE) { - ###### WARNING ###### - # this function actually puts info into the project and not protocl - # needs re-written and soon. + # test for properly formatted protocolID + if (nchar(project_reference_id) != 7) { + cat("You must supply a valid 7-digit protocol_id") + stop() + } - # get data to construct project: + if (dev == TRUE) { + get_url <- paste0(.ds_dev_api(), + "Profile?q=", + protocol_id) + } else { + get_url <- paste0(.ds_api(), + "Profile?q=", + protocol_id) + } - # get protocol profile via rest services: - ds_reference <- httr::content(httr::GET(paste0(.ds_api(), - "Profile/", - protocol_id))) + req <- httr::GET(get_url, + httr::authenticate(":", "", "ntlm"), + httr::add_headers('Content-Type'='application/json')) + + status_code <- httr::stop_for_status(req)$status_code + if(!status_code == 200){ + stop("ERROR: DataStore connection failed. Are you logged in to the VPN?\n") + } + + #get project information: + json <- httr::content(req, "text") + rjson <- jsonlite::fromJSON(json) + + #does reference exist/can user access it - errors are indistinguishable + if (length(seq_along(rjson)) == 0) { + permissions_msg <- paste0("The reference does not exist", + " or you do not have permissions to access it.") + cat(permissions_msg) + stop() + } # extract project title - proj_title <- ds_reference$bibliography$title + protocol_title <- rjson$bibliography$title + + # get creator + protocol_creator <- rjson$history$createdBy + protocol_creator <- stringr::str_remove(protocol_creator, "@nps.gov") + + #generate URL (check whether project has DOI) + if (dev == TRUE) { + get_url <- paste0(.ds_dev_api(), + "ReferenceCodeSearch?q=", + project_reference_id) + } else { + get_url <- paste0(.ds_api(), + "ReferenceCodeSearch?q=", + project_reference_id) + } - # generate URL for the DataStore landing page: - url <- paste0("https://irma.nps.gov/DataStore/Reference/Profile/", - protocol_id) + req2 <- httr::GET(get_url, + httr::authenticate(":", "", "ntlm"), + httr::add_headers('Content-Type'='application/json')) - # get DataStore ref number for the organization Name: - ref <- ds_reference$series$referenceId + status_code <- httr::stop_for_status(req2$status_code) + if (!status_code == 200) { + stop("ERROR: DataStore connection failed. Are you logged in to the VPN?\n") + } - # rest services call to get organization name info: - org_name <- httr::content( - httr::GET(paste0(.ds_api(), "Profile/", ref)))$bibliography$title + #get project information: + json2 <- httr::content(req2, "text") + rjson2 <- jsonlite::fromJSON(json2) + project_url <- NULL + if (rjson2$isDOI == "True") { + protocol_url <- paste0("https://doi.org/10.57830/", protocol_id) + } else { + protocol_url <- rjson2$referenceUrl + } - proj <- list( - title = proj_title, - personnel = list( - organizationName = org_name, - onlineUrl = url, - role = "originator" + #build protocol element: + proto <- list( + title = protocol_title, + creator = list( + individualName = list( + surName = protocol_creator)), + distribution = list( + online = protocol_url) ) - ) + # scripting route: if (force == TRUE) { - eml_object$dataset$project <- proj + eml_object[["protocol"]] <- proto } # interactive route: if (force == FALSE) { # get existing project (if any) - doc <- eml_object$dataset$project + exist_proto <- eml_object$dataset$protocol # if no previous project listed, add project - if (is.null(doc)) { - eml_object$dataset$project <- proj - cat("The current project is now ", crayon::bold$blue(proj$title), + if (is.null(exist_proto)) { + eml_object$protocol <- list(proto) + cat("The current protocol is now ", crayon::bold$blue(proto$title), ".", sep = "" ) @@ -1408,24 +1461,24 @@ set_protocol <- function(eml_object, # if an there is an existing project, ask whether to replace: else { - cat("you already have a project(s) with the Title:\n", - crayon::bold$blue(doc$title), ".", + cat("you already have a protocol(s) with the Title:\n", + crayon::bold$blue(exist_proto$title), ".", sep = "" ) cat("Are you sure you want to replace it?\n\n") var1 <- .get_user_input() #1=yes, 2=no # if yes, change the project: if (var1 == 1) { - eml_object$dataset$project <- proj - cat("The current project is now ", - crayon::bold$blue(proj$title), ".", + eml_object$protocol <- list(proto) + cat("The current protocol is now ", + crayon::bold$blue(proto$title), ".", sep = "" ) } # if no, retain the existing project: if (var1 == 2) { - cat("Your original project was retained.") + cat("Your original protocol was retained.") } } } @@ -1442,11 +1495,11 @@ set_protocol <- function(eml_object, #' Adds a reference to the DataStore Project housing the data package #' #' @description -#' **This function is still under development - do not use ** The function will add the project title and URL to the metadata corresponding to the DataStore Project reference that the data package should be linked to. Upon EML extraction on DataStore, the data package will automatically be added to the project indicated. +#' The function will add the project title and URL to the metadata corresponding to the DataStore Project reference that the data package should be linked to. Upon EML extraction on DataStore, the data package will automatically be added to the project indicated. #' #' @details The person uploading and extracting the EML must be an owner on both the data package and project references in order to have the correct permissions for DataStore to create the desired link. #' -#' If you list more than one project, the data package will be added to multiple projects. +#' Currently, the function only supports one project. Using the function will replace an project(s) currently in metadata, not add to them. If you want your data package linked to multiple projects, you will have to manually perform the additional linkages via the DataStore web GUI. #' #' DataStore only add links between data packages and projects. DataStore cannot not remove data packages from projects. If need to remove a link between a data package and a project (perhaps you supplied the incorrect project reference ID at first), you will need to manually remove the connection using the DataStore web interface. #' @@ -1459,7 +1512,6 @@ set_protocol <- function(eml_object, #' #' @examples #' \dontrun{ -#' #this function is still under development - do not use! #' eml_object <- set_project(eml_object, #' 1234567) #' } @@ -1497,6 +1549,14 @@ set_project <- function(eml_object, json <- httr::content(req, "text") rjson <- jsonlite::fromJSON(json) + # if it doesn't exist or permissions are invalid: + if (length(seq_along(rjson)) == 0) { + cat("The project reference (", + project_reference_id, + ") does not exist or you do not have permissions to access it.") + stop() + } + # make sure the project_reference_id is a project: if (rjson$referenceType != "Project") { cat("The reference you supplied", @@ -1506,9 +1566,25 @@ set_project <- function(eml_object, stop() } - # be great to test for ownership....but currently reference owners are - # listed by email address rather than username so it is hard/impossible - # to verify that the email address belongs to the user + #test whether user has ownership permissions for the project. + #only run this test if NPS is true and force is false: + if (NPS == TRUE && force == FALSE) { + email <- QCkit::get_user_email() + ownership <- rjson$permissions$referenceOwners + + if (sum(grepl(email, ownership)) < 1) { + cat(crayon::bold$yellow("WARNING: "), + crayon::bold$blue(email), + " is not listed as an owner for project (reference ", + crayon::bold$blue(project_reference_id), ").", + sep = "") + alert <- paste0("The person uploading to DataStore and extracting the ", + "metadata must have ownership-level permissions to ", + "succesfully link the data package to it's project.") + cat(alert) + cat("Project owners can add new owners via the DataStore GUI") + } + } #project title project_title <- rjson$bibliography$title @@ -1587,7 +1663,7 @@ set_project <- function(eml_object, #' @param for_or_by_NPS Logical. Defaults to TRUE. If your digital product is NOT for or by the NPS, set to FALSE. #' @param NPS Logical. Defaults to TRUE. Set this to FALSE only if the party responsible for data collection and generation is *not* the NPS *or* the publisher is *not* the NPS central office in Fort Collins. #' -#' @return emlObject +#' @return eml_object #' @export #' #' @examples @@ -2411,7 +2487,7 @@ set_creator_orgs <- function(eml_object, #' @param organization_name String (or list of strings). The organizational affiliation of the creator(s) to add, e.g. "National Park Service". Use NA if there is no organizational affiliation. #' @param email_address String (or list of strings). The email address(es) of the creator(s) to add. Use NA if there are no email addresses. #' -#' @return emlobject +#' @return eml_object #' @export #' #' @examples From 0bf49c2f17d13a89aa741fa69de0ba7fbf908960 Mon Sep 17 00:00:00 2001 From: Rob Baker Date: Wed, 10 Jul 2024 12:21:19 -0600 Subject: [PATCH 03/10] update set_protocol --- R/editEMLfunctions.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/R/editEMLfunctions.R b/R/editEMLfunctions.R index 8596c14..81d4f88 100644 --- a/R/editEMLfunctions.R +++ b/R/editEMLfunctions.R @@ -1393,14 +1393,14 @@ set_protocol <- function(eml_object, stop() } - # extract project title + # extract protocol title protocol_title <- rjson$bibliography$title # get creator protocol_creator <- rjson$history$createdBy protocol_creator <- stringr::str_remove(protocol_creator, "@nps.gov") - #generate URL (check whether project has DOI) + #generate URL (check whether protocol has DOI) if (dev == TRUE) { get_url <- paste0(.ds_dev_api(), "ReferenceCodeSearch?q=", @@ -1459,7 +1459,7 @@ set_protocol <- function(eml_object, ) } - # if an there is an existing project, ask whether to replace: + # if an there is an existing protocol, ask whether to replace: else { cat("you already have a protocol(s) with the Title:\n", crayon::bold$blue(exist_proto$title), ".", @@ -1497,7 +1497,7 @@ set_protocol <- function(eml_object, #' @description #' The function will add the project title and URL to the metadata corresponding to the DataStore Project reference that the data package should be linked to. Upon EML extraction on DataStore, the data package will automatically be added to the project indicated. #' -#' @details The person uploading and extracting the EML must be an owner on both the data package and project references in order to have the correct permissions for DataStore to create the desired link. +#' @details The person uploading and extracting the EML must be an owner on both the data package and project references in order to have the correct permissions for DataStore to create the desired link. If you have set NPS = TRUE and force = FALSE (the default settings), the function will also test whether you have owner-level permissions for the project which is necessary for DataStore to automatically connect your data package with the project. #' #' Currently, the function only supports one project. Using the function will replace an project(s) currently in metadata, not add to them. If you want your data package linked to multiple projects, you will have to manually perform the additional linkages via the DataStore web GUI. #' @@ -1575,7 +1575,7 @@ set_project <- function(eml_object, if (sum(grepl(email, ownership)) < 1) { cat(crayon::bold$yellow("WARNING: "), crayon::bold$blue(email), - " is not listed as an owner for project (reference ", + " is not listed as an owner for the project (reference ", crayon::bold$blue(project_reference_id), ").", sep = "") alert <- paste0("The person uploading to DataStore and extracting the ", From f13ace2f3cee6f0628b010b08e5787b6803c1733 Mon Sep 17 00:00:00 2001 From: Rob Baker Date: Wed, 10 Jul 2024 13:09:25 -0600 Subject: [PATCH 04/10] attempts at getting set_protocol to produce valid EML. Still failing. Added lifecycle::experimental badge and a warning to the function description. --- R/editEMLfunctions.R | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/R/editEMLfunctions.R b/R/editEMLfunctions.R index 81d4f88..7e73c3a 100644 --- a/R/editEMLfunctions.R +++ b/R/editEMLfunctions.R @@ -1334,9 +1334,13 @@ set_language <- function(eml_object, lang, force = FALSE, NPS = TRUE) { #' Adds a connection to the protocol under which the data were collected #' -#' @description set_protocol adds a metadata link to the protocol under which the data being described were collected. It automatically inserts a link to the DataStore landing page for the protocol as well as ????? +#' @description +#' `r lifecycle::badge("experimental")` +#' This function is currently under development. If you use it, it will break your EML. You've been warned. +#' +#' set_protocol adds a metadata link to the protocol under which the data being described were collected. It automatically inserts a link to the DataStore landing page for the protocol as well as the protocol title and creator. #' -#' @details set_protocol requires that you have your protocols and projects organized in a specific fashion in DataStore. Errors generated by this function may stem from either a protocol that has not been published (or is not publicly available) or an obsolete protocol/project organization within DataStore. +#' @details Because protocols can be published to DataStore using a number of different reference types, set_protocol does not check to make sure you are actually supplying a the reference ID for a protocol (or the correct protocol). #' #' @inheritParams set_title #' @param protocol_id a string. The 7-digit number identifying the DataStore reference number for the Project that describes your inventory or monitoring project. @@ -1438,12 +1442,12 @@ set_protocol <- function(eml_object, individualName = list( surName = protocol_creator)), distribution = list( - online = protocol_url) - ) + online = list( + url = protocol_url))) # scripting route: if (force == TRUE) { - eml_object[["protocol"]] <- proto + eml_object$protocol <- proto } # interactive route: if (force == FALSE) { @@ -1452,7 +1456,7 @@ set_protocol <- function(eml_object, # if no previous project listed, add project if (is.null(exist_proto)) { - eml_object$protocol <- list(proto) + eml_object$protocol <- proto cat("The current protocol is now ", crayon::bold$blue(proto$title), ".", sep = "" From b92ea4c5382ef7e0158ba1480b457f123a9c811e Mon Sep 17 00:00:00 2001 From: Rob Baker Date: Wed, 10 Jul 2024 13:16:11 -0600 Subject: [PATCH 05/10] updated from MIT to CC0 --- LICENSE.md | 64 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 21 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 4ca93f9..139c68e 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,21 +1,43 @@ -# MIT License - -Copyright (c) 2022 EMLeditor authors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +## creative commons + +# CC0 1.0 Universal + +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER. + +### Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights. + +1. __Copyright and Related Rights.__ A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + + iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work; + + iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; + + v. rights protecting the extraction, dissemination, use and reuse of data in a Work; + + vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and + + vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof. + +2. __Waiver.__ To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose. + +3. __Public License Fallback.__ Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose. + +4. __Limitations and Disclaimers.__ + + a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. + + b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. + + c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. + + d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work. From 0675f8976b0b4b6e3393fd7b019c91e5f5782fc6 Mon Sep 17 00:00:00 2001 From: Rob Baker Date: Wed, 10 Jul 2024 13:16:32 -0600 Subject: [PATCH 06/10] add updates about set_project, set_protocol, and license to CC0 --- NEWS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS.md b/NEWS.md index 4ce1803..d9cd954 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,7 @@ # EMLeditor v0.1.6 (in progress) +## 2024-07-10 + * add in the new function `set_project()` and attempt to update existing function, `set_protocol()`. + * update license from MIT to CC0. ## 2024-07-02 * updated all API requests to user v6 API instead of v7. ## 2024-07-01 From dc6faf6a79ca2082889000418065713ff7260972 Mon Sep 17 00:00:00 2001 From: Rob Baker Date: Wed, 10 Jul 2024 13:17:11 -0600 Subject: [PATCH 07/10] auto update via devtools::document and pkgdown --- docs/LICENSE.html | 44 +++++++++++++++++++++++------ docs/index.html | 2 +- docs/news/index.html | 6 ++-- docs/pkgdown.yml | 2 +- docs/reference/set_new_creator.html | 2 +- docs/reference/set_project.html | 9 +++--- docs/reference/set_protocol.html | 20 +++++++++---- docs/reference/set_publisher.html | 2 +- docs/search.json | 2 +- man/set_new_creator.Rd | 2 +- man/set_project.Rd | 7 ++--- man/set_protocol.Rd | 13 ++++++--- man/set_publisher.Rd | 2 +- 13 files changed, 78 insertions(+), 35 deletions(-) diff --git a/docs/LICENSE.html b/docs/LICENSE.html index 7e4f9eb..977fe0a 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -1,5 +1,5 @@ -MIT License • EMLeditorCC0 1.0 Universal • EMLeditor @@ -50,19 +50,47 @@
-
-

Copyright (c) 2022 EMLeditor authors

-

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

-

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

-

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+
+

creative commons

+
+ +

CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN “AS-IS” BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.

+
+

Statement of Purpose

+

The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an “owner”) of an original work of authorship and/or a database (each, a “Work”).

+

Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works (“Commons”) that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.

+

For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the “Affirmer”), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.

+
  1. +

    Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights (“Copyright and Related Rights”). Copyright and Related Rights include, but are not limited to, the following:

    +
    1. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;

    2. +
    3. moral rights retained by the original author(s) and/or performer(s);

    4. +
    5. publicity and privacy rights pertaining to a person’s image or likeness depicted in a Work;

    6. +
    7. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;

    8. +
    9. rights protecting the extraction, dissemination, use and reuse of data in a Work;

    10. +
    11. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and

    12. +
    13. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.

    14. +
  2. +
  3. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer’s Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the “Waiver”). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer’s heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer’s express Statement of Purpose.

  4. +
  5. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer’s express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer’s Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the “License”). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer’s express Statement of Purpose.

  6. +
  7. +

    Limitations and Disclaimers.

    +
    1. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.

    2. +
    3. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.

    4. +
    5. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person’s Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.

    6. +
    7. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.

    8. +
  8. +
+
+ -
+