[skip travis] update documentation

This commit is contained in:
Sam 2019-08-31 14:55:50 +02:00
parent 26ec79f586
commit 67d1e424d8
9 changed files with 95 additions and 20 deletions

View File

@ -51,7 +51,7 @@ In this release 1 issue was closed.
In this release 7 issues were closed. In this release 7 issues were closed.
## Version 0.1 - Minimal version (2018-07-04) ## Version 0.1.0 - Minimal version (2018-07-04)
### Issues Closed ### Issues Closed

View File

@ -51,7 +51,7 @@ In this release 1 issue was closed.
In this release 7 issues were closed. In this release 7 issues were closed.
## Version 0.1 - Minimal version (2018-07-04) ## Version 0.1.0 - Minimal version (2018-07-04)
### Issues Closed ### Issues Closed

View File

@ -46,8 +46,7 @@ Dev environment
- Update **Makefile.config** file if needed and copy/paste the - Update **Makefile.config** file if needed and copy/paste the
**ThunderForest** and **Dark Sky** API keys value in **ThunderForest** and **Dark Sky** API keys value in
**Makefile.custom.config** file (see example). User registration can **Makefile.custom.config** file (see `Environment variables <installation.html#environment-variables>`__).
also be disabled in **Makefile.custom.config**.
- Install Python virtualenv, React and all related packages and - Install Python virtualenv, React and all related packages and
initialize the database: initialize the database:
@ -83,8 +82,7 @@ Prod environment
- Update **Makefile.config** file if needed and copy/paste the - Update **Makefile.config** file if needed and copy/paste the
**ThunderForest** and **Dark Sky** API keys value in **ThunderForest** and **Dark Sky** API keys value in
**Makefile.custom.config** file (see example). User registration can **Makefile.custom.config** file (see `Environment variables <installation.html#environment-variables>`__).
also be disabled in **Makefile.custom.config**.
- Install Python virtualenv, React and all related packages and - Install Python virtualenv, React and all related packages and
initialize the database: initialize the database:
@ -148,3 +146,21 @@ Prod environment
``TODO`` ``TODO``
Environment variables
~~~~~~~~~~~~~~~~~~~~~
The following environment variables must be defined in **Makefile.custom.config**:
.. cssclass:: table-bordered table-striped
===================================== ======================================= ====================================
variable description app default value
===================================== ======================================= ====================================
``REACT_APP_GPX_LIMIT_IMPORT`` max. number of gpx file in zip archive 10
``REACT_APP_MAX_SINGLE_FILE_SIZE`` max. size of a gpx or picture file 1MB
``REACT_APP_MAX_ZIP_FILE_SIZE`` max. size of a zip archive 10MB
``REACT_APP_ALLOW_REGISTRATION`` allows users to register true
``REACT_APP_THUNDERFOREST_API_KEY`` ThunderForest API key no defaut value, must be initialized
``WEATHER_API`` DarkSky API key no defaut value, not mandatory
===================================== ======================================= ====================================

View File

@ -96,7 +96,7 @@
</li> </li>
</ul> </ul>
</li> </li>
<li><a class="reference internal" href="#version-0-1-minimal-version-2018-07-04">Version 0.1 - Minimal version (2018-07-04)</a><ul> <li><a class="reference internal" href="#version-0-1-0-minimal-version-2018-07-04">Version 0.1.0 - Minimal version (2018-07-04)</a><ul>
<li><a class="reference internal" href="#id5">Issues Closed</a><ul> <li><a class="reference internal" href="#id5">Issues Closed</a><ul>
<li><a class="reference internal" href="#id6">New Features</a></li> <li><a class="reference internal" href="#id6">New Features</a></li>
</ul> </ul>
@ -212,8 +212,8 @@
</div> </div>
</div> </div>
</div> </div>
<div class="section" id="version-0-1-minimal-version-2018-07-04"> <div class="section" id="version-0-1-0-minimal-version-2018-07-04">
<h2>Version 0.1 - Minimal version (2018-07-04)<a class="headerlink" href="#version-0-1-minimal-version-2018-07-04" title="Permalink to this headline"></a></h2> <h2>Version 0.1.0 - Minimal version (2018-07-04)<a class="headerlink" href="#version-0-1-0-minimal-version-2018-07-04" title="Permalink to this headline"></a></h2>
<div class="section" id="id5"> <div class="section" id="id5">
<h3>Issues Closed<a class="headerlink" href="#id5" title="Permalink to this headline"></a></h3> <h3>Issues Closed<a class="headerlink" href="#id5" title="Permalink to this headline"></a></h3>
<div class="section" id="id6"> <div class="section" id="id6">

