Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/seedcase_sprout/extract_resource_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ def extract_resource_properties(data: pl.DataFrame) -> ResourceProperties:

resource_properties = ResourceProperties()
resource_properties.type = "table"
resource_properties.schema = TableSchemaProperties(fields_match="equal")
# The fields_match property is supposed to be a string, but there's an error in the
# JSON schema. This should be fixed in datapackage V2.1.
resource_properties.schema = TableSchemaProperties(fields_match=["equal"])
resource_properties.schema.fields = _extract_field_properties(data)

return resource_properties
Expand Down
2 changes: 1 addition & 1 deletion tests/test_extract_resource_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _keep_extractable_properties(
)

return ResourceProperties(
schema=TableSchemaProperties(fields=fields, fields_match="equal"),
schema=TableSchemaProperties(fields=fields, fields_match=["equal"]),
type="table",
)

Expand Down