From ec253cbab3a1feba343f3d69262234279b29d25a Mon Sep 17 00:00:00 2001
From: Bryan Brancotte <bryan.brancotte@pasteur.fr>
Date: Mon, 15 Jan 2024 11:34:40 +0100
Subject: [PATCH] add hdf5_add_attributes to doc

---
 doc/source/command_line_usage.rst |  7 +++++++
 scripts/__init__.py               | 17 +++++++++++++++++
 scripts/hdf5_add_attributes.py    |  7 ++++++-
 3 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 scripts/__init__.py

diff --git a/doc/source/command_line_usage.rst b/doc/source/command_line_usage.rst
index 3de23991..e6a7f27b 100644
--- a/doc/source/command_line_usage.rst
+++ b/doc/source/command_line_usage.rst
@@ -6,3 +6,10 @@ This section contains the exhaustive list of the sub-commands and options availa
 .. argparse::
    :ref: jass.__main__.get_parser
    :prog: jass
+
+Utilities
+~~~~~~~~~~~~~~~~~~~
+
+.. argparse::
+   :ref: scripts.hdf5_add_attributes.get_parser
+   :prog: scripts/hdf5_add_attributes
diff --git a/scripts/__init__.py b/scripts/__init__.py
new file mode 100644
index 00000000..f467725b
--- /dev/null
+++ b/scripts/__init__.py
@@ -0,0 +1,17 @@
+"""
+This is the main JASS Python module
+
+Submodules
+==========
+
+.. autosummary::
+    :toctree: _autosummary
+
+    config
+    models
+    server
+    tasks
+    util
+"""
+
+from jass.tasks import celery
diff --git a/scripts/hdf5_add_attributes.py b/scripts/hdf5_add_attributes.py
index bb3067b3..d92dccb0 100644
--- a/scripts/hdf5_add_attributes.py
+++ b/scripts/hdf5_add_attributes.py
@@ -16,7 +16,8 @@ def set_metadata_from_file(*, hdf5_file, init_table_metadata_path):
     init_store.close()
 
 
-if __name__ == "__main__":
+
+def get_parser():
     parser = argparse.ArgumentParser()
     parser.add_argument(
         "--init-table-path", default=None, help="path to the inittable to edit", required=True, dest="hdf5_file"
@@ -67,6 +68,10 @@ if __name__ == "__main__":
         default=None,
         required=False,
     )
+    return parser
+
+if __name__ == "__main__":
+    parser = get_parser()
     args = parser.parse_args()
 
     if args.init_table_metadata_path:
-- 
GitLab