-
Notifications
You must be signed in to change notification settings - Fork 149
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
Support for multiple contact points/publishers #307
Comments
Same for publisher |
@hcvdwerf The handling of multiple contact points is done via the In your example, you would only provide the URI field. As for publishers, DCAT AP 3 only allows one instance (0..1) but if you want to support multiple publishers you can remove the I'm not keen on extending support for multiple instances to the legacy harvesters using Let me know if this makes sense |
I think the issue arises during harvesting, not when entering data. If you refer to this pull request, you'll notice that the I’ve run multiple tests with various contact points, but only one is returned. Also, the For reference, you can see a class full of tests involving multiple contact points here: test_profiles.py. |
There's defintely a bug in the harvester: even though there is a for-loop, it only returns a single dict. The dict gets overwritten on every iteration. The changes in this PR make it such that a list is returned of dicts, which we understood to be the intended be intended behavior. @amercader If you'd like the legacy fields to remain as is, we can modify the PR such that it will only ever return one element in that case(publisher/contact). The only thing is you'd have no control whatsoever which publisher/contact it would be in the case of multi-valued input, as graphs are inherently out-of-order (it'd be pretty much random, or down to the used memory allocator, to determine the order they are looped over). Mark, |
@Markus92 @hcvdwerf let me have a closer look next week, but I agree that it seems like a bug in the harvester. It shouldn't matter whether a dataset was harvested, created via UI or API, all use the same DCAT -> CKAN parser
This is just used here to prevent showing the "Add more" button in the form for this particular field, but yeah, datasets created via API or harvester can have (or should have after we fix this bug) multiple publishers |
@amercader any update from your side? Tnx in advance! |
@amercader I have looked to the code and did some tests, but until now it is working. For example |
@amercader When are you planning to do a release? |
This week or the next one, once the DCAT US and multilingual PRs are merged |
DCAT-AP 3.0 makes the inclusion of multiple contacts mandatory for datasets. Specifically, the dcat:contactPoint property must be able to reference multiple contact points. This requirement aligns with the latest DCAT-AP specification.
Code I use to test
The text was updated successfully, but these errors were encountered: