Closed peterprinsen-iknl closed 3 years ago
@MaximMoinat @denyskaduk I'm not sure how to fix this one.
Will look into it. @peterprinsen-iknl This is not a blocking thing, as it just adds metadata. For now, you can manually zip the files in NCR/diagnostics and share the results.
What version of the codemetar
package do you have installed @peterprinsen-iknl?
It's supposed to use the pkg argument to find the package and use the path argument for file name, but from your output it looks like both are concatenated to create the file name. (see https://github.com/ohdsi-studies/PioneerWatchfulWaiting/blob/94ab4ef00a74b72c30b19f9d68049b7b8f745d2c/R/CohortDiagnostics.R#L117, we could also try to simplify the first line to pkg = getThisPackageName()
and see what file it tries to write then.
Update: looking at the source code, codemetar
actually seems to be expecting that we only write this JSON metadata directly to the package it refers to. Which makes sense in a way, the package metadata shouldn't change if you don't the change the package. Maybe it's better if we leave this code out and either copy the existing codemeta if we want to supply the full metadata, or write a simpler JSON-LD metadata file that only includes a version number. See https://github.com/ropensci/codemetar/blob/2ce74563e89d9b053ffc2b3308c517ce40fddb41/R/write_codemeta.R#L77
cohortDiagnosticsLog.txt
See log file, runCohortDiagnostics wants to write to diagnostics/codemeta.json but cannot open file