ckanext-dgu-local
This extension provides support for harvesting from Local Authority data portal that exposes datasets according to the LGA Inventory spec: https://github.com/datagovuk/ckanext-dgu-local/blob/master/ckanext/dgulocal/data/inventory.xsd .
This currently has dependencies on UK specific data, but the extension should work if the inventory document doesn’t reference the UK specific publisher and temporal URLs.
Dependencies
The LGA Inventory harvester relies on this version of ckanext-harvest:
https://github.com/datagovuk/ckanext-harvest/tree/1508-update
Installation
For development you should install ckanext-dgu-local as follows.
Install this extension as normal using pip in your activated environment:
(pyenv) $ pip install -e "git+https://github.com/datagovuk/ckanext-dgu-local.git#egg=ckanext-dgu-local"
Activate the plugins by adding them to the CKAN config and then restarting CKAN:
ckan.plugins = ...other_plugins... dgu_local inventory_harvester
Setup the database tables:
paster --plugin=ckanext-dgu-local dgulocal init --config=ckan_default.ini
Plugins
dgu_local will provide any UI/search enhancements
inventory_harvester is used for harvesting from the LGA Inventory format.
Running tests
The tests for ckanext-dgu-local can be run from the ckanext-dgu-local folder using:
nosetests --ckan --with-pylons=test-core.ini ckanext/dgulocal/tests
And some tests do not use the database so can be run in sqlite:
nosetests --ckan --with-pylons=test.ini ckanext/dgulocal/tests/test_harvester.py
Metadata
This extension relies on PackageExtras being added to packages that are created, or updated. The Extras used the identifier field for a given publisher which is documented as being unique for that publisher (but no necessarily globally unique).
Package Extras
| Key |
Value |
| lga_identifier |
The publisher-wide unique identifier for this dataset |
| lga_servic |
|