Skip to content

Commit

Permalink
Default to euro_dcat_ap_3 profile
Browse files Browse the repository at this point in the history
Fix method call in dcat ap 3 profile, surfaced after switching the
default profile. Add changelog and update docs.
  • Loading branch information
amercader committed Aug 28, 2024
1 parent a77f32e commit 4ae8795
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased](https://github.com/ckan/ckanext-dcat/compare/v1.7.0...HEAD)

* New profile for [DCAT-AP v3](https://semiceu.github.io/DCAT-AP/releases/3.0.0), `euro_dcat_ap_3`, which is now
the default. Existing sites willing to stick with DCAT-AP v2.x can specify the profile in the configuration if they
are not doing so yet (`ckan.dcat.rdf.profiles = euro_dcat_ap_2`). The new `euro_dcat_ap_3` profile relies on
ckanext-scheming metadata schemas (see below).
* Support for standard CKAN [ckanext-scheming](https://github.com/ckan/ckanext-scheming) schemas.
The DCAT profiles now seamlessly integrate with fields defined via the YAML or JSON scheming files.
Sites willing to migrate to a scheming based metadata schema can do
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ The extension includes ready to use [ckanext-scheming](https://github.com/ckan/c

There are the following schemas currently included with the extension:

* *dcat_ap_recommended.yaml*: Includes the recommended properties for `dcat:Dataset` and `dcat:Distribution` according to the DCAT AP specification. You can use this schema with the `euro_dcat_ap_2` (+ `euro_dcat_scheming`) and `euro_dcat_ap_3` profiles.
* *dcat_ap_full.yaml*: Includes most of the properties defined for `dcat:Dataset` and `dcat:Distribution` in the [DCAT AP 2.1](https://semiceu.github.io/DCAT-AP/releases/2.1.1/) and [DCAT AP v3](https://semiceu.github.io/DCAT-AP/releases/3.0.0/) specification. You can use this schema with the `euro_dcat_ap_2` (+ `euro_dcat_scheming`) and `euro_dcat_ap_3` profiles.
* *dcat_ap_recommended.yaml*: Includes the recommended properties for `dcat:Dataset` and `dcat:Distribution` according to the DCAT AP specification. You can use this schema with the `euro_dcat_ap_2` (+ `euro_dcat_ap_scheming`) and `euro_dcat_ap_3` profiles.
* *dcat_ap_full.yaml*: Includes most of the properties defined for `dcat:Dataset` and `dcat:Distribution` in the [DCAT AP 2.1](https://semiceu.github.io/DCAT-AP/releases/2.1.1/) and [DCAT AP v3](https://semiceu.github.io/DCAT-AP/releases/3.0.0/) specification. You can use this schema with the `euro_dcat_ap_2` (+ `euro_dcat_ap_scheming`) and `euro_dcat_ap_3` profiles.

Most sites will want to use these as a base to create their own custom schema to address their own requirements, perhaps alongside a [custom profile](#writing-custom-profiles). Of course site maintainers can add or remove schema fields, as well as change the existing validators.

Expand Down Expand Up @@ -864,13 +864,14 @@ They essentially define the mapping between DCAT and CKAN.
In most cases the default profile will provide a good mapping that will cover most properties described in the DCAT standard. If you want to extract extra fields defined in the RDF, are using a custom schema or
need custom logic, you can write a custom to profile that extends or replaces the default one.

The default profile is mostly based in the
[DCAT application profile for data portals in Europe](https://joinup.ec.europa.eu/asset/dcat_application_profile/description). It is actually fully-compatible with [DCAT-AP v1.1](https://joinup.ec.europa.eu/asset/dcat_application_profile/asset_release/dcat-ap-v11), and partially compatible with [DCAT-AP v2.1.0](https://joinup.ec.europa.eu/collection/semantic-interoperability-community-semic/solution/dcat-application-profile-data-portals-europe/release/210). As mentioned before though, it should be generic enough for most DCAT based representations.
The profiles currently shipped with the extension are mostly based in the
[DCAT application profile for data portals in Europe](https://joinup.ec.europa.eu/asset/dcat_application_profile/description). As mentioned before though, they should be generic enough for most DCAT based representations.

Sites that want to support a particular version of the DCAT-AP can enable a specific profile using one of the methods below:
Sites that want to support a particular version of the DCAT-AP can enable a specific profile using one of the profiles below:

* DCAT-AP v2.1.0 (default): `euro_dcat_ap_2`
* DCAT-AP v1.1.1: `euro_dcat_ap`
* [DCAT-AP v3](https://semiceu.github.io/DCAT-AP/releases/3.0.0) (default): `euro_dcat_ap_3`
* [DCAT-AP v2.1.0](https://joinup.ec.europa.eu/collection/semantic-interoperability-community-semic/solution/dcat-application-profile-data-portals-europe/release/210): `euro_dcat_ap_2`
* [DCAT-AP v1.1.1](https://joinup.ec.europa.eu/asset/dcat_application_profile/asset_release/dcat-ap-v11): `euro_dcat_ap`

This plugin also contains a profile to serialize a CKAN dataset to a [schema.org Dataset](http://schema.org/Dataset) called `schemaorg`. This is especially useful to provide [JSON-LD structured data](#structured-data).

Expand Down
2 changes: 1 addition & 1 deletion ckanext/dcat/processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
RDF_PROFILES_CONFIG_OPTION = 'ckanext.dcat.rdf.profiles'
COMPAT_MODE_CONFIG_OPTION = 'ckanext.dcat.compatibility_mode'

DEFAULT_RDF_PROFILES = ['euro_dcat_ap_2']
DEFAULT_RDF_PROFILES = ['euro_dcat_ap_3']


def _get_default_rdf_profiles():
Expand Down
2 changes: 1 addition & 1 deletion ckanext/dcat/profiles/euro_dcat_ap_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def graph_from_dataset(self, dataset_dict, dataset_ref):

def graph_from_catalog(self, catalog_dict, catalog_ref):

self._graph_from_catalog_base(self, catalog_dict, catalog_ref)
self._graph_from_catalog_base(catalog_dict, catalog_ref)

def _graph_from_dataset_v3(self, dataset_dict, dataset_ref):

Expand Down

0 comments on commit 4ae8795

Please sign in to comment.