-
Notifications
You must be signed in to change notification settings - Fork 152
Description
I have found a small issue with schemaorg.py which lists the contact point of maintainer twice for both publisher and creator and ignores author in the resulting metadata.
I verified the field_names in the dataset_dict populated from the ckan_dataset.yaml default schema are:
- maintainer
- maintainer_email
- author
- author_email
However, in the graph_from_dataset method, "publisher" and "creator" are used as schema_property_prefix arguments to _agent_graph even though they do not appear as field_names in the ckan_dataset.yaml schema:
# Publisher
self._agent_graph(dataset_ref, dataset_dict, SCHEMA.publisher, "publisher")
# Creator
self._agent_graph(dataset_ref, dataset_dict, SCHEMA.creator, "creator")
I'm not a developer, so I know this is not a good solution, but for now for my use case, I have tweaked the following in the _agent_graph method which means both author and maintainer are now listed in the metadata.
if schema_property_prefix == "creator":
name_key = "author"
email_key = "author_email"
elif schema_property_prefix == "publisher":
name_key = "maintainer"
email_key = "maintainer_email"
else:
name_key = f"{schema_property_prefix}_name"
email_key = f"{schema_property_prefix}_email"
I am well aware it's really poor form to directly edit a core file so I want my fix to be temporary. Is it possible to solve this in the right way?

