This is a discussion issue for identifying where we think package adapters to the scoringutils format should live.
The design intention here is that developers with or without our support would implement adapters for their formats into the scoringutils format and then signpost to our docs for how to work with it. This is nice as it makes there be a standard scoringutils API vs an ecosystem with potentially lots of adapters with different names, or, worse, copy and pasted code from vignettes, and a range of vignettes demonstrating scoringutils with a range of practice that may get out of date (or even worse a wrapper around score itself!)
The issue with this design is that to implement a converter package, maintainers have to depend on scoringutils (this is a hard requirement of extending a s3 method). For some packages, this isn't a huge issue as scoringutils is quite lightweight but for others I think it could be a real problem. Aside from that, there is also the perception of having an additional dependency being a problem, which we might like to avoid?
So what do we do about this?
One option is that we add converters from other package formats to scoringutils itself. Here as we are the home of the s3 generic this could be done as a suggests and so not impact our dependency tree. The downside though, is it adds code for us to support (i.e. if the package format changes the converter may break).
Another option is we spin out the s3 generic parts of the package into a lightweight package that we then depend on. This could then be a zero upstream dependency for others. However, in may cases they may want to use our tools i.e as_forecast_sample.dataframe etc which would lead back to the core package as a dependency.
A final option is we suggest maintainers make their own extension packages for scoringutils adapters if they don't want us as a dependency
I think the several packages have hit this issue i.e broom, parsnip, tidymodels etc. so understanding what they do to resolve it seems like it might be a useful path.
There are several examples of these converters in the wild:
This is a discussion issue for identifying where we think package adapters to the
scoringutilsformat should live.The design intention here is that developers with or without our support would implement adapters for their formats into the
scoringutilsformat and then signpost to our docs for how to work with it. This is nice as it makes there be a standardscoringutilsAPI vs an ecosystem with potentially lots of adapters with different names, or, worse, copy and pasted code from vignettes, and a range of vignettes demonstratingscoringutilswith a range of practice that may get out of date (or even worse a wrapper around score itself!)The issue with this design is that to implement a converter package, maintainers have to depend on
scoringutils(this is a hard requirement of extending a s3 method). For some packages, this isn't a huge issue asscoringutilsis quite lightweight but for others I think it could be a real problem. Aside from that, there is also the perception of having an additional dependency being a problem, which we might like to avoid?So what do we do about this?
One option is that we add converters from other package formats to
scoringutilsitself. Here as we are the home of the s3 generic this could be done as a suggests and so not impact our dependency tree. The downside though, is it adds code for us to support (i.e. if the package format changes the converter may break).Another option is we spin out the s3 generic parts of the package into a lightweight package that we then depend on. This could then be a zero upstream dependency for others. However, in may cases they may want to use our tools i.e
as_forecast_sample.dataframeetc which would lead back to the core package as a dependency.A final option is we suggest maintainers make their own extension packages for
scoringutilsadapters if they don't want us as a dependencyI think the several packages have hit this issue i.e
broom,parsnip,tidymodelsetc. so understanding what they do to resolve it seems like it might be a useful path.There are several examples of these converters in the wild:
scoringutilsformatEpiNow2would need to make internal breaking changes.hubevalsimplements a almost complete reimplementation ofscoringutilsin the name of them having a consistent UI.