Closed damianooldoni closed 4 months ago
I think the check function itself should be provided by camtrapdp. I just created this issue: https://github.com/inbo/camtrapdp/issues/21
I'm a bit curious why you want to check the version of the object. The version will be assigned to the camtrapdp object by read_camtrap_dp()
, it won't change in your env after that.
Because of #298.
I agree it's within the spirit of "fail early" to check if the object offered to camtraptor is actually a camtrapdp.
However, we need to keep in mind that some users might want to create a camtrapdp object manually in memory, so I would keep it as simple as possible.
So maybe check for the class but not the version?
Update: we decided to reexport reading functionlality of camtrapdp in camtraptor version 1.0, so the camtrap DPs will be checked while reading them using the camtraptor function read_camtrapdp()
. No need to add extra specific checks at the moment.
camtraptor will not support reading functionalities. All its functions where a Camtrap DP is passed as argument should implement two checks:
c("camtrapdp" "list")
attributes(dp)
) is one of the supported versions: we will support version 1.0.