Giter Site home page Giter Site logo

vocol / vocol Goto Github PK

View Code? Open in Web Editor NEW
99.0 18.0 25.0 396.18 MB

An integrated environment to support collaborative ontology / vocabulary development in distributed settings

Home Page: https://www.vocoreg.com/

License: MIT License

HTML 3.16% CSS 17.53% JavaScript 65.91% Ruby 1.76% Shell 0.23% Java 2.36% Smarty 0.13% Batchfile 0.03% PHP 0.02% ANTLR 0.31% Dockerfile 0.01% Less 6.35% EJS 2.19%
semantic vocabulary domain-experts vocabulary-collaboration vocol-environment collaborators javascript

vocol's Introduction

VoCol - Vocabulary collaboration and build environment.

Inspired by agile software and content development methodologies, the VoCol methodology and tool environment allows building leight-weight ontologies using version control systems such as Git and repository hosting platforms such as Github. VoCol is implemented without dependencies on complex software components, it provides collaborators with comprehensible feedback on syntax and semantics errors in a tight loop, and gives access to a human-readable presentation of the vocabulary. The VoCol environment is employing loose coupling of validation and documentation generation components on top of a standard Git repository. All VoCol components, even the repository engine, can be exchanged with little effort.

Installation on a local machine or on a Web Server

The following steps are needed to setup the VoCol Environment either on a local machine or a web server. These steps are valid in the Linux-based operating systems and with slight modifications can be used in Windows-based as well.

  1. You should have the following libraries installed: Java JDK, NodeJS, NPM, and Git packages with their respective versions or higher. For more info see in Required libraries and tools.

  2. Create a new directory e.g. "newFolder", clone the VoCol repository, and give the execution permissions as follows:

mkdir newFolder
cd newFolder
git clone https://github.com/vocol/vocol.git
chmod u+x  .
  1. Enter inside the "VoCol" folder and run the following script to clean up any not necessary file:
cd vocol
./helper/scripts/resetApp.sh
  1. Install the dependent packages (assuming that node package manager is installed already):
sudo npm install

Semantic-Ui framework is used in VoCol development, a couple of selections need to be given while installing it. Select "Skip install" as follows:

? It looks like you have a semantic.json file already.
  Yes, extend my current settings.
> Skip install

Then "Yes" for that Vocol is using "NPM Nice".

? We detected you are using NPM Nice! Is this your project folder? D:\vocolrepo\vocol
> Yes
  No, let me specify

Finally, give "public/semantic" as the location of Sematic-Ui in VoCol Project.

? Where should we put Semantic UI inside your project? (semantic/) public/semantic/
  1. The last step is to start VoCol with npm start [VocolPortNumber] [SparqlEndPointPortNumber]. In the following command, we are going to start Vocol on port 3000 where Fuseki Server is runing at port 3030
npm start 3000 3030
  1. You can access VoCol start page with http://localhost:3000 , if the port number was not changed. If you clear old data as step 4 describes, then the configuration page will be displayed. Otherwise, you can use http://localhost:3000/config URL for configuring of the VoCol. Sometimes, the port number is also changed during our project's development, for that, you have a possibility to look-up the vocol access's port number and as well change it, by opening bin/www file if you are on the root path of VoCol.

  2. To keep your repository synchronized with VoCol instance (for example when you push something), you should configure a webhook path on the repository hosting platform such as Github, GitLab and BitBucket to point with the VoCol API: http(s)://hostname(:port or /vocolInstancePath)/listener. The connection between both hosting server and VoCol instance should be available in such a way that hosting platform can send the notification to the VoCol instance. Please the fundamental explanations of WebHooks in the following link: https://developer.github.com/webhooks/.

For more details about VoCol repository, please have a look on our VoColWiki.

Check out a list of projects that are currently using VoCol.

Moreover, you can use the docker image of VoCol here or use the included Dockerfile to build the docker image.

License

VoCol is licensed under the MIT License. See LICENSE.txt for more details. For respective licenses of individual components and libraries please refer to the Required libraries and tools section.

Current Work

We have extened this VoCol version to work As A Service in VoCoREG. Please, visit us on the following link: https://www.vocoreg.org or https://www.vocoreg.com

vocol's People

Contributors

0ah0 avatar ahemaid avatar bevand10 avatar clange avatar jimkont avatar lavdim avatar mehrdadbozorg avatar np00 avatar soeren1611 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vocol's Issues

Another alternative to consider: LODE

@kurzum thanks for pointing me to https://github.com/NLP2RDF/ontologies/blob/master/publish.sh. Indeed LODE is a great documentation tool to consider. As we do not yet have a web server in place I modified the invocation so as to upload a file to the server where LODE is running, but actually for our ontology (sources at https://github.com/mobivoc/mobivoc/), LODE's documentation generated from the uploaded file is empty, and right now I do not have time for debugging.

@jerdeb @badmotor the bad thing about LODE is that it relies on the ontology to be published somewhere, or uploaded, as it fetches it using JavaScript. Whereas SpecGen generates static HTML, which, I think, would fit better into an automated workflow. (However I checked the LODE sources; it should be possible to modify them.)

Parrot seems to be more promising: it allows for file upload and gives you a static HTML, so I'll continue with that.

Of course, when using LODE or Parrot, we should first upload our files somewhere, or modify them to generate static HTML offline, as uploading lots of files there is against the netiquette.

BTW here are some reasonable ways to invoke curl with a file upload:

curl -s -i -F "[email protected]" -F "lang_label=en" -F "caller=http://www.essepuntato.it/lode" http://www.essepuntato.it/store.php

will tell you the URL where to retrieve the HTML documentation.

curl -s -L -o mobivoc.lode.html -F "[email protected]" -F "lang_label=en" -F "caller=http://www.essepuntato.it/lode" http://www.essepuntato.it/store.php

will download the file (but it's not really useful as it's not static).

Notify vocabulary engineers of errors

To make more precise what we wrote in the paper: I think there is an easy way of assigning vocabulary engineers to all generated validation issues. We could assume that a team vocabulary_engineers has been set up in the repository, and determine all users in this team. Thus, issues would be Cced to all vocabulary engineers. (I don't see an easy way of notifying the single vocabulary engineer who should be “in charge” of a specific issue.)

Wrap specgen call into a Makefile rule

… so that we can generate HTML from as many vocabularies as we like with a single, simple call.

Into such a Makefile we can also wrap any pre-processing (e.g. if specgen required RDF/XML input, which we'd have to produce from our Turtle source).

make sure that cronjob is run in the right directory

@np00's new vocolJob.sh invokes some other programs using relative paths. For them to be found, the cronjob must be executed in the right directory. Crontab should look something like this:

SHELL=/bin/bash
PATH=/usr/local/bin:/usr/bin:/bin
*/5 * * * *     cd $HOME/place/of/the/github/repository/named/vocol; ./vocolJob.sh

(BTW this is a more elegant way to refer to the shell.)

It may be easier to prepare crontab as a file, instead of generating it on the fly with "echo".

Fix URLs instances

Change static URL instances on rdfa document to mobivoc representation

Make modules of the VoCol workflow (e.g. validation/publication component) easily choosable by configuration

E.g. a configuration file whose entries somehow feed into the Makefile and Vagrantfile (and its provisioning bootstrap script).

In the spirit of #36 there might even be a web frontend for choosing the desired components when setting up a new VoCol project.

Desirable documentation generators:

Desirable validators:

Once we start integrating more of the above, let's use separate issues for each one.

syntax error

Line number 23 consists of the following Error: syntax error

Use stow package manager for installations w/o a package manager

We are aiming at installing most packages using the system's package manager (e.g. apt-get on Ubuntu, zypper on SUSE, etc.), as this is the cleanest way. It permits uninstallation and easy updates and therefore helps to maintain a VoCol installation over a long time.

(BTW if PyGithub is available through apt-get on Ubuntu – on SUSE it is! – we should install it using apt-get rather than pip. pip permits uninstallation but is, of course, not integrated with the system-wide update manager.)

Raptor remains to be installed manually. To make it uninstallable, we can use stow, a poor man's package manager. stow will have to be installed using configure && make && make install, but from that point onwards one can change the following lines

tar -zxvf raptor2-2.0.15.tar.gz
cd raptor2-2.0.15
./configure # no sudo required here, only required for "make install"
make
sudo make install

to …

# as user mobivoc:

tar -zxvf raptor2-2.0.15.tar.gz
cd raptor2-2.0.15
./configure --prefix /usr/local/stow/$(basename $PWD)
make
sudo make install # BTW everything except this command should be executed as non-root, e.g. as user "mobivoc"
(cd /usr/local/stow/$(basename $PWD); sudo stow -v .)

FYI the $(basename $PWD) construction is not strictly necessary, but please enter basename $PWD once to understand how it works :-)

make install now installs stuff into /usr/local/stow/packagename. In the latter directory, stow . creates symlinks such as /usr/local/bin/program -> /usr/local/stow/packagename/bin/program, whereas stow -D . "uninstalls" the package by removing these symlinks.

Use Eyeball for semantic validation

@np00, once syntactic validation (#9, #10) works I would also like us to implement some level of semantic validation. First a bit of generic semantic validation, later maybe extending it to MobiVoc-specific rules and "code styles".

Jena's Eyeball looks suitable for this. On the generic level I have used it before, but it is also highly configurable beyond that.

Eyeball has a comprehensive command-line frontend, but if the output becomes too complex to process, we can also invoke Eyeball from the Java side.

I told @lavdim about it, too, but will for now assign all validation-related issues to you.

Clean up copies of *.jar files

There are now JAR files (of Jena etc.) in HtmlGenerator/libs and, once more, bootstrap.sh also downloads such files. I'd recommend not to add anything to the repo that bootstrap.sh can also download :-)

Add back-links to the source git repository and to "new issue"

An idea for the future – very useful but requires a lot of work.

Concrete example: look into https://schema.org/Mountain. Why does a mountain have a fax number? Imagine that a link from faxNumber on the Mountain documentation page takes the reader directly to the source code of the affected class or property. Or that you have a "create new issue" button that takes you to a GitHub "new issue" form, pre-filled with some information about the class/property. (Not sure the latter is possible in GitHub.)

This can be done either by modifying the schema.org HTML generator's sources or by post-processing its HTML output.

Set up cronjob (e.g. once a day) to update manually installed services (Google App Engine, Fuseki, …)

Google App Engine (the same holds for Fuseki and anything else) is currently installed manually because it's not normally available through the package manager. In the interest of security it would be important to keep these installations up to date. A daily cronjob could take care of checking whether there is a new version (e.g. looking here: https://storage.googleapis.com/appengine-sdks/), and if so, download it and restart the service.

Adapt Parrot output to publication on our own web server

To adapt the documentation generated by Parrot (#4), we need to do the following:

At the very least we need to copy (if permitted by the license) CTIC's images, CSS files, etc. Changing the base URL, which is what https://github.com/mobivoc/mobivoc/blob/master/Makefile currently does, is a crude hack and breaks links inside the documentation.

Or we need to adapt the links.

Or get used to invoking the command-line version of Parrot (which would be more scalable anyway).

Serve vocabulary through a SPARQL endpoint (proxied through Apache)

… and wrap the SPARQL endpoint into port 80 by using some kind of an Apache proxy configuration (because other ports will not necessarily be open on the server that runs VoCol, for security reasons).

Here's how this proxy configuration works: http://stackoverflow.com/questions/7529324/how-to-rewrite-proxy-an-apache-uri-to-an-application-listening-on-a-specific-p. The same pattern will be applicable to making Google App Engine (for schemaorg) on port 8080 publicly available through port 80.

Publish ontology and documentation in LOD style

e.g. so that http://purl.org/net/mobivoc/ redirects to the ontology or its documentation, depending on the content type requested by the client during content negotiation.

In our case, http://www.w3.org/TR/swbp-vocab-pub/#recipe5 applies. It's a matter of taste whether we do the configuration in .htaccess files somewhere in the virtual host's directory (/srv/www/htdocs/ok-mobivoc), or whether we do it right in the virtual host configuration file. In any case this requires that not the complete root (/) is "proxied" to Google App Engine, but Apache itself needs to remain in charge at least for serving the RDF/XML. (See #38)

This requires an all-in-one Mobivoc.rdf file (RDF/XML), which can be produced from the existing all-in-one Mobivoc.ttl file with a simple invocation of rapper. (@np00 should know how.)

Install cron if needed

Apparently the Ubuntu base "box" for Vagrant already had cron installed. On our demo server this was not the case. bootstrap.sh should therefore at least check whether cron is available and, if not, install it.

Deploy complete generation workflow on a server

… where the server would run a cronjob, which would periodically …

  1. pull from some git repository using a special user account with sufficient permissions
  2. run the HTML generation machinery (see #6)
  3. push the generated HTML to the gh-pages branch

(2) and (3) are already covered by make .sync.

What do we do with error messages if we encounter any? Email them to someone, or output them to a “hidden” file in gh-pages?

Prevent race conditions: record IDs of all commits that have been processed already

vocolJob.sh currently calls issueGenerator.py and vocabularyGenerator.py with an INTERVAL of 5 minutes. vocolJob.sh itself is run by cron every 5 minutes. Thus it's theoretically possible that we lose some commits. vocolJob.sh should therefore consider more commits than just those of the past 5 minutes. To prevent double processing of a commit, it should record all commits it has processed already.

Convert Turtle input to the RDFa format that the schema.org HTML generator expects

Here is an example of the expected input: https://github.com/rvguha/schemaorg/blob/master/data/schema.rdfa

BTW the file that should ultimately be converted is one of mobivoc.* in https://github.com/mobivoc/mobivoc. These are generated by running make (which requires rapper to be installed). https://github.com/mobivoc/mobivoc/Makefile (which should ultimately become part of vocol; see #6) generates mobivoc.nt from the *.nt (N-Triples) versions of each *.ttl module, and then, from mobivoc.nt, the other mobivoc.* files. Processing mobivoc.nt is the most direct way, but you can also process mobivoc.ttl or mobivoc.rdf.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.