Extension Switzerland DCAT-AP


Extension Basics

Title
Switzerland DCAT-AP
Name
ckanext-switzerland
Type
Public extension
Description
CKAN extension for DCAT-AP Switzerland providing templates and plugins for opendata.swiss including harvesting, SHACL validation, and datastore management. Deprecated in favor of ckanext-switzerland-ng.
CKAN versions
Download-Url (zip)
Last commit
4 years ago (2022-01-24 00:00:00)
Url to repo
Category
Standards Compliance


Background Infos

Description (long)
Show details

ckanext-switzerland

CKAN extension for DCAT-AP Switzerland, templates and different plugins for opendata.swiss.

This extension is deprecated. See https://github.com/opendata-swiss/ckanext-switzerland-ng for the current code.

Requirements

  • CKAN 2.6+
  • ckanext-scheming
  • ckanext-fluent

Installation

  1. Activate your CKAN virtual environment
  2. Install the ckanext-switzerland Python package: pip install ckanext-switzerland
  3. Add switzerland to the ckan.plugins setting
  4. Restart CKAN

Config Settings

ckanext.switzerland.wp_ajax_url = https://opendata.swiss/cms/wp-admin/admin-ajax.php
ckanext.switzerland.number_harvest_jobs_per_source = 2
piwik.site_id = 1
piwik.url = piwik.opendata.swiss

Commands

Cleanup Datastore Database

Datastore currently does not delete tables when the corresponding resource is deleted. This command finds orphaned tables and deletes rows to free space.

paster --plugin=ckanext-switzerland ogdch cleanup_datastore -c /var/www/ckan/development.ini

Cleanup Harvest Jobs

Deletes harvest jobs and objects per source leaving only the latest n.

paster --plugin=ckanext-switzerland ogdch cleanup_harvestjobs [{source_id}] [--keep={n}] [--dryrun] -c /var/www/ckan/development.ini

Harvesters

Swiss Dcat Harvester

Implements a Swiss version of the Dcat Harvester.

SHACL Validation

Validation using Apache Jena SHACL against shape graphs.

ckanext.switzerland.shacl_command_path = /opt/apache-jena-3.13.1/bin/shacl
ckanext.switzerland.shacl_results_path = /home/liipadmin/shaclresults
ckanext.switzerland.shacl_shapes_path = /home/liipadmin/shaclshapes

Update Format-Mapping

Edit the mapping.yaml following YAML syntax.

Update Translations

python setup.py extract_messages
python setup.py compile_catalog

License

AGPL-3.0

Version
0.0.1
Version release date
(not set)
Contact name
Liip AG
Contakt email
Contact Url
(not set)


Installation Guide

Configuration hints

Archived and deprecated. Use ckanext-switzerland-ng instead. Requires ckanext-scheming, ckanext-fluent. Supports SHACL validation with Apache Jena.

Plugins to configure (ckan.ini)
ogdch ogdch_pkg ogdch_res ogdch_group ogdch_org ogdch_org_search ogdch_group_search ogdch_showcase ogdch_dcat dcat_ch_rdf_harvester
CKAN Settings (ckan.ini)
# ckanext.switzerland.wp_ajax_url = https://opendata.swiss/cms/wp-admin/admin-ajax.php
# ckanext.switzerland.number_harvest_jobs_per_source = 2
# piwik.site_id = 1
# piwik.url = piwik.opendata.swiss
# ckanext.switzerland.shacl_command_path =
# ckanext.switzerland.shacl_results_path =
# ckanext.switzerland.shacl_shapes_path =
DB migration to be executed
(not set)
<< back to Extensions