From a5a20ef027eab690087ca2708cafc65a5c479acf Mon Sep 17 00:00:00 2001
From: Erik Reid <erik.reid@geant.org>
Date: Mon, 7 Nov 2022 09:31:36 +0100
Subject: [PATCH] added some initial docs

---
 docs/source/basic-tools.rst |  6 ++++++
 docs/source/conf.py         |  6 +++++-
 docs/source/index.rst       | 15 ++++++++++++---
 resource_management/cli.py  | 30 ++++++++++++++++++++++++++++++
 4 files changed, 53 insertions(+), 4 deletions(-)
 create mode 100644 docs/source/basic-tools.rst

diff --git a/docs/source/basic-tools.rst b/docs/source/basic-tools.rst
new file mode 100644
index 0000000..484dd74
--- /dev/null
+++ b/docs/source/basic-tools.rst
@@ -0,0 +1,6 @@
+.. list of basic cli tools
+
+CLI Tools
+=========================
+
+.. automodule:: resource_management.cli
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 0f7ee5f..990f58a 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -58,7 +58,8 @@ author = 'GN5'
 extensions = [
   'sphinx_rtd_theme',
   'sphinx.ext.autodoc',
-  'sphinx.ext.coverage'
+  'sphinx.ext.coverage',
+  'sphinx.ext.todo'
 ]
 
 templates_path = ['_templates']
@@ -78,3 +79,6 @@ html_static_path = ['_static']
 autoclass_content = 'both'
 autodoc_typehints = 'none'
 
+# Display todos by setting to True
+todo_include_todos = True
+
diff --git a/docs/source/index.rst b/docs/source/index.rst
index 6f1389e..2694d74 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -3,13 +3,22 @@
    You can adapt this file completely to your liking, but it should at least
    contain the root `toctree` directive.
 
-Welcome to NAT Resource Management's documentation!
-===================================================
+NAT Resource Management
+==========================
+
+Documentation for the NAT Resource Management tools
+
+------------------
+
 
 .. toctree::
-   :maxdepth: 2
+   :maxdepth: 1
    :caption: Contents:
 
+   basic-tools
+
+
+
 
 
 Indices and tables
diff --git a/resource_management/cli.py b/resource_management/cli.py
index 53fc372..f6a6a00 100644
--- a/resource_management/cli.py
+++ b/resource_management/cli.py
@@ -1,3 +1,33 @@
+"""
+
+script name [TODO]
+====================
+
+.. code-block:: bash
+
+    Usage: script name [OPTIONS]
+
+      notes: - first call init_db(dns=mysql_dsn(params from config)) - then create
+      a session (as in unit test) - ... and perform the db queries
+
+    Options:
+      --config FILENAME  config filename  [required]
+      --fqdn TEXT        config filename  [required]
+      --help             Show this message and exit.
+
+The configuration filename must be formatted according
+to this schema:
+
+    .. asjson::
+       resource_management.config.CONFIG_SCHEMA
+
+
+.. todo::
+
+    add a console script alias and change the name (cli.py) below
+
+
+"""
 import json
 
 import click
-- 
GitLab