Changes for users
- New
version()determines what version of the Data Package standard is used by a Data Package (e.g."1.0","2.0",">=2.0"), based on the presence and value of the$schemaproperty (#299). This information is also returned byprint()(#302). read_package()now warns when reading adatapackage.jsonthat uses a version of the Data Package standard not supported by frictionless (i.e. anything other than version"1.0") (#309).read_resource()no longer guesses the type for fields without atype, but sets it to character (the default for a CSV). This aligns with a clarification in the specification (#296).read_resource()now supports reading from remote zip files, thanks to support in{vroom}(1.3.0) (#291).add_resource()withreplace = TRUEadds the resource if there is none to replace, rather than throwing an error (#273).add_resource()now retains the URL to a provided schema, rather than including it verbosely (#305).write_package()'s overwrite behavior is now as intended and documented in the function (#304, #313).write_package()now prints multipleresource$path,resource$schema$missingValuesandfield$constraints$enumon multiple lines in thedatapackage.json(#297).resources()is soft-deprecated, please useresource_names()instead (#282).get_schema()is soft-deprecated, please useschema()instead (#282).
Changes for developers
-
frictionless now relies on R >= 4.1.0 (because of an indirect
{vroom}dependency) (#291) and uses base pipes (|>rather than%>%) (#292). -
resource()is now a public function, making it possible to get a resource object (i.e. a list) by its name. This is especially useful if you want to implement reading functionality not supported by frictionless (#303). -
New
resource()<-allows to overwrite a resource in place (#314). -
Internal frictionless properties
package$directoryandresource$read_fromare now attributesattr(package, "directory")andattr(resource, "data_location"). This separates them better from public Data Package and Resource properties (#289). Saved Data Package objects created with previous versions of frictionless will show a deprecation warning (#293) and can be updated withcreate_package(). If you use these internal properties in your R package, then change them:# Before package$directory resource <- frictionless:::get_resource(package, "resource_name") # Internal function resource$read_from # After attr(package, "directory") resource <- frictionless:::resource(package, "resource_name") # Function renamed attr(resource, "data_location") # Attribute renamed
Bug fixes
- Single element arrays (e.g.
"key": ["value"]) in adatapackage.jsonfile are now retained when reading and writing (#276).