Extension Switzerland


Extension Basics

Title
Switzerland
Name
ckanext-switzerland
Type
Public extension
Description
Deprecated plugins for opendata.swiss - see link below for current code
CKAN versions
Download-Url (zip)
Last commit
3 years ago (2022-01-24 08:28:45)
Url to repo
Category
Data Management & Quality


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

Update translations

To generate a new ckanext-switzerland.pot file use the following command:

vagrant ssh
source /home/vagrant/pyenv/bin/activate
cd /var/www/ckanext/ckanext-switzerland/
python setup.py extract_messages

Or follow the official CKAN guide at https://docs.ckan.org/en/latest/extensions/translating-extensions.html

All translations are done via Transifex. To compile the po files use the following command:

python setup.py compile_catalog

Command

This extension currently provides two paster commands:

Command to cleanup the datastore database.

Datastore currently does not delete tables when the corresponding resource is deleted. This command finds these orphaned tables and deletes its rows to free the space in the database. It is meant to be run regularly by a cronjob.

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

Command to cleanup the harvest jobs.

This commands deletes the harvest jobs and objects per source and overall leaving only the latest n, where n and the source are optional arguments. The command is supposed to be used in a cron job to provide for a regular cleanup of harvest jobs, so that the database is not overloaded with unneeded data of past job runs. It has a dryrun option so that it can be tested what will get be deleted in the database before the actual database changes are performed.

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

Harvesters

Swiss Dcat

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


Installation Guide

Configuration hints

To install ckanext-switzerland:

  1. Activate your CKAN virtual environment, for example:

    . /usr/lib/ckan/default/bin/activate

  2. Install the ckanext-switzerland Python package into your virtual environment:

    pip install ckanext-switzerland

  3. Add switzerland to the ckan.plugins setting in your CKAN config file (by default the config file is located at /etc/ckan/default/production.ini).

  4. Restart CKAN. For example if you’ve deployed CKAN with Apache on Ubuntu:

Plugins to configure (ckan.ini)
switzerland
CKAN Settings (ckan.ini)
# 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
# ckanext.switzerland.wp_ajax_url = https://opendata.swiss/cms/wp-admin/admin-ajax.php
# ckanext.switzerland.number_harvest_jobs_per_source = 2
DB migration to be executed
(not set)
<< back to Extensions