Right now, the world is ruled by numbers and data. What lies behind each number are numerous people sharing their personal opinion, information, likes and dislikes. When it comes to our online presence, personal and professional, it all comes down to the feedback we receive. The number of likes is the simplest and most obvious way to measure feedback.

That is the exact reason why you need ckanext-likes. It is a custom made extension and it was created and tested on CKAN version 2.8. This extension allows registered users on CKAN portals to provide their feedback (likes) for the available datasets and their resources. 

How to use it?

On the Dataset [Name of the dataset] page, in the top navigation menu of the dataset, the users are able to like the dataset. There is an icon (similar to the most popular social media likes icon) and each user that is interested or likes the details in some dataset can share like by clicking the icon. 

Besides the icon, there is a count of total likes. The user can dislike the dataset, and that will be shown only in the count of the likes, there is no “dislike” icon. Additionally, besides the dataset, the users can share their likes on the resource level, too. 

If a non-registered user tries to like some of the public datasets of the portal, the user shall be redirected to the register page, which will encourage all users to make registration on some CKAN portal.

Installation

To install ckanext-likes:

  1. Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
  1. Install the ckanext-likes Python package into your virtual environment:
pip install ckanext-likes
  1. Add likes to the ckan.plugins setting in your CKAN config file (by default the config file is located at /etc/ckan/default/production.ini).

  2. Restart CKAN. For example if you’ve deployed CKAN with Apache on Ubuntu:

sudo service apache2 reload

Config Settings

Document any optional config settings here. For example:

# The minimum number of hours to wait before re-checking a resource
# (optional, default: 24).
ckanext.likes.some_setting = some_default_value

Development Installation

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

git clone https://github.com//ckanext-likes.git
cd ckanext-likes
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.likes --cover-inclusive --cover-erase --cover-tests

Let us know your opinion on ckanext-likes. Checkout this extension and share your impressions when you start using it in the comments below.

Leave a Reply