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

Fix duplicate prefix for produce_or_load(; filename) #400

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jonas-schulze
Copy link
Contributor

Removing mentioned line did not work, as that would break usages like produce_or_load(; filename=hash, prefix="foo"). We could make append_prefix_suffix() a little more fuzzy, but that would invalidate other cache files.

Let me describe my use case: I just wanted to replace the savename(; connector) to have the cache file names a little more readable. According to the documentation, I could simply use produce_or_load(; kwargs...) for that purpose. Upon doing so, the warning told me to use the filename kwarg instead, which led me to the duplicated prefix described in #392 (comment). Maybe one should set the inner prefix="". What do you think?

Having looked into the code, another issue popped up: should append_prefix_suffix() adhere to savename(; connector)? Currently, it uses _ regardless.

Fix #392

Copy link

codecov bot commented Dec 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cad2a38) 90.65% compared to head (74fe134) 90.65%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #400   +/-   ##
=======================================
  Coverage   90.65%   90.65%           
=======================================
  Files           8        8           
  Lines         760      760           
=======================================
  Hits          689      689           
  Misses         71       71           

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

@jonas-schulze
Copy link
Contributor Author

The failures look unrelated.

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.

produce_or_load doubles filename prefixes
1 participant