Skip to content

check_package() should show deprecation for (old) datapackage objects #293

@peterdesmet

Description

@peterdesmet

check_package() now expects the attr(package, "directory") attribute rather than the package$directory property. As a result, older/stored package objects return an error, since they don't pass the check_package() validation (when calling print() or any frictionless function):

> movepub::o_assen
Error in `check_package()`:
! `package` must be a Data Package object.
✖ `package` is missing a directory attribute or it is not a character.
ℹ Create a valid Data Package object with `read_package()` or `create_package()`.
Run `rlang::last_trace()` to see where the error occurred.

This is confusing/annoying for the user, since the package object was valid when it was created. check_package() should more gracefully handle (old) objects that have package$directory rather than the attr(package, "directory"), e.g. by showing a deprecation warning (once) but pass validation.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions