Git Product home page Git Product logo

ckanext-cprvalidation's Introduction

ckanext-cprvalidation

Validates resources for the Danish national open data platform http://portal.opendata.dk

Installing NB! This module is developed on CKAN v2.6., compatibility with other version is not ensured

Activate virtualenv

source /usr/lib/ckan/default/bin/activate
cd /usr/lib/ckan/default/src
git clone [email protected]:NicolaiMogensen/ckanext-cprvalidation.git
cd ckanext-cprvalidation

Install Extension

python setup.py develop

Enable plugin in configuration

 sudo nano /etc/ckan/default/production.ini
 ckan.plugins = datastore ... cprvalidation

Add database settings to production.ini

ckan.cprvalidation.postgres_password = "Postgres password here"
ckan.cprvalidation.cprvalidation_db = "Database name for validation"
ckan.cprvalidation.cprvalidation_password = "Password you will be using for the dedicated user"
ckan.cprvalidation.postgres_port = "The port postgres is running, default is 5432"
ckan.cprvalidation.apikey = "A CKAN API key that can view private resources"
ckan.cprvalidation.email = "Email that the OS should send report to. "mail" must be setup"

Create user "cprvalidation"

sudo -u postgres psql
CREATE ROLE cprvalidation WITH LOGIN ENCRYPTED PASSWORD 'xxx';

NB: The password must be the same as the one entered in your config

Usage

Init the database

paster --plugin=ckanext-cprvalidation validation initdb --config=/etc/ckan/default/production.ini

Setup a CRON job to scan at regular intervals.

*/30 * * * * cd /usr/lib/ckan/default/src/ckanext-cprvalidation && /usr/lib/ckan/default/bin/python /usr/lib/ckan/default/bin/paster plugin=ckanext-cprvalidation validation scan --config=/etc/ckan/default/production.ini

Add exceptions to the database

paster --plugin=ckanext-cprvalidation validation addexception "Package_id" --config=/etc/ckan/default/production.ini

ckanext-cprvalidation's People

Contributors

gavram avatar nicolailolansen avatar zelima avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.