Skip to content

Commit

Permalink
Merge pull request #68 from yaal-coop/issue-10-doc
Browse files Browse the repository at this point in the history
Squelette de documentation
  • Loading branch information
azmeuk authored Dec 8, 2023
2 parents de12afb + 03bba78 commit 72dd301
Show file tree
Hide file tree
Showing 9 changed files with 1,127 additions and 618 deletions.
32 changes: 32 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: documentation/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: web/requirements.doc.txt
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

install-dev:
# Install dependencies for local development usage
poetry install --with dev ; poetry shell
poetry install --with dev --with doc; poetry shell
pre-commit install

export-dependencies: export-base-dependencies export-dev-dependencies export-doc-dependencies

export-base-dependencies:
# Update requirements file for web service
poetry export --without-hashes --with task-management -o web/requirements.app.txt
Expand All @@ -15,6 +17,10 @@ export-dev-dependencies:
# Update requirements file for development environment used in GitHub Actions
poetry export --without-hashes --only dev -o web/requirements.dev.txt

export-doc-dependencies:
# Update requirements file for development environment used in GitHub Actions
poetry export --without-hashes --only doc -o web/requirements.doc.txt

translation-extract:
# Extract messages to be translated with:
pybabel extract --mapping-file web/translations/babel.cfg --output-file web/translations/messages.pot --keywords lazy_gettext web
Expand All @@ -26,3 +32,6 @@ translation-update:
translation-compile:
# Compile translation catalogs with:
pybabel compile --directory web/translations

doc:
sphinx-build documentation build/sphinx/html
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Frontal OIDC de gestion simplifiée des visioconférences BigBlueButton.

[![Check coverage](https://github.com/numerique-gouv/b3desk/actions/workflows/Test_coverage.yml/badge.svg)](https://github.com/numerique-gouv/b3desk/actions/workflows/Test_coverage.yml) [![Check lint](https://github.com/numerique-gouv/b3desk/actions/workflows/Check_lint.yml/badge.svg)](https://github.com/numerique-gouv/b3desk/actions/workflows/Check_lint.yml) [![Check local run](https://github.com/numerique-gouv/b3desk/actions/workflows/Check_local_run.yml/badge.svg)](https://github.com/numerique-gouv/b3desk/actions/workflows/Check_local_run.yml)
[![Documentation Status](https://readthedocs.org/projects/b3desk/badge/?version=latest)](https://b3desk.readthedocs.io/fr/latest/?badge=latest) [![Check coverage](https://github.com/numerique-gouv/b3desk/actions/workflows/Test_coverage.yml/badge.svg)](https://github.com/numerique-gouv/b3desk/actions/workflows/Test_coverage.yml) [![Check lint](https://github.com/numerique-gouv/b3desk/actions/workflows/Check_lint.yml/badge.svg)](https://github.com/numerique-gouv/b3desk/actions/workflows/Check_lint.yml) [![Check local run](https://github.com/numerique-gouv/b3desk/actions/workflows/Check_local_run.yml/badge.svg)](https://github.com/numerique-gouv/b3desk/actions/workflows/Check_local_run.yml)

B3Desk permet de créer et configurer des visioconférences et de garder ces configurations.

Expand Down
Empty file added documentation/__init__.py
Empty file.
87 changes: 87 additions & 0 deletions documentation/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#!/usr/bin/env python3
import datetime
import os
import sys

sys.path.insert(0, os.path.abspath(".."))
sys.path.insert(0, os.path.abspath("../web"))
sys.path.insert(0, os.path.abspath("../web/flaskr"))


# -- General configuration ------------------------------------------------


extensions = [
"myst_parser",
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.graphviz",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
]

templates_path = ["_templates"]
source_suffix = {
".rst": "restructuredtext",
".md": "markdown",
}
master_doc = "index"
project = "flaskr"
year = datetime.datetime.now().strftime("%Y")
copyright = f"{year}, Ministère de l'Éducation Nationale"
author = "Ministère de l'Éducation Nationale"

release = "1.1.0" # metadata.version("flaskr")
version = "%s.%s" % tuple(map(int, release.split(".")[:2]))
language = "fr"
exclude_patterns = []
pygments_style = "sphinx"
todo_include_todos = False

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
}

# -- Options for HTML output ----------------------------------------------

html_theme = "sphinx_rtd_theme"
html_static_path = []


# -- Options for HTMLHelp output ------------------------------------------

htmlhelp_basename = "b3deskdoc"
html_logo = ""


# -- Options for LaTeX output ---------------------------------------------

latex_elements = {}
latex_documents = [
(
master_doc,
"b3desk.tex",
"B3Desk Documentation",
"Ministère de l’Éducation Nationale",
"manual",
)
]

# -- Options for manual page output ---------------------------------------

man_pages = [(master_doc, "b3desk", "B3Desk Documentation", [author], 1)]

# -- Options for Texinfo output -------------------------------------------

texinfo_documents = [
(
master_doc,
"b3desk",
"B3Desk Documentation",
author,
"B3Desk",
"BBB frontend by the French Ministry of Education.",
"Miscellaneous",
)
]
22 changes: 22 additions & 0 deletions documentation/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
B3Desk
======

Frontend Big Blue Button du Ministère de l’Éducation Nationale.

Table des matières
==================

.. toctree::
:maxdepth: 2

dockerPersistence
meetingFiles
pullRequestValidation
translation

Index et tables
===============

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Loading

0 comments on commit 72dd301

Please sign in to comment.