Implement the verdi export inspect command#2128
Merged
giovannipizzi merged 3 commits intoOct 26, 2018
Merged
Conversation
This command enables a user to easily inspect the contents of an export
archive. The implementation uses a new class `Archive` which is a utility
class to deal with export archives. It should be used in a context manager:
with Archive('/some/archive.aiida') as archive:
version = archive.version_format
The context manager will ensure that the archive is lazily unpacked into a
sandbox folder which will be automatically cleaned when the context is left.
The command by default prints a summary of the contents and the version numbers
of the format itself and AiiDA with which it was exported. With flags one can
toggle to print just the format version, or the contents of the data or metadata
files contained within the archive.
c2938ff to
908954d
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #584 at least the basic functionality. It does not address all the requirements specified in that issue, but for example how to inspect the actual content should be discussed, because just printing to terminal becomes useless for big archives. I would propose new issues can be opened if there are specific suggestions.
This command enables a user to easily inspect the contents of an export
archive. The implementation uses a new class
Archivewhich is a utilityclass to deal with export archives. It should be used in a context manager:
The context manager will ensure that the archive is lazily unpacked into a
sandbox folder which will be automatically cleaned when the context is left.
The command by default prints a summary of the contents and the version numbers
of the format itself and AiiDA with which it was exported. With flags one can
toggle to print just the format version, or the contents of the data or metadata
files contained within the archive.