Skip to content

add function test_datatable_url_attributes#172

Merged
RobLBaker merged 15 commits intonationalparkservice:mainfrom
RobLBaker:main
Apr 25, 2025
Merged

add function test_datatable_url_attributes#172
RobLBaker merged 15 commits intonationalparkservice:mainfrom
RobLBaker:main

Conversation

@RobLBaker
Copy link
Copy Markdown
Member

Also add unit tests for test_datatable_urls, test_datatable_urls_doi and test_datatable_url_attributes

Closes #171

@RobLBaker RobLBaker added the enhancement New feature or request label Apr 24, 2025
@RobLBaker RobLBaker self-assigned this Apr 24, 2025
@wright13 wright13 self-requested a review April 24, 2025 17:46
.gitignore Outdated
Comment on lines +2 to +5
.Rhistorygood_dir <- test_path("good")
bad_dir <- test_path("bad")
bicy_meta <- load_metadata(test_path("good", "BICY_good"))
buis_meta <- load_metadata(test_path("good", "BUIS_good"))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this might have been mistakenly pasted here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, not sure how that happened... hold on...

suffix <- stringr::str_sub(url, -7, -1)

if(!prefix == "https://irma.nps.gov/DataStore/Reference/Profile/") {
cli::cli_warn(c("!" = "One or more data table URL attributes in metadata is set to \"informatoion\" but the URL supplied is not a DataStore reference profile. Please check that the URL goes to the appropriate page and it is not a direct download link for the data file."))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in "information"

Copy link
Copy Markdown
Collaborator

@wright13 wright13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I found one typo that needs to be fixed but I think you're good to merge after that

@RobLBaker RobLBaker merged commit 6ab8153 into nationalparkservice:main Apr 25, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add tests for appropriate attribute tags in the url element of metatdata for data table distribution

2 participants