Extension Dia


Extension Basics

Title
Dia
Name
ckanext-dia
Type
Public extension
Description
A simple CKAN extension to hold all overrides to CKAN required by the DIA (Department of Internal Affairs).
CKAN versions
Download-Url (zip)
Last commit
2 months ago (2025-11-04 21:59:43)
Url to repo
Category
Data Management & Quality


Background Infos

Description (long)
Show details

CKANEXT-DIA

CKAN < 2.9 support

As of 1.3.0 this extention has been made to work with CKAN 2.9. While attempts have been made to maintain compatibility with prior version of CKAN, there may be issues. If any issues are discovered we are happy to accept PRs. Alternatively for compatibility <2.9 the 1.2.0 tag can be used.

What am I?

A simple CKAN extension to hold all overrides to CKAN required by the DIA (Department of Internal Affairs).

How to install?

It is expected that you will have these other CKAN extensions installed:

  • ckanext-spatial
  • ckanext-dcat
  • ckanext-harvester

You can use pip to install this plugin into your virtual environment:

pip install -e 'https://github.com/data-govt-nz/ckanext-dia.git#egg=ckanext-dia==1.0.0'

You can also install the specific dependencies using the appropriate requirements.txt file for your version of Python.

Manual Testing for Harvesting Modifications

When working on the dcat.json or CSW harvesting extensions you often need to load testing data, you can use the following paster command to re-harvest an existing dataset:

docker compose run ckan-fetch ckan harvester import -p 'reefton-goldfield-sheet-12-part-of-waitahu-survey-district-and-pohaturoa-survey-district-field-1'

where reefton-goldfield... is the dataset id in the url, this may also look like a guid, both will work.

How to activate plugins?

All plugins need to be added to ckan.plugins in your config file. Available plugins are:

  • diavalidation – Exposes extra validators, such as natural_num_or_missing
  • diaschema – DIA-related changes to CKAN schema
  • diaharvester – Overrides for the CSW harvester, needs to be enabled before csw_harvester
  • diadcatjsonharvester – Overrides for the DCAT JSON harvester, needs to be enabled instead of dcat_json_harvester
  • dianohomepage – Redirect the CKAN homepage to /dataset
  • diacommands – Provides cli commands (only needed on ckan >= 2.9)
  • `diaur
Version
1.1.0
Version release date
2018-12-11
Contact name
(not set)
Contakt email
(not set)
Contact Url
(not set)


Installation Guide

Configuration hints
Plugins to configure (ckan.ini)
dia
CKAN Settings (ckan.ini)
DB migration to be executed
(not set)
<< back to Extensions