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 --caching option (off by default) #104

Merged
merged 4 commits into from
Feb 19, 2024
Merged

Add --caching option (off by default) #104

merged 4 commits into from
Feb 19, 2024

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Feb 16, 2024

Closes #103.

@jwodder jwodder added the minor Increment the minor version when merged label Feb 16, 2024
Copy link

codecov bot commented Feb 16, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (fca996a) 90.93% compared to head (ced4a78) 90.72%.

Files Patch % Lines
datalad_fuse/fsspec.py 70.00% 3 Missing ⚠️
datalad_fuse/fsspec_cache_clear.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #104      +/-   ##
==========================================
- Coverage   90.93%   90.72%   -0.22%     
==========================================
  Files          10       10              
  Lines         596      604       +8     
==========================================
+ Hits          542      548       +6     
- Misses         54       56       +2     

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

@jwodder jwodder force-pushed the gh-103 branch 2 times, most recently from 1629955 to cb1e3e8 Compare February 16, 2024 15:31
@jwodder jwodder marked this pull request as ready for review February 16, 2024 15:56
@yarikoptic
Copy link
Member

Great, thank you! could you please

  • look into why benchmarking installation fails?
  • also add parametrize to e.g. test_fuse on caching so we generally test both implementations?

@jwodder
Copy link
Member Author

jwodder commented Feb 19, 2024

@yarikoptic Done.

with fusing(ds.path, tmp_path, transparent=transparent, wait=True) as mount:
with fusing(
ds.path, tmp_path, caching=True, transparent=transparent, wait=True
) as mount:
Copy link
Member

Choose a reason for hiding this comment

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

do you have ideas why codecov claims that we are loosing now coverage of the cache-clear?
https://app.codecov.io/gh/datalad/datalad-fuse/pull/104/blob/datalad_fuse/fsspec_cache_clear.py

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know. It doesn't appear we ever tested that command to begin with.

Copy link
Member

Choose a reason for hiding this comment

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

indeed... odd... I reran with this patch and did not spot traceback from being printed :-/
diff --git a/datalad_fuse/fsspec_cache_clear.py b/datalad_fuse/fsspec_cache_clear.py
index 60fcfbb..10d726b 100644
--- a/datalad_fuse/fsspec_cache_clear.py
+++ b/datalad_fuse/fsspec_cache_clear.py
@@ -1,3 +1,5 @@
+import sys
+import traceback
 from typing import Any, Dict, Iterator, Optional
 
 from datalad.distribution.dataset import (
@@ -42,6 +44,7 @@ class FsspecCacheClear(Interface):
     def __call__(
         dataset: Optional[Dataset] = None, recursive: bool = False
     ) -> Iterator[Dict[str, Any]]:
+        traceback.print_stack(file=sys.stderr)
         ds = require_dataset(
             dataset, purpose="clear fsspec cache", check_installed=True
         )

@yarikoptic yarikoptic merged commit c053aeb into master Feb 19, 2024
11 of 13 checks passed
@yarikoptic yarikoptic deleted the gh-103 branch February 19, 2024 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make caching optional
2 participants