From 590ae303b6ecf6da468887711a31852aa80877f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ma=C3=ABl=20Madon?= <mael.madon@irit.fr>
Date: Tue, 18 Jun 2024 10:57:24 +0200
Subject: [PATCH] doc: reconfigure sphnix doc with sphinx-quickstart script,
 create a dedicated nix-shell for doc

---
 .gitignore              |  3 ++-
 default.nix             |  6 ++++++
 docs/Makefile           | 20 ++++++++++++++++++++
 docs/conf.py            | 31 +++++++++++++++----------------
 docs/index.rst          | 27 +++++++++++----------------
 docs/user_categories.md | 15 +++++++++++++++
 6 files changed, 69 insertions(+), 33 deletions(-)
 create mode 100644 docs/Makefile
 create mode 100644 docs/user_categories.md

diff --git a/.gitignore b/.gitignore
index 6b7a229..3d8beea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,4 +7,5 @@ result
 .vscode
 .cache
 compile_commands.json
-export_path_for_tests
\ No newline at end of file
+export_path_for_tests
+docs/_build
\ No newline at end of file
diff --git a/default.nix b/default.nix
index 6ddd2e1..07dbc11 100644
--- a/default.nix
+++ b/default.nix
@@ -74,6 +74,12 @@ let
         pandas
       ];
     };
+
+    doc = pkgs.stdenv.mkDerivation rec {
+      name = "sphinx-documentation";
+      buildInputs = with pythonPackages; [ sphinx sphinx_rtd_theme myst-parser ];
+    };
+
   };
 
 
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 0000000..d4bb2cb
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,20 @@
+# Minimal makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line, and also
+# from the environment for the first two.
+SPHINXOPTS    ?=
+SPHINXBUILD   ?= sphinx-build
+SOURCEDIR     = .
+BUILDDIR      = _build
+
+# Put it first so that "make" without argument is like "make help".
+help:
+	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.PHONY: help Makefile
+
+# Catch-all target: route all unknown targets to Sphinx using the new
+# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
+%: Makefile
+	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
diff --git a/docs/conf.py b/docs/conf.py
index ecf6c3a..543b7bd 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,15 +1,17 @@
 # Configuration file for the Sphinx documentation builder.
+#
+# For the full list of built-in configuration values, see the documentation:
+# https://www.sphinx-doc.org/en/master/usage/configuration.html
 
-# -- Project information
+# -- Project information -----------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
 
 project = 'Batmen'
-copyright = '2021-2024, Maël Madon'
-author = 'Maël Madon'
+copyright = '2024, Maël Madon, Millian Poquet, Jolyne Gatt'
+author = 'Maël Madon, Millian Poquet, Jolyne Gatt'
 
-release = ''
-version = ''
-
-# -- General configuration
+# -- General configuration ---------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
 
 extensions = [
     'myst_parser'
@@ -17,14 +19,11 @@ extensions = [
 
 source_suffix = ['.rst', '.md']
 
-# intersphinx_mapping = {
-#     'python': ('https://docs.python.org/3/', None),
-#     'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
-# }
-# intersphinx_disabled_domains = ['std']
-
-templates_path = ['_templates']
+# templates_path = ['_templates']
+exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
 
-# -- Options for HTML output
+# -- Options for HTML output -------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
 
-html_theme = 'sphinx_rtd_theme'
\ No newline at end of file
+html_theme = 'sphinx_rtd_theme'
+# html_static_path = ['_static']
diff --git a/docs/index.rst b/docs/index.rst
index 4678e95..173a1be 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1,27 +1,22 @@
-.. Sphinx with Markdown documentation master file, created by
-   sphinx-quickstart on Thu Oct  6 19:07:54 2016.
+.. Batmen documentation master file, created by
+   sphinx-quickstart on Tue Jun 18 10:38:15 2024.
    You can adapt this file completely to your liking, but it should at least
    contain the root `toctree` directive.
 
-Batmen documentation
-================================================
-
-TODO
-
-Contents:
+Welcome to Batmen's documentation!
+==================================
 
 .. toctree::
    :maxdepth: 2
+   :caption: Contents:
 
-..    question.md
-..    answer.md
-..    answer_beni.md
+   user_categories.md
 
 
 
-.. Indices and tables
-.. ==================
+Indices and tables
+==================
 
-.. * :ref:`genindex`
-.. * :ref:`modindex`
-.. * :ref:`search`
\ No newline at end of file
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/docs/user_categories.md b/docs/user_categories.md
new file mode 100644
index 0000000..4c99d8c
--- /dev/null
+++ b/docs/user_categories.md
@@ -0,0 +1,15 @@
+# User categories
+
+TODO description générale...
+
+## Modelled users
+TODO
+
+## Replay users
+TODO
+
+## Feedback users
+TODO
+
+## Feedback and replay users
+TODO
\ No newline at end of file
-- 
GitLab