[
// The first level.
{
"title": "level 1 title",
"name": "maturity_level_1",
"fields": [
{
// Internal names, used in APIs. Special characters are not allowed.
"name": "theme",
// The Label of this field
"label": "Domain / Topic",
// The short description is under the field
"short_description": "The theme.",
// The long description is displayed when the cursor is hovered/clicked on the `quesion mark icon`
"long_description": "The theme or topic of the package.",
// The type of this field, default to "text".
// See "Supported field types" section for all supported types.
"type": "text"
},
{
// This clones the field that predefined in CKAN.
// See "Supported CKAN Fields" section for all supported CKAN Fields
"ckanField": "tags",
// The short description is under the field
"short_description": "The tags or keywords.",
// The long description is displayed when the cursor is hovered/clicked on the `quesion mark icon`
"long_description": "The tags or keywords of the package.",
},
]
},
// The second level.
{
"title": "level 2 title",
"name": "maturity_level_2",
"fields": [
{...}
]
}
]
Notes: short description and long description are not available for
title
,license
,organization_and_visibility
title
(*required): Titledescription
: Descriptiontags
: Tags / Keywordslicense_id
: Licenseorganization_and_visibility
(*required): organization dropdownsource
: url to the sourceversion
: version numberauthor
: Author/Creatorauthor_email
maintainer
maintainer_email
custom_fields
: Custom CKAN Fields, key/value pairs
text
date
datetime
time
single_select
{ "name": "access_diff_version", "label": "Can different versions of the data be accessed?", "type": "single_select", // A list of available options. // The "value" must be a string. "options": [ {"text": "N/A", "value": ""}, {"text": "Yes", "value": "true"}, {"text": "No", "value": "false"} ] }
If your extension works across different versions you can add the following table:
Compatibility with core CKAN versions:
CKAN version | Compatible? |
---|---|
2.6 and earlier | not tested |
2.7 | not tested |
2.8 | not tested |
2.9 | not tested |
2.10.X | yes |
2.11.X | yes |
Suggested values:
- "yes"
- "not tested" - I can't think of a reason why it wouldn't work
- "not yet" - there is an intention to get it working
- "no"
TODO: Add any additional install steps to the list below. For example installing any non-Python dependencies or adding any required config settings.
To install ckanext-udc:
-
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
-
Clone the source and install it on the virtualenv
cd /usr/lib/ckan/default/src/ git clone https://github.com/csse-uoft/ckanext-udc.git cd ckanext-udc pip install -e . pip install -r requirements.txt
-
Add
udc
to theckan.plugins
setting in your CKAN config file (by default the config file is located at/etc/ckan/default/ckan.ini
). -
Init DB
# Use your own path to the ckan.ini ckan -c /etc/ckan/default/ckan.ini udc initdb
-
Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:
sudo supervisorctl reload
None at present
To install ckanext-udc for development, activate your CKAN virtualenv and do:
git clone https://github.com/csse-uoft/ckanext-udc.git
cd ckanext-udc
python setup.py develop
pip install -r dev-requirements.txt
To run the tests, do:
pytest --ckan-ini=test.ini
If ckanext-udc should be available on PyPI you can follow these steps to publish a new version:
-
Update the version number in the
setup.py
file. See PEP 440 for how to choose version numbers. -
Make sure you have the latest version of necessary packages:
pip install --upgrade setuptools wheel twine
-
Create a source and binary distributions of the new version:
python setup.py sdist bdist_wheel && twine check dist/*
Fix any errors you get.
-
Upload the source distribution to PyPI:
twine upload dist/*
-
Commit any outstanding changes:
git commit -a git push
-
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.1 then do:git tag 0.0.1 git push --tags