View File

@ -158,6 +158,7 @@ Map</a>.</div>
<li class="toctree-l2"><a class="reference internal" href="installation.html#prerequisites">Prerequisites</a></li> <li class="toctree-l2"><a class="reference internal" href="installation.html#prerequisites">Prerequisites</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#id1">Installation</a></li> <li class="toctree-l2"><a class="reference internal" href="installation.html#id1">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#upgrade">Upgrade</a></li> <li class="toctree-l2"><a class="reference internal" href="installation.html#upgrade">Upgrade</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#environment-variables">Environment variables</a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l1"><a class="reference internal" href="features.html">Features</a><ul> <li class="toctree-l1"><a class="reference internal" href="features.html">Features</a><ul>
@ -186,7 +187,7 @@ Map</a>.</div>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#version-0-2-1-2019-xx-xx">Version 0.2.1 (2019/xx/xx)</a></li> <li class="toctree-l2"><a class="reference internal" href="changelog.html#version-0-2-1-2019-xx-xx">Version 0.2.1 (2019/xx/xx)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#version-0-2-0-statistics-2019-07-07">Version 0.2.0 - Statistics (2019/07/07)</a></li> <li class="toctree-l2"><a class="reference internal" href="changelog.html#version-0-2-0-statistics-2019-07-07">Version 0.2.0 - Statistics (2019/07/07)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#version-0-1-1-fix-and-improvements-2019-02-07">Version 0.1.1 - Fix and improvements (2019/02/07)</a></li> <li class="toctree-l2"><a class="reference internal" href="changelog.html#version-0-1-1-fix-and-improvements-2019-02-07">Version 0.1.1 - Fix and improvements (2019/02/07)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changelog.html#version-0-1-minimal-version-2018-07-04">Version 0.1 - Minimal version (2018-07-04)</a></li> <li class="toctree-l2"><a class="reference internal" href="changelog.html#version-0-1-0-minimal-version-2018-07-04">Version 0.1.0 - Minimal version (2018-07-04)</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>

View File

@ -87,6 +87,7 @@
<li><a class="reference internal" href="#id3">Prod environment</a></li> <li><a class="reference internal" href="#id3">Prod environment</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference internal" href="#environment-variables">Environment variables</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -192,8 +193,7 @@ $ <span class="nb">cd</span> FitTrackee
<ul class="simple"> <ul class="simple">
<li><p>Update <strong>Makefile.config</strong> file if needed and copy/paste the <li><p>Update <strong>Makefile.config</strong> file if needed and copy/paste the
<strong>ThunderForest</strong> and <strong>Dark Sky</strong> API keys value in <strong>ThunderForest</strong> and <strong>Dark Sky</strong> API keys value in
<strong>Makefile.custom.config</strong> file (see example). User registration can <strong>Makefile.custom.config</strong> file (see <a class="reference external" href="installation.html#environment-variables">Environment variables</a>).</p></li>
also be disabled in <strong>Makefile.custom.config</strong>.</p></li>
<li><p>Install Python virtualenv, React and all related packages and <li><p>Install Python virtualenv, React and all related packages and
initialize the database:</p></li> initialize the database:</p></li>
</ul> </ul>
@ -228,8 +228,7 @@ $ <span class="nb">cd</span> FitTrackee
<ul class="simple"> <ul class="simple">
<li><p>Update <strong>Makefile.config</strong> file if needed and copy/paste the <li><p>Update <strong>Makefile.config</strong> file if needed and copy/paste the
<strong>ThunderForest</strong> and <strong>Dark Sky</strong> API keys value in <strong>ThunderForest</strong> and <strong>Dark Sky</strong> API keys value in
<strong>Makefile.custom.config</strong> file (see example). User registration can <strong>Makefile.custom.config</strong> file (see <a class="reference external" href="installation.html#environment-variables">Environment variables</a>).</p></li>
also be disabled in <strong>Makefile.custom.config</strong>.</p></li>
<li><p>Install Python virtualenv, React and all related packages and <li><p>Install Python virtualenv, React and all related packages and
initialize the database:</p></li> initialize the database:</p></li>
</ul> </ul>
@ -291,6 +290,49 @@ password</p>
<p><code class="docutils literal notranslate"><span class="pre">TODO</span></code></p> <p><code class="docutils literal notranslate"><span class="pre">TODO</span></code></p>
</div> </div>
</div> </div>
<div class="section" id="environment-variables">
<h2>Environment variables<a class="headerlink" href="#environment-variables" title="Permalink to this headline"></a></h2>
<p>The following environment variables must be defined in <strong>Makefile.custom.config</strong>:</p>
<table class="table-bordered table-striped docutils align-default">
<colgroup>
<col style="width: 33%" />
<col style="width: 35%" />
<col style="width: 32%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>variable</p></th>
<th class="head"><p>description</p></th>
<th class="head"><p>app default value</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">REACT_APP_GPX_LIMIT_IMPORT</span></code></p></td>
<td><p>max. number of gpx file in zip archive</p></td>
<td><p>10</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">REACT_APP_MAX_SINGLE_FILE_SIZE</span></code></p></td>
<td><p>max. size of a gpx or picture file</p></td>
<td><p>1MB</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">REACT_APP_MAX_ZIP_FILE_SIZE</span></code></p></td>
<td><p>max. size of a zip archive</p></td>
<td><p>10MB</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">REACT_APP_ALLOW_REGISTRATION</span></code></p></td>
<td><p>allows users to register</p></td>
<td><p>true</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">REACT_APP_THUNDERFOREST_API_KEY</span></code></p></td>
<td><p>ThunderForest API key</p></td>
<td><p>no defaut value, must be initialized</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">WEATHER_API</span></code></p></td>
<td><p>DarkSky API key</p></td>
<td><p>no defaut value, not mandatory</p></td>
</tr>
</tbody>
</table>
</div>
</div> </div>

File diff suppressed because one or more lines are too long

View File

@ -46,8 +46,7 @@ Dev environment
- Update **Makefile.config** file if needed and copy/paste the - Update **Makefile.config** file if needed and copy/paste the
**ThunderForest** and **Dark Sky** API keys value in **ThunderForest** and **Dark Sky** API keys value in
**Makefile.custom.config** file (see example). User registration can **Makefile.custom.config** file (see `Environment variables <installation.html#environment-variables>`__).
also be disabled in **Makefile.custom.config**.
- Install Python virtualenv, React and all related packages and - Install Python virtualenv, React and all related packages and
initialize the database: initialize the database:
@ -83,8 +82,7 @@ Prod environment
- Update **Makefile.config** file if needed and copy/paste the - Update **Makefile.config** file if needed and copy/paste the
**ThunderForest** and **Dark Sky** API keys value in **ThunderForest** and **Dark Sky** API keys value in
**Makefile.custom.config** file (see example). User registration can **Makefile.custom.config** file (see `Environment variables <installation.html#environment-variables>`__).
also be disabled in **Makefile.custom.config**.
- Install Python virtualenv, React and all related packages and - Install Python virtualenv, React and all related packages and
initialize the database: initialize the database:
@ -148,3 +146,21 @@ Prod environment
``TODO`` ``TODO``
Environment variables
~~~~~~~~~~~~~~~~~~~~~
The following environment variables must be defined in **Makefile.custom.config**:
.. cssclass:: table-bordered table-striped
===================================== ======================================= ====================================
variable description app default value
===================================== ======================================= ====================================
``REACT_APP_GPX_LIMIT_IMPORT`` max. number of gpx file in zip archive 10
``REACT_APP_MAX_SINGLE_FILE_SIZE`` max. size of a gpx or picture file 1MB
``REACT_APP_MAX_ZIP_FILE_SIZE`` max. size of a zip archive 10MB
``REACT_APP_ALLOW_REGISTRATION`` allows users to register true
``REACT_APP_THUNDERFOREST_API_KEY`` ThunderForest API key no defaut value, must be initialized
``WEATHER_API`` DarkSky API key no defaut value, not mandatory
===================================== ======================================= ====================================

View File

@ -285,7 +285,7 @@ def process_zip_archive(common_params, extract_dir):
zip_ref.extractall(extract_dir) zip_ref.extractall(extract_dir)
new_activities = [] new_activities = []
gpx_files_limit = os.getenv('REACT_APP_GPX_LIMIT_IMPORT') gpx_files_limit = os.getenv('REACT_APP_GPX_LIMIT_IMPORT', 10)
if gpx_files_limit and gpx_files_limit.isdigit(): if gpx_files_limit and gpx_files_limit.isdigit():
gpx_files_limit = int(gpx_files_limit) gpx_files_limit = int(gpx_files_limit)
else: else: