<commit_before>.. _development:

Development
===========

Requirements
------------

Get the code
~~~~~~~~~~~~

The code is available on Github::

  $ git clone https://github.com/wger-project/wger.git

Create a virtual environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It's a best practise to create a Python virtual environment::

  $ virtualenv --python python3 venv-wger
  $ source venv-wger/bin/activate
  $ cd wger


Install Requirements
~~~~~~~~~~~~~~~~~~~~

To install the Python requirements::

  $ pip install -r requirements_devel.txt
  $ python setup.py develop

Install application
~~~~~~~~~~~~~~~~~~~

To install the development server, init the databasse and create a settings
file::

  $ wger create_settings \
           --settings-path /home/wger/wger/settings.py \
           --database-path /home/wger/wger/database.sqlite
  $ wger bootstrap \
           --settings-path /home/wger/wger/settings.py \
           --no-start-server

Start the server
----------------

To start the server::

  $ python manage.py runserver

That's it. You can log in with the default administator user:

* **username**: admin
* **passsword**: <PASSWORD>
<commit_msg>Small improvements.<commit_after>.. _development:

Development
===========

Assumptions
-----------

For clarity purposes regarding these instructions we are assuming the following

* You will be installing the program in ``/home/wger/wger``


Requirements
------------

Get the code
~~~~~~~~~~~~

The code is available on Github::

  $ git clone https://github.com/wger-project/wger.git

Create a virtual environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It's a best practice to create a Python virtual environment::

  $ virtualenv --python python3 venv-wger
  $ source venv-wger/bin/activate
  $ cd wger


Install Requirements
~~~~~~~~~~~~~~~~~~~~

To install the Python requirements::

  $ pip install -r requirements_devel.txt
  $ python setup.py develop

Install application
~~~~~~~~~~~~~~~~~~~

To install the development server, init the database and create a settings
file::

  $ wger create_settings \
           --settings-path /home/wger/wger/settings.py \
           --database-path /home/wger/wger/database.sqlite
  $ wger bootstrap \
           --settings-path /home/wger/wger/settings.py \
           --no-start-server

Start the server
----------------

To start the server::

  $ python manage.py runserver

That's it. You can log in with the default administrator user:

* **username**: admin
* **password**: <PASSWORD>

{'fraction_non_alphanumeric': 0.17838489353153877, 'fraction_numerical': 0.0008035355564483728, 'mean_word_length': 3.0356564019448946, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '6677351', 'n_tokens_mistral': 724, 'n_tokens_neox': 679, 'n_words': 227}