Select dataset type when adding new data
Project description
ckanext-create_typed_package
Installation
To install ckanext-create_typed_package:
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
Install the ckanext-create_typed_package Python package into your virtual environment:
pip install ckanext-create-typed-package
Add create_typed_package to the ckan.plugins setting in your CKAN config file (by default the config file is located at /etc/ckan/default/ckan.ini).
Restart CKAN. For example if you’ve deployed CKAN with Apache on Ubuntu:
sudo service apache2 reload
Config settings
# The minimum number of hours to wait before re-checking a resource # (optional, default: false). create_typed_package.use_scheming = true # The minimum number of hours to wait before re-checking a resource # (optional, default: []). create_typed_package.additional_types = custom_type another_type # The minimum number of hours to wait before re-checking a resource # (optional, default: []). create_typed_package.exclude_types = custom_type another_type # The minimum number of hours to wait before re-checking a resource # (optional, default: false). create_typed_package.use_separate_route = true # The minimum number of hours to wait before re-checking a resource # (optional, default: /dataset/select-type). create_typed_package.route_path = /create-package/select-type
Developer installation
To install ckanext-create_typed_package for development, activate your CKAN virtualenv and do:
git clone https://github.com/DataShades/ckanext-create_typed_package.git cd ckanext-create_typed_package python setup.py develop
Tests
To run the tests, do:
pytest --ckan-ini=test.ini
To run the tests and produce a coverage report, first make sure you have pytest-cov installed in your virtualenv (pip install pytest-cov) then run:
pytest --ckan-ini=test.ini --cov=ckanext.create_typed_package
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for ckanext-create_typed_package-0.0.2a3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a9749eb62a941af0b284ddec2687f77f52bc4a162faac5a216df7e3a25eb230 |
|
MD5 | 4c69ccd2ea76e9976aeab2b2e2f2c0e8 |
|
BLAKE2b-256 | 562dafd0423c743b134c2f15f5aec8a305f4a7d1180e165c5913d5bb7d74a53c |