XENONnT / straxen

Streaming analysis for XENON
BSD 3-Clause "New" or "Revised" License
20 stars 32 forks source link

Add `storage_graph` to show the plugins stored or needed to be calculated in the dependency tree #1353

Closed dachengx closed 6 months ago

dachengx commented 6 months ago

Before you submit this PR: make sure to put all operations-related information in a wiki-note, a PR should be about code and is publicly accessible

What does the code in this PR do / what does it improve?

Depends on https://github.com/XENONnT/base_environment/pull/1593

slack thread

As an example:

import straxen
st = straxen.contexts.demo()
test_run_id_1T = "180423_1021"
st.storage_graph(test_run_id_1T, "event_info", format="png")

gives you file 180423_1021-event_info.gv.png:

event_info gv

Can you briefly describe how it works?

  1. green means already stored
  2. orange means strax.SaveWhen.ALWAYS so that it will be saved if you process raw_records
  3. yellow means strax.SaveWhen.TARGET
  4. red means strax.SaveWhen.EXPLICIT
  5. grey means strax.SaveWhen.NEVER

Can you give a minimal working example (or illustrate with a figure)?

Please include the following if applicable:

Notes on testing

All italic comments can be removed from this template.

coveralls commented 6 months ago

Coverage Status

coverage: 91.298% (-0.02%) from 91.32% when pulling 4a003f12a8797734b6b31c2aa47e6ea45285145d on storage_graph into cd6ba20cd68a9836c32cd5baaa27aa5666d49825 on master.

dachengx commented 6 months ago

The failure of test is a comer case that might be fixed in another PR. https://github.com/XENONnT/straxen/actions/runs/8576757387/job/23508277771?pr=1353