diff --git a/doc/source/command_line_usage.rst b/doc/source/command_line_usage.rst index 3de239916d4f6e04d65c335f4e6f9d585808d4e7..e6a7f27b73ecc0e2961938384152de0f888b719b 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 0000000000000000000000000000000000000000..f467725b00ccfe19f921fb8a6fa41d12cfafa082 --- /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 bb3067b37a932fa0fe11209c028e43939d73a3c5..d92dccb0956ff3fe86dfdf5569bdad3f4d5fa1c9 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: