Add test for example and template to be valid frictionless datapackage#305
Add test for example and template to be valid frictionless datapackage#305
Conversation
jh-RLI
left a comment
There was a problem hiding this comment.
I suggest tp focus on this PR before continuing work on the other "oem content" related PR´s
Most tests are failing as you used "type": "text", instead of "type": "string",
Please also put the option of "null" if a property is not required:
"type": [
"string",
"null"
],
| "name": "id", | ||
| "description": "Unique identifier", | ||
| "type": "serial", | ||
| "type": "integer", |
There was a problem hiding this comment.
integer is okay, most times there is something wit a range of bits. There might be infinit rows in the dataset.
I think this is not relevant for this example so just a comment.
| with open(BASE_PATH / "example.json", encoding="utf-8") as f: | ||
| descriptor = json.load(f) | ||
|
|
||
| OEMETADATA_V21_EXAMPLE = Package(descriptor, basepath=str(BASE_PATH)) |
There was a problem hiding this comment.
I will have to test this as it might change how this is handled e.g. in the OEP.
There is a diff. between json.load and .loads. we should keep ".loads" and also the "rb" mode.
But as this is scoped to this version it iwll not break things ... at least for now ;)
There was a problem hiding this comment.
Maybe you handle this here already
Package(descriptor, basepath=str(BASE_PATH))
|
In general we can just merge this. But we need to check the changes to the module import functionality for example and template in all cases where we integrated oemetadata and or omi. |
Summary of the discussion
Use frictionless-py validate function in tests.
Type of change (CHANGELOG.md)
Added
Workflow checklist
Automation
Closes #290 / Part of #296
PR-Assignee
Reviewer