Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add creator support #302

Merged
merged 6 commits into from
Oct 4, 2024

Conversation

hcvdwerf
Copy link
Contributor

@hcvdwerf hcvdwerf commented Sep 9, 2024

Add Creator Support to DCAT Extension

This PR introduces functionality for managing and displaying creator information in datasets, aligning with the DCAT vocabulary. Key additions include:

  • Creator Fields: Similar to the publisher, we now support creator metadata fields:

    • creator_name: The name of the dataset creator.
    • creator_email: The creator's email address.
    • creator_url: The homepage or URL related to the creator.
    • creator_identifier: A unique identifier for the creator, such as an ORCID or other URI.
  • RDF Serialization/Deserialization:

    • Updated the RDF serializer to include creator fields in the dataset's RDF output.
    • Ensured proper handling of the new fields during both data import and export.
  • Unit Tests:

    • Extended existing tests to verify the correct inclusion of the creator in the RDF graph.
    • Added new tests to cover all edge cases for creator metadata, including missing or partial data.

This enhancement aligns with the ongoing efforts to ensure full support for the DCAT-AP 2/3 profiles in CKAN's DCAT extension and improves metadata expressiveness by adding proper attribution for dataset creators.

Hans-Chrstian added 5 commits September 9, 2024 15:38
- Introduced creator fields (URI, name, email, URL, type, identifier) alongside publisher fields.
- Updated the RDF graph serialization to include creator details.
- Extended existing tests to validate the creator functionality.
- Applied similar fallback logic for creator as used for publisher.
@hcvdwerf hcvdwerf marked this pull request as ready for review September 12, 2024 19:39
@hcvdwerf
Copy link
Contributor Author

@amercader Do you have time to review this one? Thanks in advance!

@amercader
Copy link
Member

Thanks for this @hcvdwerf , I have many open fronts but will get to this eventually!

Copy link
Member

@amercader amercader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @hcvdwerf , forgot to push the green button on these comments. Just some minor things and we are good to go

("notes", DCT.description),
("url", DCAT.landingPage),
("version", OWL.versionInfo),
("title", DCT.title),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't include formatting changes like these ones

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check

help_text: Entity responsible for making the dataset available.

- field_name: creator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

creator was not part of the recommended properties in DCAT AP 2 so let's keep it just in the full schema.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check

"title": ""}]
"creator": {
"name": "John Doe",
"mbox": "[email protected]"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be "email" as per the definition in the schema files, and the publisher above is wrong too. mbox was used in a really ancient parser no longer supported

Suggested change
"mbox": "[email protected]"
"email": "[email protected]"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check

- Added fields to store creator details (name, email, URL, and identifier) in the DCAT profile.
- Implemented functionality to serialize and deserialize creator information similar to the publisher.
- Updated RDF generation logic to include creator fields in the output graph.
- Enhanced unit tests to verify proper handling and serialization of creator metadata.
Copy link
Contributor Author

@hcvdwerf hcvdwerf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amercader Thank you for your comments, @amercader! I’ve made adjustments to the code based on your feedback.

help_text: Entity responsible for making the dataset available.

- field_name: creator
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check

("notes", DCT.description),
("url", DCAT.landingPage),
("version", OWL.versionInfo),
("title", DCT.title),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check

"title": ""}]
"creator": {
"name": "John Doe",
"mbox": "[email protected]"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check

@amercader amercader merged commit 0c5b294 into ckan:master Oct 4, 2024
4 checks passed
@amercader
Copy link
Member

Thanks @hcvdwerf , nice one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants