ohdsi-studies / PioneerWatchfulWaiting

This study is part of the joint PIONEER - EHDEN - OHDSI studyathon in March 2021, and aims to advance understanding of clinical management and outcomes of watchful waiting in prostate cancer.
Apache License 2.0
7 stars 18 forks source link

codemeta.json doesn't exist #54

Closed peterprinsen-iknl closed 3 years ago

peterprinsen-iknl commented 3 years ago

cohortDiagnosticsLog.txt

See log file, runCohortDiagnostics wants to write to diagnostics/codemeta.json but cannot open file

bdemeulder commented 3 years ago

@MaximMoinat @denyskaduk I'm not sure how to fix this one.

MaximMoinat commented 3 years ago

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.

keesvanbochove commented 3 years ago

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.

keesvanbochove commented 3 years ago

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