This repository includes apinf_resources CKAN extension, which enables CKAN to be integrated with an instance of Apinf in order to have service level information of the API instances providing datasets resources.
This extension is only used for those dataset resources which are registered as a link, and uses Apinf APIs in order to look for the Apinf site which includes the description of the involved service. If this page is found, this plugin creates a link which allows users to access it in order to retrieve feedback, documentation, API status, or backlog information about the service providing the particular dataset resource.
To install ckanext-apinf_resources:
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
Install the ckanext-apinf_resources Python package into your virtual environment:
pip install ckanext-apinf_resources
Add
apinf_resources
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
The current CKAN extension uses the following configuration settings:
# Apinf resources configuration # URL of API Umbrella ckan.apinf_resources.umbrella_url = https://umbrella.docker:8443 # API Key and Admin token used for accessing API Umbrella APIs ckan.apinf_resources.umbrella_key = Ato9cJGVCNc5gQwRAut3131CNojXOwhmMOjIKyxX ckan.apinf_resources.umbrella_token = sImknT9zQ75Gksw5XZ74KZvKMpnX7fmtqoVSrhGI # URL of Apinf ckan.apinf_resources.apinf_url = http://apinf.docker:3000
To install ckanext-apinf_resources for development, activate your CKAN virtualenv and do:
git clone https://github.com/FIWARE-TMForum/ckanext-apinf_resources.git cd ckanext-apinf_resources python setup.py develop pip install -r requirements.txt pip install -r dev-requirements.txt
To run the tests, do:
python setup.py nosetests
This command will also generate a nose and coverage XML report
ckanext-apinf_resources should be availabe on PyPI as https://pypi.python.org/pypi/ckanext-apinf_resources. If that link doesn't work, then you can register the project on PyPI for the first time by following these steps:
Create a source distribution of the project:
python setup.py sdist
Register the project:
python setup.py register
Upload the source distribution to PyPI:
python setup.py sdist upload
Tag the first 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
ckanext-apinf_resources is availabe on PyPI as https://pypi.python.org/pypi/ckanext-apinf_resources. 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