These extension allow users to publish dataset metadata without uploading any file(s). The owner of the dataset, as well as the admins of the organization that the dataset belongs to can take actions on these requests and decide what to share.
See our Wiki for full documentation, examples, operational details and other information.
To install ckanext-requestdata:
-
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
-
Install the ckanext-requestdata Python package into your virtual environment:
pip install ckanext-requestdata
-
Add
requestdata
to theckan.plugins
setting in your CKAN config file (by default the config file is located at/etc/ckan/default/production.ini
). -
Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:
sudo service apache2 reload
These are the required configuration options used by the extension:
hdx_portal = False
smtp.server=YOUR_SMTP_SERVER
smtp.user=YOUR_SMTP_USERNAME
smtp.password=YOUR_SMTP_PASSWORD
smtp.mail_from =SENDER_MAIL
You can add these additional options in the config for footer links in the email when new data request is sent:
ckanext.requestdata.newsletter_url
ckanext.requestdata.twitter_url
ckanext.requestdata.contact_email
To install ckanext-requestdata for development, activate your CKAN virtualenv and do:
git clone https://github.com/ViderumGlobal/ckanext-requestdata.git
cd ckanext-requestdata
python setup.py develop
pip install -r dev-requirements.txt
To run the tests, first make sure that you have installed the required
development dependencies in CKAN, which can be done by running the following
command in the CKAN's src
directory:
pip install -r dev-requirements.txt
After that just type this command to actually run the tests in the extension.
nosetests --ckan --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.requestdata --cover-inclusive --cover-erase --cover-tests