<commit_before>Installation
============

Yith Library Server is a python 3 application so the first
thing you need to do is install this version of your favourite
language. You will also need the development package since some
of Yith Library Server dependencies need to compile stuff.

.. code-block:: bash

   sudo yum install python3 python3-devel

Afterwards you should be a good Python citizen and create a
virtualenv so you don't mess your system up:

.. code-block:: bash

   virtualenv -p python3 --no-site-packages yith
   cd yith
   . bin/activate

Now you are ready to download the code and install it in development mode:

.. code-block:: bash

   git clone <EMAIL>:Yaco-Sistemas/yith-library-server.git
   cd yith-library-server
   python setup.py develop


Database setup
--------------

Yith Library Server uses MongoDB for its storage needs. In modern
operating systems it is pretty easy to install MongoDB. As an example,
in Fedora 17 it is as easy as running these two commands:

.. code-block:: bash

   sudo yum install mongodb mongodb-server
   systemctl start mongod.service

By default Yith Library Server will look for a MongoDB server in `localhost`,
listening on port `27017` and will use a database named `yith-library`.
Of couse you can change these settings by editing the mongo_uri option in
either the `development.ini` or `production.init` configuration files.<commit_msg>The systemctl command needs to be run as root<commit_after>Installation
============

Yith Library Server is a python 3 application so the first
thing you need to do is install this version of your favourite
language. You will also need the development package since some
of Yith Library Server dependencies need to compile stuff.

.. code-block:: bash

   sudo yum install python3 python3-devel

Afterwards you should be a good Python citizen and create a
virtualenv so you don't mess your system up:

.. code-block:: bash

   virtualenv -p python3 --no-site-packages yith
   cd yith
   . bin/activate

Now you are ready to download the code and install it in development mode:

.. code-block:: bash

   git clone <EMAIL>:Yaco-Sistemas/yith-library-server.git
   cd yith-library-server
   python setup.py develop


Database setup
--------------

Yith Library Server uses MongoDB for its storage needs. In modern
operating systems it is pretty easy to install MongoDB. As an example,
in Fedora 17 it is as easy as running these two commands:

.. code-block:: bash

   sudo yum install mongodb mongodb-server
   sudo systemctl start mongod.service

By default Yith Library Server will look for a MongoDB server in `localhost`,
listening on port `27017` and will use a database named `yith-library`.
Of couse you can change these settings by editing the mongo_uri option in
either the `development.ini` or `production.init` configuration files.
{'fraction_non_alphanumeric': 0.06673691605198455, 'fraction_numerical': 0.007727432384966632, 'mean_word_length': 3.7466666666666666, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3281369', 'n_tokens_mistral': 797, 'n_tokens_neox': 741, 'n_words': 396}