ckanext-spc
CKAN repo for the Pacific Data Hub, an open data portal for datasets from the Pacific.
Requirements
Installation
To install ckanext-spc:
- Activate your CKAN virtual environment:
. /usr/lib/ckan/default/bin/activate
- Install the ckanext-spc and its requirements:
pip install ckanext-spc
pip install -r dev-requirements.txt
- Add
spc to the ckan.plugins setting in your CKAN config file.
- For the SpcNadaHarvester to work, install the nada_harvester branch of ckanext-ddi.
- Update SOLR schema:
xml
<field name="topic" type="string" indexed="true" stored="true" multiValued="true"/>
- Update DB schema:
paster spc db-upgrade -c config.ini
- Restart CKAN.
Config Settings
scheming.dataset_schemas = ckanext.spc.schemas:dataset.json
Development Installation
git clone https://github.com/DataShades/ckanext-spc.git
cd ckanext-spc
python setup.py develop
pip install -r dev-requirements.txt
paster spc db-upgrade -c config.ini
Template macros
This extension provides a new template macro nested_field for rendering fields in nested schemas.
Interactive widgets
Development server with examples: npm run dev-widgets
Build widgets: npm run build-widgets
General Information
Harvesters
- OAI-PMH:
spc_oaipmh_harvester (dataset type: publications)
- DKAN:
spc_dkan_harvester (dataset type: dataset)
- GBIF:
spc_gbif_harvester (dataset type: biodiversity_data)
- PRDR Publications:
spc_prdr_publications_harvester (dataset type: publications)
- PRDR Data:
spc_prdr_res_energy_harvester (dataset type: dataset)
- SPREP:
spc_sprep_harvester (dataset type: dataset)
Dataset types
- Biodiversity data - EML schema
- Dataset - DCAT schema
- Geographic data - ANZLIC schema
- Publications - Dublin Core schema
Running the Tests
pytest --ckan-ini test.ini ckanext/spc
License
AGPL-3.0