Skip to content
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

✨ Generalize compression algorithm #99

Merged

Conversation

giovannipizzi
Copy link
Member

For now, zlib with levels from 1 to 9 are supported.
More can be added in the future.

This fixes aiidateam#11
I also fixed a bug I discovered, where config values that
were cached but the cache was not cleared when re-initialising the
container.
To reduce the risk of such a problem, I am now only caching the *whole*
configuration dictionary (and not each value), and I don't need to
implement caching anymore for each single config value; and I just
need to clear one variable `self._config` rather than each newly-defined
configuration.

In addition, I add a test to check that re-initialising the container
creates a new container ID (`container.container_id`).
For now, zlib with levels from 1 to 9 are supported.
More can be added in the future.
@giovannipizzi
Copy link
Member Author

Once #96 and #97 are merged, I will rebase and unblock this (it's only the last commit that matters)

@codecov
Copy link

codecov bot commented Aug 27, 2020

Codecov Report

Merging #99 into develop will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           develop       #99   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines         1502      1541   +39     
=========================================
+ Hits          1502      1541   +39     
Impacted Files Coverage Δ
disk_objectstore/container.py 100.00% <100.00%> (ø)
disk_objectstore/utils.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b84d6b...8f55f79. Read the comment docs.

@chrisjsewell chrisjsewell marked this pull request as ready for review October 2, 2020 04:29
@giovannipizzi giovannipizzi changed the title [BLOCKED] Generalizing the code to accept a compression algorithm at login Generalizing the code to accept a compression algorithm at login Oct 4, 2020
@chrisjsewell chrisjsewell changed the title Generalizing the code to accept a compression algorithm at login ✨ Generalize compression algorithm Oct 4, 2020
@chrisjsewell chrisjsewell merged commit d786296 into aiidateam:develop Oct 4, 2020
@giovannipizzi giovannipizzi deleted the fix_multiple_compression_algos branch November 11, 2020 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants