From 3a939eb539e94e22bb90900536a0bf2131a1c65c Mon Sep 17 00:00:00 2001 From: Marcus Fedarko Date: Wed, 8 Mar 2023 19:20:52 -0800 Subject: [PATCH] ENH/DOC: no_args_is_help; note in a comment (#236) --- metagenomescope/_cli.py | 7 +++++-- metagenomescope/graph_objects/assembly_graph.py | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/metagenomescope/_cli.py b/metagenomescope/_cli.py index fa25417b..771025a5 100644 --- a/metagenomescope/_cli.py +++ b/metagenomescope/_cli.py @@ -31,8 +31,11 @@ ) -# Make mgsc -h show the help text -@click.command(context_settings={"help_option_names": ["-h", "--help"]}) +# Make mgsc -h (or just mgsc by itself) show the help text +@click.command( + context_settings={"help_option_names": ["-h", "--help"]}, + no_args_is_help=True, +) @click.option("-i", "--input-file", required=True, help=INPUT) @click.option("-o", "--output-dir", required=True, help=OUTPUT_DIR) # @click.option( diff --git a/metagenomescope/graph_objects/assembly_graph.py b/metagenomescope/graph_objects/assembly_graph.py index fc845369..f41d92d4 100644 --- a/metagenomescope/graph_objects/assembly_graph.py +++ b/metagenomescope/graph_objects/assembly_graph.py @@ -206,7 +206,8 @@ def reindex_digraph(self): layout and internal storage of nodes. This way, we can have multiple nodes with the same name without causing a problem. - Also calls self.save_orig_src_and_tgt() on every edge in the digraph. + Also calls self.save_orig_src_and_tgt() on every edge in the digraph + (critically, that's done *after* assigning nodes unique integer IDs). """ self.digraph = nx.convert_node_labels_to_integers( self.digraph, label_attribute="name"