Skip to content

Commit

Permalink
Docs - change sphinx theme (switch to "furo")
Browse files Browse the repository at this point in the history
  • Loading branch information
SamR1 committed Jun 18, 2023
1 parent 3a6315d commit 1375986
Show file tree
Hide file tree
Showing 128 changed files with 8,670 additions and 31,958 deletions.
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,11 @@ downgrade-db:
$(FLASK) db downgrade --directory $(MIGRATIONS)

html:
rm -rf docsrc/build
rm -rf $(BUILDDIR)
rm -rf docs/*
touch docs/.nojekyll
$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
rm -rf docsrc/build/html/_static/bootstrap-2.3.2
rm -rf docsrc/build/html/_static/bootswatch-2.3.2
find docsrc/build/html/_static/bootswatch-3.4.1/. -maxdepth 1 -not -name flatly -not -name fonts -exec rm -rf '{}' \; 2>/tmp/NULL
sed -i "s/\@import url(\"https:\/\/fonts.googleapis.com\/css?family=Lato:400,700,400italic\");//" docsrc/build/html/_static/bootswatch-3.4.1/flatly/bootstrap.min.css
cp -a docsrc/build/html/. docs
cp -a $(BUILDDIR)/html/. docs

install-db:
psql -U postgres -f db/create.sql
Expand Down
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 1082c44dc3fd60182581552b12505b63
config: 6f103a0843c839ff39c244417becdf04
tags: 645f666f9bcd5a90fca523b33c5a78b7
42 changes: 19 additions & 23 deletions docs/_sources/installation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Prerequisites
~~~~~~~~~~~~~

- mandatory
- Python 3.7+
- Python 3.8+
- PostgreSQL 11+
- optional
- Redis for task queue (if email sending is enabled and for data export requests) and API rate limits
Expand Down Expand Up @@ -104,9 +104,9 @@ deployment method.

.. versionadded:: 0.4.0

**Absolute path** to the directory where `uploads` folder will be created.
**Absolute path** to the directory where ``uploads`` folder will be created.

:default: `<application_directory>/fittrackee`
:default: ``<application_directory>/fittrackee``

.. danger::
| With installation from PyPI, the directory will be located in
Expand All @@ -119,7 +119,7 @@ deployment method.
.. warning::
| Since `SQLAlchemy update (1.4+) <https://docs.sqlalchemy.org/en/14/changelog/changelog_14.html#change-3687655465c25a39b968b4f5f6e9170b>`__,
engine URL should begin with `postgresql://`.
engine URL should begin with ``postgresql://``.
.. envvar:: DATABASE_DISABLE_POOLING

Expand All @@ -128,7 +128,7 @@ deployment method.
Disable pooling if needed (when starting application with **FitTrackee** entry point and not directly with **Gunicorn**),
see `SqlAlchemy documentation <https://docs.sqlalchemy.org/en/13/core/pooling.html#using-connection-pools-with-multiprocessing-or-os-fork>`__.

:default: false
:default: ``false``

.. envvar:: UI_URL

Expand Down Expand Up @@ -180,7 +180,7 @@ deployment method.

API rate limits, see `API rate limits <installation.html#api-rate-limits>`__.

:default: `300 per 5 minutes`
:default: ``300 per 5 minutes``


.. envvar:: TILE_SERVER_URL
Expand All @@ -190,7 +190,7 @@ deployment method.
| Tile server URL (with api key if needed), see `Map tile server <installation.html#map-tile-server>`__.
| Since **0.4.9**, it's also used to generate static maps (to keep default server, see `DEFAULT_STATICMAP <installation.html#envvar-DEFAULT_STATICMAP>`__)
:default: `https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png`
:default: ``https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png``


.. envvar:: STATICMAP_SUBDOMAINS
Expand All @@ -209,20 +209,20 @@ deployment method.

Map attribution (if using another tile server), see `Map tile server <installation.html#map-tile-server>`__.

:default: `&copy; <a href="http://www.openstreetmap.org/copyright" target="_blank" rel="noopener noreferrer">OpenStreetMap</a> contributors`
:default: ``&copy; <a href="http://www.openstreetmap.org/copyright" target="_blank" rel="noopener noreferrer">OpenStreetMap</a> contributors``


.. envvar:: DEFAULT_STATICMAP

.. versionadded:: 0.4.9

| If `True`, it keeps using default tile server to generate static maps (Komoot.de tile server).
| If ``True``, it keeps using default tile server to generate static maps (Komoot.de tile server).
| Otherwise, it uses the tile server set in `TILE_SERVER_URL <installation.html#envvar-TILE_SERVER_URL>`__.
.. versionchanged:: 0.6.10

| This variable is now case-insensitive.
| If `False`, depending on tile server, `subdomains <installation.html#envvar-STATICMAP_SUBDOMAINS>`__ may be mandatory.
| If ``False``, depending on tile server, `subdomains <installation.html#envvar-STATICMAP_SUBDOMAINS>`__ may be mandatory.
:default: False

Expand Down Expand Up @@ -371,7 +371,7 @@ Installation
~~~~~~~~~~~~

.. warning::
| Note that FitTrackee is under heavy development, some features may be unstable.
| Note that **FitTrackee** is under heavy development, some features may be unstable.
From PyPI
^^^^^^^^^
Expand Down Expand Up @@ -445,20 +445,16 @@ From sources
^^^^^^^^^^^^

.. warning::
| Since FitTrackee 0.2.1, Python packages installation needs Poetry.
| To install it on ArchLinux:
| Since **FitTrackee** 0.2.1, Python packages installation needs Poetry.
| For more information, see `Poetry Documentation <https://python-poetry.org/docs/#installation>`__
.. code-block:: bash
.. note::
| To keep virtualenv in project directory, update Poetry configuration.
$ yay poetry
$ poetry --version
Poetry 1.0.17
.. code-block:: bash
# optional
$ poetry config virtualenvs.in-project true
For other OS, see `Poetry Documentation <https://python-poetry.org/docs/#installation>`__

Dev environment
"""""""""""""""

Expand Down Expand Up @@ -674,7 +670,7 @@ There are several ways to start **FitTrackee** web application and task queue
library.
One way is to use a **systemd** services and **Nginx** to proxy pass to **Gunicorn**.

Examples (to update depending on your application configuration and given distribution):
Examples (to adapt depending on your instance configuration and operating system):

- for application: ``fittrackee.service``

Expand Down Expand Up @@ -860,7 +856,7 @@ Development

.. versionadded:: 0.5.0

- an additional step is needed to install `fittrackee_client`
- an additional step is needed to install ``fittrackee_client``

.. code-block:: bash
Expand All @@ -875,7 +871,7 @@ Development
Open http://localhost:3000

.. note::
Some environment variables need to be updated like `UI_URL`
Some environment variables need to be updated like ``UI_URL``

- to run lint or tests:

Expand Down
6 changes: 3 additions & 3 deletions docs/_sources/oauth.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,20 @@ Flow
- ``code_challenge_method``: method used to create challenge, for instance "S256"

| Example for PKCE:
| `https://<FITTRACKEE_HOST>/profile/apps/authorize?response_type=code&client_id=<CLIENT_ID>&scope=profile%3Aread+workouts%3Awrite&state=<STATE>&code_challenge=<CODE_CHALLENGE>&code_challenge_method=S256`
| ``https://<FITTRACKEE_HOST>/profile/apps/authorize?response_type=code&client_id=<CLIENT_ID>&scope=profile%3Aread+workouts%3Awrite&state=<STATE>&code_challenge=<CODE_CHALLENGE>&code_challenge_method=S256``

- | After the authorization, FitTrackee redirects to the 3rd-party app, so the 3rd-party app can get the authorization code from the redirect URL and then fetches an access token with the client id and secret (endpoint `/api/oauth/token <https://samr1.github.io/FitTrackee/api/oauth2.html#post--api-oauth-token>`_).
| Example of a redirect URL:
| `https://example.com/callback?code=<AUTHORIZATION_CODE>&state=<STATE>`
| ``https://example.com/callback?code=<AUTHORIZATION_CODE>&state=<STATE>``

.. note::
OAuth2 support is implemented with `Authlib <https://docs.authlib.org/en/latest/>`_ library.

.. warning::
| If FitTrackee is running behind a proxy, the ``X-Forwarded-Proto`` header must be set.
| For instance for `nginx`:
| For instance for ``nginx``:
.. code-block::
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/troubleshooting/administrator.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Administrator
sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:postgres
It must start with `postgresql://` (engine URLs starting with `postgres://` are no longer supported).
It must start with ``postgresql://`` (engine URLs starting with ``postgres://`` are no longer supported).

- Check the email URL in `environment variables <../installation.html#envvar-EMAIL_URL>`__ if the following error is displayed in **gunicorn** logs:

Expand Down
1 change: 0 additions & 1 deletion docs/_sources/troubleshooting/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Troubleshooting
:maxdepth: 2

administrator
user
5 changes: 0 additions & 5 deletions docs/_sources/troubleshooting/user.rst.txt

This file was deleted.

134 changes: 0 additions & 134 deletions docs/_static/_sphinx_javascript_frameworks_compat.js

This file was deleted.

5 changes: 4 additions & 1 deletion docs/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down Expand Up @@ -324,13 +324,15 @@ aside.sidebar {
p.sidebar-title {
font-weight: bold;
}

nav.contents,
aside.topic,
div.admonition, div.topic, blockquote {
clear: left;
}

/* -- topics ---------------------------------------------------------------- */

nav.contents,
aside.topic,
div.topic {
Expand Down Expand Up @@ -606,6 +608,7 @@ ol.simple p,
ul.simple p {
margin-bottom: 0;
}

aside.footnote > span,
div.citation > span {
float: left;
Expand Down
Loading

0 comments on commit 1375986

Please sign in to comment.