LivingNorway / TheDataPackage

Template for data archive structure and suggestive workflow
Creative Commons Zero v1.0 Universal
0 stars 2 forks source link

c::r for build_folder_structure function #8

Open softloud opened 4 years ago

softloud commented 4 years ago

image

objective

Create legacy data structure in working directory.

input

Project name

output

A metadata structure.

Testing this will involve some experimentation, as I am unsure of where to write the file structure to in testing directories.

softloud commented 4 years ago
softloud commented 4 years ago

Created a test file

context("file structure")
library(neet)

build_folder_structure("test-build-dirs")

And this gives

test-legacy-data-structure.R:4: error: (unknown)
The template 'minimum_metadata' was not found in the TheDataPackage package
Backtrace:
 1. TheDataPackage::build_folder_structure("test-build-dirs") tests/testthat/test-legacy-data-structure.R:4:0
 2. rmarkdown::draft(...) R/build_folder_structure.R:21:4

So, we have some troubleshooting to do to figure out how to test this building file. Does it require it to be an rproject?

DrMattG commented 4 years ago

@softloud I am getting error message about "here" - that it cant find the library (it is there I have checked!) Also when I run the test_neet it does create a file with the minimum_metadata.rmd in it but still gives me an error message.....

softloud commented 4 years ago

Might be that here:: wasn't listed as a dependency for the package. I patched that with the above commit.