Skip to content

Repository files navigation

https://travis-ci.org/CivityNL/ckanext-scorewater.svg?branch=master Downloads Latest Version Supported Python versions Development Status License

ckanext-scorewater

With this plugin, you extend the dataset schema with multiple new dataset type schemas to comply with the scorewater/portal metadata structure. Every schema serves a different purpose in the SCOREwater portal UI.

Requirements

This plugin includes schemas and thus the ckanext-scheming is a requirement for it to function properly.

Installation

To install ckanext-scorewater:

  1. Activate your CKAN virtual environment, for example:

    . /usr/lib/ckan/default/bin/activate
    
  2. Install the ckanext-scorewater Python package into your virtual environment:

    pip install ckanext-scorewater
    
  3. Add scorewater 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:

    sudo service apache2 reload
    

Config settings

Enable the plugin by including it in the configuration options:

ckan.plugins = ... scorewater ...

Enable all scorewater schemas in the configuration options, to get a dropdown menu with several dataset schemas when creating a new dataset:

#   For scorewater dataset multi-schemas:
scheming.dataset_multi_schemas = ckanext.scorewater:scheming/multi_schemas/ckan-scorewater.json

/images/multi_schema_dropdown.png

SCOREwater schemas

These schemas are built to comply with the SCOREwater portal structure. There are 4 new dataset types declared, extending the default dataset:

  • sensor
  • service
  • source
  • supplier

and each of them have its own metadata structure, to take advantage of the SCOREwater portal's UI logic.

/images/multi_schema_header.png

Development Installation

To install ckanext-scorewater for development, activate your CKAN virtualenv and do:

git clone https://github.com/CivityNL/ckanext-scorewater.git
cd ckanext-scorewater
python setup.py develop
pip install -r dev-requirements.txt

Running the Tests

To run the tests, do:

nosetests --nologcapture --with-pylons=test.ini

To run the tests and produce a coverage report, first make sure you have coverage installed in your virtualenv (pip install coverage) then run:

nosetests --nologcapture --with-pylons=test.ini --with-coverage --cover-package=ckanext.scorewater --cover-inclusive --cover-erase --cover-tests

About

This is an extension regarding SCOREWater project

Topics

Resources

Stars

1 star

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages