Skip to content

Conversation

cgarling
Copy link
Member

@cgarling cgarling commented Oct 5, 2025

Implements caching of filters queried from SVO. Includes an update_filters() function that will redownload all cached filters from SVO, effectively refreshing the cache.

@lucasvalenzuela how does this look?

@codecov
Copy link

codecov bot commented Oct 5, 2025

Codecov Report

❌ Patch coverage is 36.36364% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.76%. Comparing base (21e9344) to head (a5904b2).

Files with missing lines Patch % Lines
src/svo.jl 36.58% 26 Missing ⚠️
src/plots.jl 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #33      +/-   ##
==========================================
- Coverage   80.60%   76.76%   -3.84%     
==========================================
  Files           6        6              
  Lines         366      396      +30     
==========================================
+ Hits          295      304       +9     
- Misses         71       92      +21     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

src/svo.jl Outdated
errval = simple_value(children(info)[1])
if errval == "Filter not found:"
errval *= " $id"
filename = joinpath(filter_cache, replace(filtername, "/" => "_") * "_" * string(magsys) * ".txt")
Copy link
Contributor

Choose a reason for hiding this comment

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

I would save these as .xml files instead

@lucasvalenzuela
Copy link
Contributor

lucasvalenzuela commented Oct 12, 2025

It works really well and looks good to me! I have added one comment in the review (xml vs. txt files) and also added a PR adding clear_filters to remove all filters in the cache: cgarling#7

One thing one could still add is a keyword argument to get_filter that forces the downloading of the file, and/or a keyword argument that prevents the caching of the downloaded file. And one could equivalently add an argument to clear_filters or a new clear_filter to remove one single specified filter. But maybe that is too much of an edge case.

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