Skip to content

Commit a92bd6d

Browse files
committed
convert references from elm to paperbark
Also add `corella` and `paperbark` to Remotes in DESCRIPTION
1 parent 1edf7d1 commit a92bd6d

15 files changed

+36
-37
lines changed

DESCRIPTION

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ Imports:
2727
corella,
2828
curl,
2929
dplyr,
30-
elm,
3130
glue,
3231
httr2,
3332
jsonlite,
33+
paperbark,
3434
potions,
3535
purrr,
3636
readr,
@@ -45,6 +45,9 @@ Suggests:
4545
rmarkdown,
4646
testthat (>= 3.0.0),
4747
xml2
48+
Remotes:
49+
AtlasOfLivingAustralia/corella
50+
AtlasOfLivingAustralia/paperbark
4851
License: MPL-2.0
4952
URL: https://galaxias.ala.org.au
5053
BugReports: https://github.com/AtlasOfLivingAustralia/galaxias/issues

NAMESPACE

+4-5
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ importFrom(dplyr,mutate)
2828
importFrom(dplyr,pull)
2929
importFrom(dplyr,select)
3030
importFrom(dplyr,slice_head)
31-
importFrom(elm,add_eml_header)
32-
importFrom(elm,check_eml)
33-
importFrom(elm,read_md)
34-
importFrom(elm,use_metadata)
35-
importFrom(elm,write_eml)
3631
importFrom(glue,glue)
3732
importFrom(glue,glue_collapse)
3833
importFrom(httr2,req_body_multipart)
@@ -43,6 +38,10 @@ importFrom(httr2,request)
4338
importFrom(httr2,resp_body_json)
4439
importFrom(jsonlite,toJSON)
4540
importFrom(jsonlite,unbox)
41+
importFrom(paperbark,check_eml)
42+
importFrom(paperbark,read_md)
43+
importFrom(paperbark,use_metadata)
44+
importFrom(paperbark,write_eml)
4645
importFrom(potions,brew)
4746
importFrom(potions,pour)
4847
importFrom(purrr,map)

R/build_archive.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
#' altered to use Darwin Core terms as column headers. See the `corella`
1717
#' package for details.
1818
#' * A metadata statement, stored in xml using the filename `eml.xml`. The
19-
#' function `use_metadata()` from the `elm` package is a good starting point
20-
#' here, followed by `build_metadata()` to save it in xml.
19+
#' function `use_metadata()` from the `paperbark` package is a good starting
20+
#' point here, followed by `build_metadata()` to save it in xml.
2121
#' * A 'schema' document, also stored in xml, called `meta.xml`. This is
2222
#' usually constructed using `build_schema()`.
2323
#'
@@ -135,7 +135,7 @@ find_data <- function(directory,
135135

136136
if(!file.exists(glue("{directory}/eml.xml"))){
137137
bullets <- c("No metadata statement ({.file eml.xml}) is present in the specified directory.",
138-
i = "See `elm::use_metadata()` for an example metadata statement.",
138+
i = "See `paperbark::use_metadata()` for an example metadata statement.",
139139
i = "Use `build_metadata()` to convert to {.file eml.xml}.")
140140
cli_abort(bullets,
141141
call = call)

R/build_metadata.R

+5-9
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@
66
#' specified using the `directory` argument.
77
#'
88
#' This function is a fairly shallow wrapper on top of functionality build
9-
#' in the `elm` package, particularly `read_md()` and `write_eml()`. You can
9+
#' in the `paperbark` package, particularly `read_md()` and `write_eml()`. You can
1010
#' use that package to gain greater control, or to debug problems, should you
1111
#' wish.
1212
#' @param path Path to a metadata statement stored in markdown format (.md).
1313
#' @param file A file where the result should be saved. Defaults to
1414
#' `data/eml.xml`.
1515
#' @returns Does not return an object to the workspace; called for the side
1616
#' effect of building a file named `meta.xml` in the `data` directory.
17-
#' @importFrom elm add_eml_header
18-
#' @importFrom elm read_md
19-
#' @importFrom elm write_eml
17+
#' @importFrom paperbark read_md
18+
#' @importFrom paperbark write_eml
2019
#' @export
2120
build_metadata <- function(x = "data",
2221
file = "./data/eml.xml"){
@@ -26,13 +25,10 @@ build_metadata <- function(x = "data",
2625
# import file, ensure EML metadata is added, convert to XML
2726
progress_update("Reading file...")
2827
metadata_file <- read_md(x)
29-
30-
progress_update("Building xml components...")
31-
built_file <- add_eml_header(metadata_file)
32-
28+
3329
progress_update("Writing file...")
3430
write_eml(built_file, file = file)
3531

3632
cli::cli_alert_success("Metadata successfully built. Saved as {.file /data/eml.xml}.")
3733
cli::cli_progress_done()
38-
}
34+
}

R/build_schema.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#' @param file (string) A file name for the resulting schema document.
1010
#' @returns Does not return an object to the workspace; called for the side
1111
#' effect of building a file named `meta.xml` in the specified directory.
12-
#' @importFrom elm write_eml
12+
#' @importFrom paperbark write_eml
1313
#' @importFrom glue glue
1414
#' @importFrom rlang abort
1515
#' @export
@@ -231,4 +231,4 @@ add_front_matter <- function(df){
231231
)
232232
)
233233
bind_rows(front_row, df)
234-
}
234+
}

R/check_archive.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#' Check an archive against Darwin Core standards
22
#'
33
#' This is a wrapper to two other packages; schema and EML files (i.e. xml) are
4-
#' checked with the `elm` package; csv files are checked with the `corella`
4+
#' checked with the `paperbark` package; csv files are checked with the `corella`
55
#' package.
66
#' @param x (string) A directory containing the files to be published, or
77
#' optionally a `.zip` file built from the same (i.e. with `build_archive()`).
@@ -27,7 +27,7 @@ check_archive <- function(x = "data"){
2727

2828
#' Internal function to check all files
2929
#' @importFrom corella check_occurrences
30-
#' @importFrom elm check_eml
30+
#' @importFrom paperbark check_eml
3131
#' @importFrom purrr map
3232
#' @importFrom readr read_csv
3333
#' @noRd

R/galaxias-package.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#' * [build_archive()] Convert a directory to a Darwin Core Archive
2424
#'
2525
#' **Validate an archive**
26-
#' * [check_archive()] Check your archive using the `elm` and `corella` packages
26+
#' * [check_archive()] Check your archive using the `paperbark` and `corella` packages
2727
#' * [galaxias_config()] Store credentials for your API call
2828
#' * [validate_archive()] Check your archive using the GBIF 'validator' API
2929
#' * [print_validation()] Methods for displaying API responses

R/galaxias_project.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#' side-effect of building a new project or package.
1313
#' @name galaxias_project
1414
#' @order 1
15-
#' @importFrom elm use_metadata
15+
#' @importFrom paperbark use_metadata
1616
#' @importFrom usethis create_project
1717
#' @importFrom usethis use_directory
1818
#' @export
@@ -33,4 +33,4 @@ galaxias_package <- function(path, ...){
3333
create_package(path, ...)
3434
use_directory("data_raw")
3535
use_directory("data")
36-
}
36+
}

README.Rmd

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ library(galaxias)
6262
`galaxias` is part of a group of packages that help users publish data using
6363
the Darwin Core standard. The other packages are:
6464

65-
- [`corella`](https://github.com/AtlasOfLivingAustralia/corella) for converting tibbles to the required column names
66-
- [`elm`](https://github.com/AtlasOfLivingAustralia/elm) for converting markdown files to `xml`.
65+
- [`corella`](https://corella.ala.org.au) for converting tibbles to the required column names
66+
- [`paperbark`](https://paperbark.ala.org.au) for converting markdown files to `xml`.
6767

6868

6969
## Citing galaxias

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ library(galaxias)
5656
`galaxias` is part of a group of packages that help users publish data
5757
using the Darwin Core standard. The other packages are:
5858

59-
- [`corella`](https://github.com/AtlasOfLivingAustralia/corella) for
60-
converting tibbles to the required column names
61-
- [`elm`](https://github.com/AtlasOfLivingAustralia/elm) for converting
62-
markdown files to `xml`.
59+
- [`corella`](https://corella.ala.org.au) for converting tibbles to the
60+
required column names
61+
- [`paperbark`](https://paperbark.ala.org.au) for converting markdown
62+
files to `xml`.
6363

6464
## Citing galaxias
6565

man/build_archive.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/build_metadata.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/check_archive.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/galaxias-package.Rd

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vignettes/quick_start_guide.Rmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ in the data folder and remove your `data-raw` folder.
121121

122122
Darwin Core Archives use `xml` files to store two metadata files; one that
123123
describes your data and ownership, and a second that stores its' structure.
124-
We recommend using the `elm` package to manipulate these files.
124+
We recommend using the `paperbark` package to manipulate these files.
125125

126126
`build_schema()` example
127127

0 commit comments

Comments
 (0)