SciQLop / speasy

Space Physics made EASY! A simple Python package to deal with main Space Physics WebServices (CDA,SSC,AMDA,..)
Other
24 stars 7 forks source link

[Cache] Always use `with transact():` statement with #102

Closed jeandet closed 11 months ago

jeandet commented 11 months ago

It turns out that without explicit use of with transact(): cache entry can appear missing from other threads while updating its value.

codecov[bot] commented 11 months ago

Codecov Report

Attention: Patch coverage is 83.33333% with 3 lines in your changes missing coverage. Please review.

Project coverage is 86.45%. Comparing base (3e3fcce) to head (336e330). Report is 107 commits behind head on main.

Files with missing lines Patch % Lines
speasy/core/cache/cache.py 83.33% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #102 +/- ## ========================================== + Coverage 86.43% 86.45% +0.02% ========================================== Files 51 51 Lines 3045 3050 +5 Branches 490 495 +5 ========================================== + Hits 2632 2637 +5 Misses 276 276 Partials 137 137 ``` | [Flag](https://app.codecov.io/gh/SciQLop/speasy/pull/102/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SciQLop) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/SciQLop/speasy/pull/102/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SciQLop) | `85.80% <83.33%> (-0.61%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SciQLop#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.