summaryrefslogtreecommitdiff
path: root/README.mediawiki
blob: 37f7dca34a6e1e22e5ef75ad11eac08dd2cb9d18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
= Rhizi =

A collaborative editor for organizing, communicating, and analyzing data in graph form.

= Requirements =
* Neo4J DB server
* Python 2.7
* Flask
* Apache Ant
* python-gevent
* python-gevent-websocket
* python-socketio

= Use =

== requirements ==
=== Server ===
==== neo4j ====
Install [neo4j](http://neo4j.com/download/)

==== python libs ====
Install all of:
# [gevent-socketio](https://pypi.python.org/pypi/gevent-socketio/)
# [flask](http://flask.pocoo.org/)
# [flask-mail](https://github.com/mattupstate/flask-mail)

Or install it all via pip:
<code>
 pip install gevent-socketio
 pip install flask
 pip install flask-mail
</code>

=== Client ===
All of the following are already bundled but noted here for reference:
# [feedback](https://github.com/ivoviz/feedback) (it also bundles [html2canvas](http://html2canvas.hertzen.com/))
# jquery
# d3
# FileSaver

== Running Rhizi Locally ==
To run Rhizi locally:
For testing locally run neo4j locally on the default 7474 port and then launch run-local.sh:<br><code>./run-local.sh</code>

Or perform the following tasks by hand:
# Update css files from scss sources using <code>make</code>
# Invoke the local deployment Ant target:<br><code>$ cd ./rhizi && ant -f build.ant deploy-local</code>
# Assert Neo4J is running and listening on it's default port
# Run rhizi-server.py:<br><code>$ cd deploy-local && python bin/rz_server.py --config-dir=etc</code>

Command line use documentation can be view with:
:$ python rz_server.py -h

== Installation ==

=== Setup user password file ===
The following works in conjunction with run-local.sh, for real deployment place the resulting htpasswd file in the location matching the config you use.
# put a SECRET_KEY entry in the config file:
  echo SECRET_KEY=mysecret >> res/etc/rhizi-server.conf
# create an initialization file with email/password separated by a comma:
  echo test@example.com,test > res/etc/htpasswd-init-file
# create the htpasswd file:
  python src/server/rz_server.py --init-htpasswd-db --htpasswd-init-file res/etc/htpasswd-init-file

= Development =

To update the css files you need [sass](http://sass-lang.com/)

The build tool is [make](https://www.gnu.org/software/make/)

To rebuild the css files issue make from the top level directory:

 $ make
 
 For dev mode(debbuging, manual file load) use `?debug=1` at end of URL: e.g. `file://rhizifolder/html.index?debug=1`

== Neo4J DB management ==

* Use <code>$ neo4j-shell -file reset-db__single_link.cypher</code> to bring the DB to an empty state, excluding two nodes and a single link.

== Running server tests ==

Test code makes use of Python's unittest - run by invoking them with python,
or by creating a launch configuration in your IDE of choice.

Note: server test-cases do not yet support pre-run DB state validation and are
likely to leave DB side-effects.