Small documentation polishing

This commit is contained in:
Roland
2020-06-25 15:47:24 +02:00
parent b0736f15ad
commit 933452d5f3
11 changed files with 37 additions and 82 deletions

View File

@@ -1,4 +1,4 @@
Thank you for downloading wger Workout Manager. wger (ˈɡɐ) is a free, open source web
docker run -ti -v /path/to/this/checkout:/home/wger/src --name wger.devel --publish 8000:8000 wger/develThank you for downloading wger Workout Manager. wger (ˈɡɐ) is a free, open source web
application that manages your exercises and personal workouts, weight and diet
plans. It can also be used as a simple gym management utility, providing different
administrative roles (trainer, manager, etc.). It offers a REST API as well, for
@@ -25,37 +25,13 @@ parameters.
Docker
------
Useful to just try it out::
Useful to just try it out. Check the documentatio on how to use docker for
development::
docker run -ti --name wger.apache --publish 8000:80 wger/apache
Then just open http://localhost:8000 and log in as: **admin**, password **admin**
Alternatively, there are docker images for development as well, ``wger/devel``
and ``wger/devel-fedora``. Each image contains an instance of the application
running with django's development server using a sqlite database and can be
used to quickly setup a development instance (vim and tmux are already
installed). The only difference is that devel has an ubuntu base image while
devel-fedora uses fedora.
::
$ docker run -ti --name wger.devel --publish 8000:8000 wger/devel
Then, *within the docker image*, activate the virtualenv
::
$ source ~/venv/bin/activate
and start the development server
::
$ python manage.py runserver 0.0.0.0:8000
Then just open http://localhost:8000 and log in as: **admin**, password **admin**
Development version (from git)
------------------------------
@@ -68,7 +44,7 @@ and stable state.
::
$ sudo apt-get install python3-dev python-virtualenv nodejs npm libjpeg8-dev zlib1g-dev git
$ sudo apt-get install python3-dev nodejs npm git
Then install the python packages from pypi in the virtualenv::
@@ -84,7 +60,12 @@ Then install the python packages from pypi in the virtualenv::
$ git clone https://github.com/wger-project/wger.git
$ cd wger
$ pip install --upgrade pip
$ pip install wheel
$ pip install -r requirements_forked.txt
$ pip install -r requirements.txt # or requirements_devel.txt to develop
$ npm install
$ npm install bower
$ python setup.py develop
$ wger create_settings \
--settings-path /path/to/current/folder/settings.py \
@@ -108,8 +89,8 @@ Stable version (from PyPI)
::
$ sudo apt-get install python3-dev python-virtualenv nodejs npm libjpeg8-dev zlib1g-dev
$ virtualenv venv-django
$ sudo apt-get install python3-dev nodejs npm git
$ python3 -m venv venv-django
$ source venv-django/bin/activate
$ pip install wger
@@ -117,12 +98,15 @@ Stable version (from PyPI)
2) Start the application. This will download the required JS and CSS libraries
and create a SQlite database and populate it with data on the first run.
Then, log in as: **admin**, password **admin**
::
$ wger bootstrap
$ wger bootstrap
3) To start the installation again, just call wger start::
3) To start the installation again, just call wger start
::
$ wger start

View File

@@ -3,11 +3,11 @@ Changelog
1.9 - IN DEVELOPMENT
--------------------
**2017-xx-xx**
**2020-xx-xx**
Upgrade steps from 1.8:
* Django update to 1.11: ``pip install -r requirements.txt``
* Django update to 3.x: ``pip install -r requirements.txt``
* Database upgrade: ``python manage.py migrate``
* Update static files (only production): ``python manage.py collectstatic``

View File

@@ -6,16 +6,7 @@ Coding Style Guide
Python
------
* Code according to PEP8
Check that the code is structured as per pep8 but with a maximum line
length of 100.
* Code for Python 3
While the application should remain compatible with python2, use django's
suggestion to mantain sanity: code for py3 and treat py2 as a backwards
compatibility requirement. If you need, you can use six.
Code according to PEP8, but with but with a maximum line length of 100.
Javascript
@@ -32,9 +23,5 @@ Javascript
Automatic coding style checks
-----------------------------
The coding style is automatically check by Travis-CI. To manually check your
files you can run the following commands:
* Python: ``pep8 wger``
* Javascript: ``./node_modules/.bin/gulp lint-js`` (or just ``gulp lint-js`` if
you installed the node libraries globally on your system)
The coding style is automatically checked by GitHub actions after sending a
pull request.

View File

@@ -26,7 +26,7 @@ Create a virtual environment
It's a best practice to create a Python virtual environment::
$ virtualenv --python python3 venv-wger
$ python3 -m venv venv-wger
$ source venv-wger/bin/activate
$ cd wger
@@ -37,6 +37,9 @@ Install Requirements
To install the Python requirements::
$ pip install -r requirements_devel.txt
$ pip install -r requirements_forked.txt
$ npm install
$ npm install bower
$ python setup.py develop
Install application

View File

@@ -5,6 +5,8 @@ There are docker files available to quickly get a version of wger up and
running. They are all located under ``extras/docker`` if you want to build
them yourself.
Note that you need to build from the project's source folder!
Development
-----------
@@ -15,7 +17,7 @@ and serves it with django's development server.
First build the image::
docker build -t wger/devel .
docker build -f extras/docker/development/Dockerfile -t wger/devel .
Run a container and start the application::
@@ -49,7 +51,7 @@ This image runs the application using WSGI and apache.
First build the image::
docker build --tag wger/apache .
docker build -f extras/docker/apache/Dockerfile --tag wger/apache .
Run a container and start the application::

View File

@@ -14,7 +14,7 @@ slightly different) you will need to change the steps as appropriate.
The application is compatible and regularly tested with
* sqlite, postgres
* python 2.7, 3.4, 3.5 and 3.6
* python 3.6, 3.7 and 3.8
You might also want to take a look at the :ref:`other-changes` section for other
changes you might want to do to your local instance such as Terms of Service or
@@ -29,21 +29,7 @@ contact page.
These are the necessary packages for both development and production
(node and npm are only used to download JS and CSS libraries)::
sudo apt-get install nodejs npm git \
python-virtualenv python3-dev \
libjpeg8-dev zlib1g-dev libwebp-dev
On fedora 23::
sudo dnf install nodejs npm git \
python-virtualenv python3-devel \
libjpeg-turbo-devel zlib-devel
.. note::
The application is developed with python 3, which these installation
instructions also use. If you want to use python 2.7, make sure you install
the appropriate packages (e.g. python-dev instead of python3-dev, etc.)!
sudo apt-get install nodejs npm git python3-dev
.. toctree::

View File

@@ -86,11 +86,3 @@ folders for more details.
.. include the authors file from the root folder
.. include:: ../AUTHORS.rst
Indices and tables
==================
* :ref:`genindex`
* :ref:`search`
* :ref:`modindex`

View File

@@ -94,7 +94,7 @@ Application
Make a virtualenv for python and activate it::
virtualenv --python python3 /home/wger/venv
python3 -m venv /home/wger/venv
source /home/wger/venv/bin/activate
Create folders to collect all static resources and save uploaded files. The

View File

@@ -25,7 +25,8 @@ RUN apt-get update \
build-essential \
python3-dev \
python3-pip \
git
git \
&& rm -rf /var/lib/apt/lists/*
# Set up the application
COPY . .

View File

@@ -14,8 +14,7 @@ LABEL maintainer="Roland Geider <roland@geider.net>"
# Install dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
RUN apt-get install --no-install-recommends -y \
git \
locales \
nodejs \

View File

@@ -33,7 +33,8 @@ RUN apt-get update \
build-essential \
python3-dev \
python3-pip \
git
git \
&& rm -rf /var/lib/apt/lists/*
# Set up the application
COPY . .