-
Notifications
You must be signed in to change notification settings - Fork 5
Using pyLODE for ontology documentation
pyLODE is an OWL ontology documentation tool which ORR can use to improve visualization and therefore interpretation of various resources. This document provides a guide to deploy and use pyLODE in your orr-portal deployment.
Assumptions: that you will be serving orr-portal through an HTTPD server and that is already set up.
Edit the crontab as follows crontab -e and then add the following line
@reboot cd /path/to/pyLODE/ && gunicorn -b 0.0.0.0:8080 --chdir /path/to/pyLODE/pylode server:api & >> pyLODE.cronjob.out
This ensures that pyLODE is started whenever the machine is rebooted and also simply redirects std output to the pyLODE.cronjob.out
Open /etc/httpd/conf.d/orr.conf and add the following four line entry within the <VirtualHost *:80> XML block
<VirtualHost *:80>
# pyLODE Flask server running on 8080 started with 'gunicorn -b 0.0.0.0:8080 --chdir /path/to/pyLODE/pylode server:api &'
# Source for pyLODE resides at https://github.com/RDFLib/pyLODE
ProxyPass /pylode http://localhost:8080
ProxyPassReverse /pylode http://localhost:8080
You can then gracefully restart HTTPD sudo service httpd graceful
cd /path/to/pyLODE && gunicorn -D -b 0.0.0.0:8080 --chdir /path/to/pyLODE/pylode server:api &
This will start the pyLODE service in the background on port 8080 which can be accessed at http://${myhost}/pylode.
grab a copy of the local.config.js file on the ORR host
docker cp orr:/path/to/tomcat/webapps/ont/js/local.config.js .
edit the file as follows
appConfig.externalTools.ontViewers = [{name: 'pyLODE', title: 'ESIP-hosted pyLODE server', srcUrlTemplate: 'http://cor.esipfed.org/pylode?url=$uri', moreInfoUrl: 'https://github.com/RDFLib/pyLODE'}]
...and then copy it back
docker cp local.config.js orr:/usr/local/tomcat/webapps/ont/js/
N.B. you may have to restart the ORR service.
When you navigate to a specific resource and scroll to the Data section and you will now be able to vizualize and browse the resource via pyLODE.