Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add test to validate generated data package #275

@peterdesmet

Description

@peterdesmet

download_acoustic_dataset() creates 5 CSV files based on get_ functions and adds a static datapackage.json file, making it a Frictionless Data Package. Changes in the get_ functions (e.g. adding a field, see #274) without updating datapackage.json would create invalid data packages.

It would therefore be good to have a test that verifies the output of download_acoustic_dataset() against its datapackage.json. That can be done using the frictionless R package, which can be added as a dev dependency.

The way I would do it is reading the datapackage and making sure no warnings occur when reading the resources.

p <- frictionless::read_package("link/to/datapackage.json")
expect_no_warning(frictionless::read_resource(p, "animals"))
expect_no_warning(frictionless::read_resource(p, "tags"))
...

Metadata

Metadata

Assignees

Labels

devImprovements to development workflow

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions