mrc-ide / orderly2

https://mrc-ide.github.io/orderly2/
Other
7 stars 2 forks source link

orderly_artefact() requires description vs. orderly_resource() only file list #150

Open jeffeaton opened 3 months ago

jeffeaton commented 3 months ago

On using orderly2 with R function declarations, the arguments feel somewhat incongruous:

Is there a conceptual reason why an artefact needs a description (rather than only requiring declaration of the files)?

Intuitive harmonised interface for me:

Maybe there's a reason that doesn't make sense

richfitz commented 3 months ago

No, this makes sense, and should only be minimally disruptive if we make it right now. The reason for the existing behaviour was it mirrored the previous yaml most closely

richfitz commented 3 months ago

So, looking further - it will be easy enough to make the description of artefact optional, though this will require a period of adjustment before we can change the argument order, based on patterns of usage.

It's a bit harder to get descriptions added to resource and dependency though, because of the way these are stored in the final metadata. We can change this, but it's a more disruptive change than I would like to do lightly, even if things are still new, partly because nobody previously asked for this in orderly1 (so it's not clear that it would warrant the disruption). I'll get onto making this optional for artefacts though...

plietar commented 2 months ago

While we are at it, it might be worth changing orderly_shared_resource to take a ~list~ vector of files as well, instead of a .... This had come up when I was doing #136.