The extension adds the ability to include a data dictionary (metadata) for each dataset. Admins can create the data dictionary when adding the dataset, or create/modify it any other time. Users see the data dictionary as another tab for each dataset. Since this dictionary extension utilizes the DataStore extension, Data Dictionary information can be accessed via API.
Additional stage added to dataset setup
Editing data dictionary for a dataset
User view of the data dictionary
The extension requires the DataStore extension to also be installed. Additionally, it only works on CKAN versions that have two current stages in the 'add dataset' dialog.
To install ckanext-dictionary:
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
Install the ckanext-dictionary Python package into your virtual environment:
pip install ckanext-dictionary
Add
dictionary
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
This version includes no user config settings.
To install ckanext-dictionary for development, activate your CKAN virtualenv and do:
git clone https://github.com/cmuphillycapstone/ckanext-dictionary.git cd ckanext-dictionary python setup.py develop pip install -r dev-requirements.txt
There are presently no tests included with the extension.
ckanext-dictionary is availabe on PyPI as https://pypi.python.org/pypi/ckanext-dictionary. To publish a new version to PyPI follow these steps:
Update the version number in the
setup.py
file. See PEP 440 for how to choose version numbers.Create a source distribution of the new version:
python setup.py sdist
Upload the source distribution to PyPI:
python setup.py sdist upload
Tag the new release of the project on GitHub with the version number from the
setup.py
file. For example if the version number insetup.py
is 0.0.2 then do:git tag 0.0.2 git push --tags