<commit_before>==========================
Newebe, Feel Free to Share
==========================

Growth of web applications has been a huge improvement for social sharing and
collaborative work. Unfortunately, to enjoy these new tools, we have traded 
our privacy. Newebe aims to solve this problem by providing a social 
tool you host at your home and that connects directly with your contacts. 

Before you ask, Newebe is not like Diaspora, it is thinked distributed in a
peer-2-peer manner : it is designed to be self-hosted and does not require
3rd party server.


Installation Instructions
=========================

Check the website install section : http://newebe.org/#install

Set up a development environment (Ubuntu and Debian)
==============================================

**Server**

Install following packages::

    python python-setuptools python-pip python-pycurl python-imaging couchdb
    git libxml2-dev libxslt-dev


For ubuntu::

    sudo apt-get build-dep python-imaging

Add link required by PIL::

    ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib

Install virtualenv::

    sudo pip install virtualenv

Retrieve Newebe project::

   git clone http://github.com/gelnior/newebe.git 
   cd newebe

Create and activate virtualenv::

    virtualenv --no-site-packages virtualenv
    . virtualenv/bin/activate

Then via easy_install::

    pip install -r deploy/requirements.txt
    pip install -r deploy/requirements-dev.txt

In Newebe settings file (*settings.py*), set *DEBUG* variable to *True*.

Go inside newebe folder::

   cd newebe

Then, still in Newebe directory set DB by running::

   python tools/syncdb.py


Change parameters such as port, debug mode and timezone inside a config file 
called config.yaml. Here is an exemple of config file (see 
wiki_ for a complete descritpion)::

    main:
        port: 8000
        timezone: "Europe/Paris"
        debug: True
    db:
        name: "newebe"
    security:
        cookie_key: "<KEY>

Run server::

    python newebe_server.py --debug=True

In your browser, connect to http://localhost:8000/ and check that 
everything is fine.

.. _wiki: //github.com/gelnior/newebe/wiki/Config-file]

**Client**

To work on client you will need node.js. So first install it::

   git clone https://github.com/ry/node.git

   cd node
   ./configure
   make
   make install

Now install tools we need, Coffeescript, Cake, Stylus and UglifyJS::

     npm install coffe-script cake uglifyjs stylus

Then when you finish to work on client code. At the root of the module you
worked on, type::

    cake build 

or for automatic build::

    cake watch

Run tests (backend)
===================

Activate your virtual env, then install test dependencies::
    
   virtualenv --distribute --no-site-packages virtualenv
   . virtualenv/bin/activate
   pip install -r deploy/requirements-dev.txt<commit_msg>update dev environment instructions<commit_after>==========================
Newebe, Feel Free to Share
==========================

Growth of web applications has been a huge improvement for social sharing and
collaborative work. Unfortunately, to enjoy these new tools, we have traded 
our privacy. Newebe aims to solve this problem by providing a social 
tool you host at your home and that connects directly with your contacts. 

Before you ask, Newebe is not like Diaspora, it is thinked distributed in a
peer-2-peer manner : it is designed to be self-hosted and does not require
3rd party server.


Installation Instructions
=========================

Check the website install section : http://newebe.org/#install

Set up a development environment (Ubuntu and Debian)
==============================================

**Server**

Install following packages::

    python python-setuptools python-pip python-pycurl python-imaging couchdb
    git libxml2-dev libxslt-dev


For ubuntu::

    sudo apt-get build-dep python-imaging

Add link required by PIL::

    ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib

Install virtualenv::

    sudo pip install virtualenv

Retrieve Newebe project::

   git clone http://github.com/gelnior/newebe.git 
   cd newebe

Create and activate virtualenv::

    virtualenv --no-site-packages virtualenv
    . virtualenv/bin/activate

Then via easy_install::

    pip install -r deploy/requirements.txt
    pip install -r deploy/requirements-dev.txt

In Newebe settings file (*settings.py*), set *DEBUG* variable to *True*.

Go inside newebe folder::

   cd newebe

Then, still in Newebe directory set DB by running::

   python tools/syncdb.py


Change parameters such as port, debug mode and timezone inside a config file 
called config.yaml. Here is an exemple of config file (see 
wiki_ for a complete descritpion)::

    main:
        port: 8000
        timezone: "Europe/Paris"
        debug: True
    db:
        name: "newebe"
    security:
        cookie_key: "<KEY>

Run server::

    python newebe_server.py --debug=True

In your browser, connect to http://localhost:8000/ and check that 
everything is fine.

.. _wiki: //github.com/gelnior/newebe/wiki/Config-file]

**Client**

To work on client you will need node.js. So first install it::

   git clone https://github.com/ry/node.git

   cd node
   ./configure
   make
   make install

Now install Brunch the front-end assembler:

     npm install brunch -g

Install build dependencies

     cd client
     npm install

Then watch for file modifications to build the client on change:

     cd client
     brunch w


Run tests (backend)
===================

Activate your virtual env, then install test dependencies::
    
   virtualenv --distribute --no-site-packages virtualenv
   . virtualenv/bin/activate
   pip install -r deploy/requirements-dev.txt
{'fraction_non_alphanumeric': 0.11649808161841646, 'fraction_numerical': 0.005231949773282177, 'mean_word_length': 3.463035019455253, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '440038', 'n_tokens_mistral': 1710, 'n_tokens_neox': 1587, 'n_words': 657}