gallantlab / cottoncandy

sugar for s3
http://gallantlab.github.io/cottoncandy/
BSD 2-Clause "Simplified" License
33 stars 16 forks source link

Add a local client to mimic cloud storage in a regular file system #83

Closed TomDLT closed 2 years ago

TomDLT commented 2 years ago

This PR adds a LocalClient, similar to S3Client and GDriveClient.

LocalClient is a client that mimics cloud storage in a regular file system. In particular, it adds files .meta.json to store the metadata associated with files.

A LocalClient is useful to backup buckets locally without losing metadata.

codecov[bot] commented 2 years ago

Codecov Report

Merging #83 (edfb358) into main (a53f544) will increase coverage by 1.60%. The diff coverage is 63.55%.

@@            Coverage Diff             @@
##             main      #83      +/-   ##
==========================================
+ Coverage   40.15%   41.75%   +1.60%     
==========================================
  Files          15       16       +1     
  Lines        2209     2390     +181     
==========================================
+ Hits          887      998     +111     
- Misses       1322     1392      +70     
Impacted Files Coverage Δ
cottoncandy/backend.py 66.66% <ø> (ø)
cottoncandy/gdriveclient.py 0.00% <0.00%> (ø)
cottoncandy/s3client.py 69.26% <25.00%> (-1.80%) :arrow_down:
cottoncandy/interfaces.py 58.58% <46.66%> (-0.42%) :arrow_down:
cottoncandy/localclient.py 68.61% <68.61%> (ø)
cottoncandy/__init__.py 56.36% <80.00%> (+1.81%) :arrow_up:
cottoncandy/tests/conftest.py 100.00% <100.00%> (ø)
cottoncandy/tests/test_compression.py 100.00% <100.00%> (ø)
cottoncandy/tests/test_roundtrip.py 100.00% <100.00%> (ø)
cottoncandy/tests/test_roundtrip_big.py 84.00% <100.00%> (-0.62%) :arrow_down:
... and 1 more

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 f1b0ae7...edfb358. Read the comment docs.

TomDLT commented 2 years ago

Tests are passing.

anwarnunez commented 2 years ago

If things look go to y'all, then go ahead and merge.