{ "info": { "author": "Aptivate", "author_email": "mapaction-team@aptivate.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7" ], "description": "=======================\nckanext-datasetversions\n=======================\n\nThis CKAN extension adds support for different versions of a dataset. Sometimes\nis is desirable to store and display together different versions of a dataset,\nfor example a daily situation report-style map during a humanitarian crisis.\n\nThis plugin provides an action ``dataset_version_create``, for example::\n\n toolkit.get_action('dataset_version_create')(\n context, {\n 'id': dataset['id'],\n 'base_name': base_name,\n 'owner_org': owner_org\n }\n )\n\nThe plugin models dataset versions internally by creating a parent dataset, with\nminimal metadata and no resources. A child dataset is created for each version.\n\n``dataset_version_create`` will create a parent-child relationship between the\ndataset specified by ``base_name`` and that specified by ``id``. If the dataset\nspecified by ``base_name`` does not exist, it will be created.\n\nNote that this plugin overrides CKAN's ``package_show`` action. The original\n``package_show`` is made available as ``ckan_package_show``.\n\nFor datasets with different versions, the overridden ``package_show`` will\nreturn:\n\n* The latest, public, active version of the dataset if the parent name or id is specified\n* A specific version of the dataset if the child name or id is specified\n\nThe version ordering is determined by the integer value of ``version`` in the\ndataset metadata.\n\nIn addition, ``package_show`` will return a list of the names and URLs of all\nactive versions as ``_versions`` in the dictionary.\n\nThe plugin provides templates to list versions of a dataset alongside that\ncurrently viewed and to warn the user if they are looking at an old version of a\ndataset.\n\n------------\nRequirements\n------------\n\nThis plugin will not work 'out of the box'. You will need to write code to call\nthe ``dataset_version_create`` action. A site-specific example is available at\nhttps://github.com/aptivate/ckanext-mapactionimporter\n\nThis is known to work with CKAN 2.5.2, though note there are problems when\npurging datasets with relationships. See:\n\n* https://github.com/ckan/ckan/pull/3112\n* https://github.com/ckan/ckan/issues/2186\n\n------------\nInstallation\n------------\n\nTo install ckanext-datasetversions:\n\n1. Activate your CKAN virtual environment, for example::\n\n . /usr/lib/ckan/default/bin/activate\n\n2. Install the ckanext-datasetversions Python package into your virtual environment::\n\n pip install ckanext-datasetversions\n\n3. Add ``datasetversions`` to the ``ckan.plugins`` setting in your CKAN\n config file (by default the config file is located at\n ``/etc/ckan/default/production.ini``).\n\n4. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu::\n\n sudo service apache2 reload\n\n\n---------------\nConfig Settings\n---------------\n\nNone\n\n\n------------------------\nDevelopment Installation\n------------------------\n\nTo install ckanext-datasetversions for development, activate your CKAN virtualenv and\ndo::\n\n git clone https://github.com/aptivate/ckanext-datasetversions.git\n cd ckanext-datasetversions\n python setup.py develop\n pip install -r dev-requirements.txt\n\n\n-----------------\nRunning the Tests\n-----------------\n\nTo run the tests, do::\n\n nosetests --nologcapture --with-pylons=test.ini\n\nTo run the tests and produce a coverage report, first make sure you have\ncoverage installed in your virtualenv (``pip install coverage``) then run::\n\n nosetests --nologcapture --with-pylons=test.ini --with-coverage --cover-package=ckanext.datasetversions --cover-inclusive --cover-erase --cover-tests\n\n\n-------------------------------------------\nRegistering ckanext-datasetversions on PyPI\n-------------------------------------------\n\nckanext-datasetversions should be availabe on PyPI as\nhttps://pypi.python.org/pypi/ckanext-datasetversions. If that link doesn't work, then\nyou can register the project on PyPI for the first time by following these\nsteps:\n\n1. Create a source distribution of the project::\n\n python setup.py sdist\n\n2. Register the project::\n\n python setup.py register\n\n3. Upload the source distribution to PyPI::\n\n python setup.py sdist upload\n\n4. Tag the first release of the project on GitHub with the version number from\n the ``setup.py`` file. For example if the version number in ``setup.py`` is\n 0.0.1 then do::\n\n git tag 0.0.1\n git push --tags\n\n\n--------------------------------------------------\nReleasing a New Version of ckanext-datasetversions\n--------------------------------------------------\n\nckanext-datasetversions is availabe on PyPI as https://pypi.python.org/pypi/ckanext-datasetversions.\nTo publish a new version to PyPI follow these steps:\n\n1. Update the version number in the ``setup.py`` file.\n See `PEP 440 `_\n for how to choose version numbers.\n\n2. Create a source distribution of the new version::\n\n python setup.py sdist\n\n3. Upload the source distribution to PyPI::\n\n python setup.py sdist upload\n\n4. Tag the new release of the project on GitHub with the version number from\n the ``setup.py`` file. For example if the version number in ``setup.py`` is\n 0.0.2 then do::\n\n git tag 0.0.2\n git push --tags", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/aptivate/ckanext-datasetversions", "keywords": "CKAN dataset versions", "license": "AGPL", "maintainer": null, "maintainer_email": null, "name": "ckanext-datasetversions", "package_url": "https://pypi.org/project/ckanext-datasetversions/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ckanext-datasetversions/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/aptivate/ckanext-datasetversions" }, "release_url": "https://pypi.org/project/ckanext-datasetversions/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "CKAN extension to support different versions of a dataset", "version": "1.0.1" }, "last_serial": 2213942, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "6d3ba9db3f2ded35f395d1397d27287e", "sha256": "8b1ffc6be9dfa4d633b54543d7d11271e7969ec955b5fca9e5fe1bf47ea198c7" }, "downloads": -1, "filename": "ckanext-datasetversions-1.0.1.tar.gz", "has_sig": false, "md5_digest": "6d3ba9db3f2ded35f395d1397d27287e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11934, "upload_time": "2016-07-11T10:06:47", "url": "https://files.pythonhosted.org/packages/21/c5/78cd6c692f3198a9d41059e26f45e142301baa0dd2a4d8068a98b27cb7aa/ckanext-datasetversions-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6d3ba9db3f2ded35f395d1397d27287e", "sha256": "8b1ffc6be9dfa4d633b54543d7d11271e7969ec955b5fca9e5fe1bf47ea198c7" }, "downloads": -1, "filename": "ckanext-datasetversions-1.0.1.tar.gz", "has_sig": false, "md5_digest": "6d3ba9db3f2ded35f395d1397d27287e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11934, "upload_time": "2016-07-11T10:06:47", "url": "https://files.pythonhosted.org/packages/21/c5/78cd6c692f3198a9d41059e26f45e142301baa0dd2a4d8068a98b27cb7aa/ckanext-datasetversions-1.0.1.tar.gz" } ] }