Closed FredrikKarlssonSpeech closed 3 years ago
Awesome! Really excited about this! Thanks heaps! Unfortunately, I won't get around to reviewing it for a few days because I still have quite a few important things pending. Will get back to you once I have had a look...
No hurry. I am just pleased with having this done and working. Migration of my tests to a form where they did not mess up all the other tests in the package was more of a challenge than I anticipated so I hope I have managed to sort it now. :-)
In one of the @example blocks you have a function called articulator:::make_dummy_metafiles(ae)
Do you maybe have those meta files anywhere? If so could you send them to me? BTW all of the test and checks are now passing. Strangely enough there was a comma missing in one of the file.path() commands which caused the tests to break...
Yes, sorry. That function is in the file "helpers_emuR-metadata.R" in tests/testthat.
Perhaps its best to just move that function from the test helpers to a non-exported function in emuR then? And instead call emuR:::make_dummy_metafiles(ae) in the @example block?
Using :::
is generally not a good idea (CRAN also wouldn't like it I don't think). I'd prefer to maybe move that functionality into emuR::create_emuRdemoData( createAeMetaDataFiles=TRUE) (false default) but I'll have to think about it some more. Will look at this some more over the next few days.
Actually, the examples were put together before I added the add_metadata function. Now, you could easily rewrite them so that only exposed functions are used. And, they are more illustrative too (I think). I just pushed a new commit to my clone of your repo and hope you will able to fetch that one instead?
I orginally developed this functionality within a separate package, but has now worked into emuR. It passes testing within Rstudio and build fine, but "check" fails on my local machine, but the code that fails seems to be unrelated to the metadata functionality.
Metadata may be set for per bundle or for an entire session in "meta_json"-files. Session level metadata will be overwritten by information set in a bundle meta_json (but only for that bundle then of course).
Metadata may be edited manually by using the export_metadata and import_metadata functions, and Excel (or a similar product) for manual editing of the intermediate file.
The user may get the metadata associated with a segment list using bibliographize() in a tidy manner
This code addresses the issue #130 and part 1 of #222 (the second part may not be needed I am thinking now).