-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MRG] add
sig fileinfo
and standard manifest-generating functionali…
…ty (#1837) * initial addition of 'sig fileinfo' * finish first-draft implementation of fileinfo and get_manifest * cleanup and move over to sourmash_args * add manifest and length support to LCA_Database * add rebuild/no-rebuild args * fix __len__ for zipfiles, __bool__ interpretation * add some comments * fix error on bad path * fix len(LCA_Database) * fix fileinfo on a single .sig file * initial stab at updating sig extract to use manifests * fix sig extract mistake * fix manifest test for LCA databases, which now works * add __len__ to base Index class * a test, a test * more tests * fix more MultiIndex * change up MultiIndex * fix tests etc * fix remaining test * minor refactor * add tests for LCA_Database __len__ and __bool__ * add test for zip manifest + select * add explicit tests for location * add tests for prepend_location * update sbts * cleanup and fix * update docs * test sbt.json inputs for fileinfo * update to show combinations of sketches * update docstring at top of sourmash_args * fix up stdin loading * switch to wrapping stdin with MultiIndex * update docs * rough out last set of tests * add tests for get_manifest() * fix both test and code ;) * add debug, do more tests, uncover some ...puzzling behavior * fix abund problem * add abunds sig test * clear up the abund comments * add yaml and json out * more cleanup, test yaml and json output contents * remove debug print * add YAML to install * fix pyyaml spec * remove yaml & pyyaml dep * Apply suggestions from code review thanks @bluegenes! Co-authored-by: Tessa Pierce Ward <[email protected]> * put 'total hashes' in same format as rest * update docs with latest format Co-authored-by: Tessa Pierce Ward <[email protected]>
- Loading branch information
Showing
18 changed files
with
1,016 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
"""provide summary information on the given file""" | ||
|
||
|
||
def subparser(subparsers): | ||
subparser = subparsers.add_parser('fileinfo') | ||
subparser.add_argument('path') | ||
subparser.add_argument( | ||
'-q', '--quiet', action='store_true', | ||
help='suppress non-error output' | ||
) | ||
subparser.add_argument( | ||
'-d', '--debug', action='store_true', | ||
help='output debug information' | ||
) | ||
subparser.add_argument( | ||
'-f', '--force', action='store_true', | ||
help='try to load all files as signatures' | ||
) | ||
subparser.add_argument( | ||
'--rebuild-manifest', help='forcibly rebuild the manifest', | ||
action='store_true' | ||
) | ||
subparser.add_argument( | ||
'--json-out', help='output information in JSON format only', | ||
action='store_true' | ||
) | ||
|
||
|
||
def main(args): | ||
import sourmash | ||
return sourmash.sig.__main__.fileinfo(args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.