Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Rhizi/rhizi
Connective intelligence
https://github.com/Rhizi/rhizi
Last synced: about 1 month ago
JSON representation
Connective intelligence
- Host: GitHub
- URL: https://github.com/Rhizi/rhizi
- Owner: Rhizi
- License: agpl-3.0
- Created: 2014-06-23T11:50:50.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-04-19T20:21:37.000Z (over 7 years ago)
- Last Synced: 2024-08-01T12:31:20.530Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 5.18 MB
- Stars: 13
- Watchers: 9
- Forks: 3
- Open Issues: 178
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - Rhizi/rhizi - Connective intelligence (others)
README
# Rhizi
[![Circle CI](https://circleci.com/gh/Rhizi/rhizi.svg?style=shield)](https://circleci.com/gh/Rhizi/rhizi.svg)
A collaborative graph editor for organizing, communicating, and analyzing data in graph form.
[Screencast tutorial](https://www.youtube.com/watch?v=yRQtUPCzd3A)
It is licensed under the GNU AGPL v3, see LICENSE for more details.Patches or pull requests are welcome but we require a contributor license agreement, see TBU
# Dependencies
Database:
- Neo4J DB server >= 2.1.5 - http://neo4j.com/download/Server:
- Python 2.7 or 3.4
- Apache Ant >= 1.9.0
- Python dependencies as described in `requirements.txt`Client
- currently bundled, but listed in bower.jsonFor rebuilding client css from scss saource files you will need:
- sass (scss tool)Build dependencies:
- ant
- make# Installation
## Apt based systems: Debian / Ubuntu# apt-get install \
ant \
python-pip \
ruby-sass## Generic
use pip to install all requirements$ pip install -r requirements.txt
Use npm for javascript (client) requirements, currently for development (testing) only, all other external dependencies are part of the repository:
$ npm install
# Running instructions
## Running Rhizi Locally
To run Rhizi locally:
- Run neo4j locally on the default 7474 portneo4j console
orneo4j server
after installing neo4j: we use 2.2.1 from http://neo4j.com
- Launch run-local.sh:
$ ./run-local.sh
Or perform the following by hand:
- Invoke the local deployment Ant target:
ant -f ./build.ant deploy-local
- Run rhizi-server.py:
$ cd deploy-local && python bin/rz_server.py --config-dir=etc
Command line use documentation can be viewed with:
:$ python rz_server.py -h## Configuration
Rhizi configuration is currently documented in code, seesrc/server/rz_server.py#Config
## User addition
Through the sign up page you can add users.## Changing users roles
This is possible through the src/local/rz_cli_tool as follows:
./src/local/rz_cli_tool.py --config-dir res/etc --user-db-path res/user_db.db --email [email protected] --role-add admin# Development
Build currently uses Apache Ant(http://ant.apache.org/) and [make](https://www.gnu.org/software/make/)To update the css files you need [sass](http://sass-lang.com/). 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`
Client testing:
$ npm install
$ karma start## Coding Conventions - Ant Scripts
- use underscore as delimiter in var name, eg:pkg_foo_bar
## Coding Conventions - CSS / SCSS
- assume use of modern browsers
- indent files using 4 space characters
- apply alphabetical ordering whenever possible: selectors, directives, etc.
- use a combination of CSS classes / IDs to draw common/unique styling, eg.class=form-Foo\_input-field id=email-field
- minimize use of CSS directives, remove directives which have no effect
- avoid using browser-specific CSS directives when hand-writing CSS code## Neo4J DB management
- Clean Neo4J instances are auto-initialized by the rhizi server
- to reset the DB manually:
$ neo4j-shell -file res/neo4j/reset-db__clean.cypher## 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.## Random data generation
Taks a look atsrc/server-tests/test_util__rzdoc#DBO_RDG__skill_graph
as a starting point for random data generation.## Installing on windows (WIP)
mingw doesn't have python support, so using mingw (I want a unix native python)- www.cygwin.com setup-x86_64.exe
- use correct mirror (i.e. mirror.isoc.org.il)
- defaults (c:\cygwin64)
- python + gvim + vim + python-six + git + git-completion + tig + ruby + ruby-sass + make + gcc-core + autoconf + automake
- start cygwin shell
- cd to directory of install
- git clone or extract tarball
- cd rhizi
- install neo4j from neo4j.com community eddition (neo4j-community_windows_2_1_6.exe)
- install python prerequisites:
- download get-pip.py from http://pip.pypa.io/en/latest/installing.html
- $ python get-pip.py
- install JDK: java SE development Kit 8 jdk-8u31-windows-x64.exe
- install ant: winant.googlecode.com/files/winant-install-v7.exe
- specify JDK install directory, i.e. C:\Program Files\Java\jdk1.8.0_31
- Current ant bug: /usr/bin/rhizi is translated by ant to \usr\bin\rhizi and so it fails to find rhizi.
- solution 1: replace /usr/bin/rhizi with rhizi, it will find rhizi in PATH
- solution 2: ?
- pip install flask
- pip install gevent-websocket
- pip install gevent never completes setup.py stage
- solution 1: pip install cython git+git://github.com/surfly/gevent.git#egg=gevent
- didn't complete.# Deployment
Deployment, that is installation on a different server that has none of the development prerequisites installed, takes two forms currently:
- development mode, in which flask handles all resource serving, including client/server code, resources & fragments
- reverse proxy mode, in which a reverse proxy, eg. Apache is used to serve all static contentThese modes impost a slightly different resource layout, and require the following values to be correcly set/injected:
- app.js:fragment_d_path
, handled by jinja
- rhizi-server.conf:fragment_d_path
- rhizi-server.conf:template_d_path
## Deployment Steps
- obtain a server configuration by either adjusting res/etc/rhizi-server.conf.example or reusing an already active one.
- the following configuration keys will likely need changing: DEBUG, SECRET_KEY, root_path, access_control, etc.
- let targetDomain be the target domain (i.e. rhizi.example.com)
- place configuration at res/production-patch-set/${targetDomain}/rhizi-server.production.conf
- use the build.ant deploy-remote target:
- adjust targetDomain path: should point at the configuration's file dir
- adjust remoteDeployServer to point at the target server
- use res/debian/rhizi.init to run rhizi as a system process: rz_server.py will need chmod'ing to +x- Deploying:
$ ant -v -f build.ant -DremoteDeployServer=rhizi.example.com -Drsync_module=/srv/www/rhizi.example.com deploy-remote### getting the current config file from the server:
$ targetDomain="cri.rhizi.net"
$ mkdir res/production-patch-set/${targetDomain}
$ scp rz-1:/etc/rhizi/rhizi-server.conf res/production-patch-set/${targetDomain}/rhizi-server.production.conf# Tools
## rz-doc
This is the only way to merge a number of documents right now. Here is how:It is installed by default to /srv/www//tools/rz-doc, lets call that rz-doc for short.
rz-doc --list-names
- will show all available documents. uses default config in /etc/rhizi/rhizi-server.conf, can be overridden with --config-dir1.
rz-doc --list-names > merge.file
2.rz-doc --merge-file merge.file --merge-target "All Documents"
creates a new doc called "All Documents" with the contents of all rzdocs in merge.file.
## API(WIP)
[url]/api/rzdoc/[doc-title]/delete