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

feat: add caching #41

Merged
merged 12 commits into from
Jun 6, 2024
Merged

feat: add caching #41

merged 12 commits into from
Jun 6, 2024

Conversation

tlambert03
Copy link
Owner

@tlambert03 tlambert03 commented Jun 1, 2024

this is laying the groundwork for a general cache mechanism. for caching ground truths, psfs, etc...

Caching is on by default, but can be disabled per sim with Settings(cache=False) or the environment variable MICROSIM_CACHE=0

closes #23
relates to #25

Copy link

codecov bot commented Jun 1, 2024

Codecov Report

Attention: Patch coverage is 92.00000% with 10 lines in your changes missing coverage. Please review.

Project coverage is 80.45%. Comparing base (31e68bf) to head (267e008).

Files Patch % Lines
src/microsim/util.py 50.00% 7 Missing ⚠️
src/microsim/schema/settings.py 78.57% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #41      +/-   ##
==========================================
- Coverage   81.39%   80.45%   -0.95%     
==========================================
  Files          42       43       +1     
  Lines        2005     2118     +113     
==========================================
+ Hits         1632     1704      +72     
- Misses        373      414      +41     

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

@tlambert03
Copy link
Owner Author

important before merge: make this optional. environment variable and/or other things

@tlambert03 tlambert03 mentioned this pull request Jun 6, 2024
@tlambert03 tlambert03 merged commit 47a8106 into main Jun 6, 2024
16 of 17 checks passed
@tlambert03 tlambert03 deleted the cache branch June 6, 2024 19:33
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.

Feature: allow PSFs to be saved and reused
1 participant