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

Add plugins for fsspec caching and cache cleaning #205

Merged
merged 17 commits into from
Sep 11, 2024

Conversation

pnuu
Copy link
Member

@pnuu pnuu commented Jun 13, 2024

This PR adds the possibility to do caching with fsspec. Mostly useful for remotely read data that has a complicated structure which slows down the reading such as FCI L1c in S3 storage. Additional plugin is available for cleaning the cache.

  • Tests added
  • Tests passed
  • Passes flake8 trollflow2
  • Fully documented

@pnuu pnuu added the enhancement New feature or request label Jun 13, 2024
@pnuu pnuu self-assigned this Jun 13, 2024
@pnuu pnuu requested a review from mraspaud as a code owner June 13, 2024 11:46
Copy link

codecov bot commented Jun 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.87%. Comparing base (d6a96a9) to head (e7ae67c).
Report is 92 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #205      +/-   ##
==========================================
+ Coverage   95.78%   95.87%   +0.08%     
==========================================
  Files          12       12              
  Lines        2989     3052      +63     
==========================================
+ Hits         2863     2926      +63     
  Misses        126      126              
Flag Coverage Δ
unittests 95.87% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pnuu
Copy link
Member Author

pnuu commented Jun 13, 2024

The failing test is due to a small change in Posttroll and the way we've implemented the tests (with mock). This shows up only in unstable tests because the change is not published.

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! I'm wondering if this should really be its own plugin, or just an option to the reading plugin?

doc/source/plugins.rst Outdated Show resolved Hide resolved
trollflow2/tests/test_trollflow2.py Outdated Show resolved Hide resolved
doc/source/plugins.rst Outdated Show resolved Hide resolved
trollflow2/plugins/__init__.py Outdated Show resolved Hide resolved
Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About the _fs...

trollflow2/plugins/__init__.py Outdated Show resolved Hide resolved
Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mraspaud mraspaud enabled auto-merge September 11, 2024 07:13
@mraspaud mraspaud merged commit 8e7d1b4 into pytroll:main Sep 11, 2024
9 checks passed
@pnuu pnuu deleted the fsspec-caching-and-cleaning branch September 12, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants