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

DCAT AP v3 profile #294

Merged
merged 17 commits into from
Aug 30, 2024
Merged

DCAT AP v3 profile #294

merged 17 commits into from
Aug 30, 2024

Conversation

amercader
Copy link
Member

@amercader amercader commented Aug 26, 2024

New euro_dcat_ap_3 profile with initial support for DCAT AP v3. It includes changes in the dcat:Dataset and dcat:Distribution properties.

The v3 changes are not big in themselves but the profile classes have been refactored to a more "composition" approach to make easier to extend them going forward. For each DCAT AP version there are three kinds of methods:

  • _base() methods with common properties to all versions
  • _vX() methods with properties introduced in this version and also applied to higher versions
  • _vX_only() methods with properties only applied to the current version

Tested the serializations against the official SHACL shapes (we are ignoring the same violations described in https://github.com/ckan/ckanext-dcat/pull/291for now)

Move from an inheritance approach to a more "composition" one,
separating properties handling in three kinds of methods:

* `_base()` methods with common properties to *all* versions
* `_vX()` methods with properties also applied to higher versions
* `_vX_only()` methods with properties only applied to the current
  version

So for instance, the DCAT AP 3 profile calls the following methods in
order:

```
    def graph_from_dataset(self, dataset_dict, dataset_ref):

        # Call base method for common properties
        self._graph_from_dataset_base(dataset_dict, dataset_ref)

        # DCAT AP v2 properties also applied to higher versions
        self._graph_from_dataset_v2(dataset_dict, dataset_ref)

        # DCAT AP v2 scheming fields
        self._graph_from_dataset_v2_scheming(dataset_dict, dataset_ref)

        # DCAT AP v3 properties also applied to higher versions
        self._graph_from_dataset_v3(dataset_dict, dataset_ref)

```
@amercader amercader marked this pull request as ready for review August 27, 2024 19:28
@amercader
Copy link
Member Author

Anyone interested in trying the DCAT AP v3 profile, this is ready to give it a go

Fix method call in dcat ap 3 profile, surfaced after switching the
default profile. Add changelog and update docs.
@Markus92
Copy link
Contributor

Great work @amercader !

Are there any plans for DatasetSeries support? It seems one of the most exciting (and difficult?) features of DCAT-3!

@amercader
Copy link
Member Author

amercader commented Aug 29, 2024

You nailed it at the "difficult" bit @Markus92 ! 😄
While is true that this is a feature with a lot of potential and in terms of DCAT compliance relatively straightforward, actually implementing it in CKAN is another matter as there are a lot of things to consider. I'll try to create an issue summarizing a potential implementation to gather feedback and gauge interest.

@amercader amercader merged commit 9960779 into master Aug 30, 2024
8 checks passed
@amercader amercader deleted the dcat-ap-3 branch August 30, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants