This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This CKAN extension adds support for different versions of a dataset. Sometimes is is desirable to store and display together different versions of a dataset, for example a daily situation report-style map during a humanitarian crisis.

This plugin provides an action dataset_version_create, for example:

    context, {
        'id': dataset['id'],
        'base_name': base_name,
        'owner_org': owner_org

The plugin models dataset versions internally by creating a parent dataset, with minimal metadata and no resources. A child dataset is created for each version.

dataset_version_create will create a parent-child relationship between the dataset specified by base_name and that specified by id. If the dataset specified by base_name does not exist, it will be created.

Note that this plugin overrides CKAN’s package_show action. The original package_show is made available as ckan_package_show.

For datasets with different versions, the overridden package_show will return:

  • The latest, public, active version of the dataset if the parent name or id is specified
  • A specific version of the dataset if the child name or id is specified

The version ordering is determined by the integer value of version in the dataset metadata.

In addition, package_show will return a list of the names and URLs of all active versions as _versions in the dictionary.

The plugin provides templates to list versions of a dataset alongside that currently viewed and to warn the user if they are looking at an old version of a dataset.


This plugin will not work ‘out of the box’. You will need to write code to call the dataset_version_create action. A site-specific example is available at

This is known to work with CKAN 2.5.2, though note there are problems when purging datasets with relationships. See:


To install ckanext-datasetversions:

  1. Activate your CKAN virtual environment, for example:

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

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


Development Installation

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

git clone
cd ckanext-datasetversions
python 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.datasetversions --cover-inclusive --cover-erase --cover-tests

Registering ckanext-datasetversions on PyPI

ckanext-datasetversions should be availabe on PyPI as If that link doesn’t work, then you can register the project on PyPI for the first time by following these steps:

  1. Create a source distribution of the project:

    python sdist
  2. Register the project:

    python register
  3. Upload the source distribution to PyPI:

    python sdist upload
  4. Tag the first release of the project on GitHub with the version number from the file. For example if the version number in is 0.0.1 then do:

    git tag 0.0.1
    git push --tags

Releasing a New Version of ckanext-datasetversions

ckanext-datasetversions is availabe on PyPI as To publish a new version to PyPI follow these steps:

  1. Update the version number in the file. See PEP 440 for how to choose version numbers.

  2. Create a source distribution of the new version:

    python sdist
  3. Upload the source distribution to PyPI:

    python sdist upload
  4. Tag the new release of the project on GitHub with the version number from the file. For example if the version number in is 0.0.2 then do:

    git tag 0.0.2
    git push --tags
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
ckanext-datasetversions-1.0.1.tar.gz (11.9 kB) Copy SHA256 Checksum SHA256 Source Jul 11, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting