-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependencies: Update to disk-objectstore~=1.0
#6132
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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 |
---|---|---|
|
@@ -224,26 +224,24 @@ def test_get_info(populated_repository): | |
assert repository_info['SHA-hash algorithm'] == 'sha256' | ||
assert repository_info['Compression algorithm'] == 'zlib+1' | ||
|
||
assert 'Packs' in repository_info | ||
assert repository_info['Packs'] == 1 | ||
|
||
assert 'Objects' in repository_info | ||
assert 'unpacked' in repository_info['Objects'] | ||
assert 'pack_files' in repository_info['Objects'] | ||
assert 'loose' in repository_info['Objects'] | ||
assert 'packed' in repository_info['Objects'] | ||
assert repository_info['Objects']['unpacked'] == 2 | ||
assert repository_info['Objects']['pack_files'] == 1 | ||
assert repository_info['Objects']['loose'] == 1 | ||
assert repository_info['Objects']['packed'] == 3 | ||
|
||
assert 'Size (MB)' in repository_info | ||
assert 'unpacked' in repository_info['Size (MB)'] | ||
assert 'packed' in repository_info['Size (MB)'] | ||
assert 'other' in repository_info['Size (MB)'] | ||
assert 'total_size_loose' in repository_info['Size (MB)'] | ||
assert 'total_size_packed' in repository_info['Size (MB)'] | ||
|
||
|
||
#yapf: disable | ||
@pytest.mark.parametrize(('kwargs', 'output_info'), ( | ||
( | ||
{'live': True}, | ||
{'unpacked': 2, 'packed': 4} | ||
{'unpacked': 0, 'packed': 4} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it expected that these numbers changed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I believe this is because the live maintenance now automatically includes packing and cleaning |
||
), | ||
( | ||
{'live': False}, | ||
|
@@ -265,16 +263,16 @@ def test_get_info(populated_repository): | |
'clean_storage': False, | ||
'do_vacuum': False, | ||
}, | ||
{'unpacked': 2, 'packed': 3} | ||
{'unpacked': 1, 'packed': 3} | ||
), | ||
)) | ||
# yapf: enable | ||
def test_maintain(populated_repository, kwargs, output_info): | ||
"""Test the ``maintain`` method.""" | ||
populated_repository.maintain(**kwargs) | ||
file_info = populated_repository._container.count_objects() # pylint: disable=protected-access | ||
assert file_info['loose'] == output_info['unpacked'] | ||
assert file_info['packed'] == output_info['packed'] | ||
assert file_info.loose == output_info['unpacked'] | ||
assert file_info.packed == output_info['packed'] | ||
|
||
|
||
@pytest.mark.parametrize('do_vacuum', [True, False]) | ||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I guess we only allow fully uncompressed or auto compression (no options for YES or KEEP), right?
I guess it's OK for the AiiDA interface in order to keep it simple and we can always point people to the Disk-ObjectStore API for more (or expand this API in the future)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we currently just have a boolean flag because that was all that was supported by the disk objectstore anyway. Don't think we should start making it even more complex now.