crowd
web-src
: Web directory for Apache or Nginx web server.
After reading this Readme, see ./web-src/coffee/Readme.md
for more information about the CoffeeScript developing and its directory structure.
Requirements
- Install Apache o Nginx web server with PHP5 o PHP7 module support.
- Fish shell.
- nodejs, npm and coffee-script (see below for installation of the latter using npm).
- crowd supports coffeescript@2.2.2
- mysqli library for PHP.
Installation
You can run the scripts/install.fish
script, it will setup the current working directory, or you can do the following steps:
- Copy
web-src
into the web directory (usually/var/www/html
for the Apache server). - Copy the
web-src/config/config.php.example
intoweb-src/config/config.php
and open the file.- Check the configuration parameters at the
config.php
file.
- Check the configuration parameters at the
- Ensure that the web server can access the "run" directory. It needs to write the following files:
./run/input-file.owllink
for writing OWLlink to be sent to Reasoner,./run/konclude-out-file.owllink
for writing OWLlink output for Konclude reasoner,./run/crowd.owl
for writing OWL 2 ontologies to be imported into crowd,./run/crowdsparqldl.json
for writing JSON output after querying crowd.owl using SPARQL-DL You can execute (suppose "www-data" is the username associated to the web server):
On some systems, you may have to configure SELinux parameters to enable Apache writing privileges. You can use thesudo chgrp -R www-data run sudo chown -R g+rwx run
./tests/test-satisf-json.sh
for checking if it is correctly set.
- Also, configure PHP for not writing Warnings or Errrors on the HTML produced page. This is done by setting the following on
/etc/php.ini
config file:
This will log errors and warnings instead of showing on the generated HTML page. Seedisplay_errors = Off log_errors = On
error_log
configuration parameter, its value is the log filename and path, usually its deafult value is:/var/log/php/php_error.log
.
Install CoffeeScript Compiler
- Install
nodejs
andnpm
. - Install coffee by executing
sudo npm install --global coffeescript
- Test the
coffee
command, it must open a CoffeeScript shell. Exit withCtrl d
.
Compile CoffeeScript
Use the scripts/compilar-coffee.sh
script located under the root project directory.
Use scripts/compile-coffee.fish WHAT
to compile one part of the CoffeeScript code when developing. Example: scripts/compile-coffee.fish tests
for compiling the tests suite.
Installing Coffee script on Eclipse Mars.1 Release (4.5.1)
From Eclipse -> Help -> Install New Software... install
Install plugin Xtext complete SDK from
Install plugin Coffee script plugin https://github.com/adamschmideg/coffeescript-eclipse
Generating js code from coffee script Eclipse Mars.1 Release (4.5.1)
- Create an External Tools Configuration
- Location: add path to compile coffee.sh
- Working Directory: path to Eclipse project.
Test
At the ./test/
directory you'll find proper fish scripts for running tests.
Javascript
PHP
Install PHPUnit for testing.
Execute:
cd tests
./test_php.fish
Documentation
Use doxygen
or doxywizard
(the Doxygen GUI) for compiling the PHP documentation on docs/doxygen
.
- Execute
doxygen
command on the main directory, or - Execute
doxywizard
and open the Doxyfile on the main directory; then click on the "run doxygen" button in the "run" tab.
CoffeeScript Documentation
We use codo. However, docco can be used too.
For installing codo:
sudo npm install -g codo
For installing docco:
sudo npm install -g docco
Compiling documentation:
Use scripts/generate-coffee-api.fish
from the project root directory for creating documentation with the codo program.
Use scripts/generate-coffee-api.fish t
for compiling using both codo and docco.
Licence
Images :
- Traffic Lights downloaded from OpenClipart at: https://openclipart.org/detail/195669/green-traffic-light