This CKAN extension includes semantic_media_wiki
plugin that aim to able users to link machines on semantic media wiki to resources/datasets in CKAN.
Compatibility with core CKAN versions:
CKAN version | Compatible? |
---|---|
2.9 | Yes |
earlier | No |
To install ckanext-Semantic-Media-Wiki:
-
Activate your CKAN virtual environment, for example:
source /usr/lib/ckan/default/bin/activate
-
Clone the source and install it on the virtualenv (Suggested location: /usr/lib/ckan/default/src) :
git clone https://github.com/TIBHannover/ckanext-Semantic-Media-Wiki.git cd ckanext-Semantic-Media-Wiki pip install -e . pip install -r requirements.txt
-
Add
semantic_media_wiki
andsample_link
to theckan.plugins
setting in your CKAN config file (by default the config file is located at/etc/ckan/default/ckan.ini
). -
Upgrade the CKAN database to add the plugin table:
ckan -c /etc/ckan/default/ckan.ini db upgrade -p semantic_media_wiki ckan -c /etc/ckan/default/ckan.ini db upgrade -p sample_link
-
Restart CKAN and supervisor. For example if you've deployed CKAN with nginx on Ubuntu:
sudo service supervisor reload sudo service nginx reload
These plugins need the following variables provided in ckan.ini
ckanext.crc.project.id="CRC_Project_ID"
ckanext.mediaWiki_credentials_path=""
ckanext.smw.baseUrl=""
ckanext.smw.mediaWiki.api.endpont=""
ckanext.smw.equipment.endpoint=""
ckanext.smw.machine.endpoint=""
ckanext.smw.tools.endpoint=""
To run the tests, do:
pytest --ckan-ini=test.ini --disable-pytest-warnings ckanext/semantic_media_wiki/tests/