Skip to content

Commit

Permalink
fix manifest rebuild mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Mar 30, 2022
1 parent 3b267fe commit afe243d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/sourmash/cli/sig/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ def subparser(subparsers):
'-q', '--quiet', action='store_true',
help='suppress non-error output'
)
subparser.add_argument(
'-d', '--debug', action='store_true',
help='provide debugging output'
)
subparser.add_argument(
'-o', '--output-missing', metavar='FILE',
help='output picklist with remaining unmatched entries to this file',
Expand Down
4 changes: 2 additions & 2 deletions src/sourmash/sig/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ def check(args):
check signature db(s) against a picklist.
"""
from sourmash.picklist import PickStyle
set_quiet(args.quiet)
set_quiet(args.quiet, args.debug)
moltype = sourmash_args.calculate_moltype(args)
picklist = sourmash_args.load_picklist(args)
pattern_search = sourmash_args.load_include_exclude_db_patterns(args)
Expand Down Expand Up @@ -1335,7 +1335,7 @@ def check(args):
sys.exit(-1)

# has manifest, or ok to build (require_manifest=False) - continue!
manifest = sourmash_args.get_manifest(idx, rebuild=True)
manifest = sourmash_args.get_manifest(idx, require=True)
manifest_rows = manifest._select(picklist=picklist)
total_rows_examined += len(manifest)
total_manifest_rows += manifest_rows
Expand Down
2 changes: 2 additions & 0 deletions src/sourmash/sourmash_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,7 @@ def get_manifest(idx, *, require=True, rebuild=False):
Retrieve a manifest for this idx, loaded with `load_file_as_index`.
If a manifest exists and `rebuild` is False, return the manifest.
Even if a manifest exists and `rebuild` is True, rebuild the manifest.
If a manifest does not exist or `rebuild` is True, try to build one.
If a manifest cannot be built and `require` is True, error exit.
Expand All @@ -785,6 +786,7 @@ def get_manifest(idx, *, require=True, rebuild=False):

# need to build one...
try:
debug_literal("get_manifest: rebuilding manifest")
m = CollectionManifest.create_manifest(idx._signatures_with_internal(),
include_signature=False)
debug_literal("get_manifest: rebuilt manifest.")
Expand Down

0 comments on commit afe243d

Please sign in to comment.