Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix unit test data file path #152

Merged
merged 11 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
66 changes: 66 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
PKG_SYSREQS: false

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: dependencies on Linux
if: runner.os == 'Linux'
run: sudo apt-get install -y make pandoc git libssl-dev libgdal-dev gdal-bin libgeos-dev libproj-dev libsqlite3-dev libicu-dev libudunits2-dev librdf0-dev libxml2-dev libfreetype6-dev libjpeg-dev libpng-dev libtiff-dev libfontconfig1-dev libfribidi-dev libharfbuzz-dev libcurl4-gnutls-dev

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# EMLeditor v0.1.6 (in progress)
## 2024-08-20
* add helper.R file with a test_path function to facilitate unit tests
* update unit test code to run both interactively and during build checks
* add yaml file to conduct github actions: build test
## 2024-07-10
* add in the new function `set_project()` and attempt to update existing function, `set_protocol()`.
* update license from MIT to CC0.
Expand Down
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ The goal of EMLeditor is to edit EML-formatted xml files. Specifically,
EMLeditor provides many functions that will be useful to the U.S.
National Park Service when generating metadata for statistical data
packages uploaded to DataStore. NPS affiliation is assumed as default.
However, some of the functions for viewing and editing metadata may be
useful to people outside the NPS.
However, the functions for viewing and editing metadata may be useful to
people outside the NPS.

## Installation and updates

Expand Down Expand Up @@ -47,22 +47,29 @@ accompanying documentation includes information on:
package functions
2) Adding in NPS specific and DataStore specific EML elements using the
R/EMLeditor package functions
3) Checking the EML document to make sure it is schema-valid and passes
all the necessary tests for uploading to DataStore
4) Generating a draft data package reference on DataStore and
3) Generating a draft data package reference on DataStore and
incorporating DOIs into the metadata
4) Checking the EML document to make sure it is schema-valid and passes
all the necessary tests for uploading to DataStore (using the
`run_congruence_checks()` function from the
[DPchecker](https://nationalparkservice.github.io/DPchecker/)
package)
5) Uploading a completed data package to DataStore

Please *DO NOT ACTIVATE* the DataStore reference: prior to activation,
data packages need to be reviewed via a yet-to-be-created process.

## Accessing the EML creation script

To access the EML creation script from within EMLeditor, install (or
update) the EMLeditor package and restart R. From within Rstudio, select
the “File” drop-down menu and choose “New File” (the first option). From
within the “New File” menu, select “Rmarkdown…”. In the pop-up menu,
select “From Template on the left hand side. Then choose the
template,”Editable_EML_Creation_Workflow {EMLeditor}” then click “OK”.

## Additional considerations

If you use EMLeditor functions to alter your metadata (e.g. “set” class
functions) they will also silently add the National Park Service as a
publisher (including location, [ROR id](https://ror.org/), etc) to your
Expand Down
Loading
Loading