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

Find the frontends which stored the targets #802

Merged
merged 2 commits into from Feb 7, 2024
Merged

Find the frontends which stored the targets #802

merged 2 commits into from Feb 7, 2024

Conversation

dachengx
Copy link
Collaborator

@dachengx dachengx commented Feb 6, 2024

What is the problem / what does the code in this PR do

Update _get_source_sf to get_source_sf to return a list of frontends that store the target(s).

Can you briefly describe how it works?

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

Please include the following if applicable:

  • Update the docstring(s)
  • Update the documentation
  • Tests to check the (new) code is working as desired.
  • Does it solve one of the open issues on github?

Please make sure that all automated tests have passed before asking for a review (you can save the PR as a draft otherwise).

@coveralls
Copy link

coveralls commented Feb 6, 2024

Coverage Status

coverage: 91.476% (+0.05%) from 91.43%
when pulling eaf48fd on find_sf
into 0f36687 on master.

@dachengx dachengx marked this pull request as ready for review February 6, 2024 08:30
@FaroutYLq FaroutYLq self-requested a review February 6, 2024 19:47
Copy link
Collaborator

@FaroutYLq FaroutYLq left a comment

Choose a reason for hiding this comment

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

Thanks for the very nice function! Below is an example I tested. Looks good to me and it will be very helpful for cleaning up data availability issue.

Test on dali login node, in 2024.01.1 container:

>>> import cutax
>>> import strax
>>> strax.__file__
'/home/yuanlq/software/strax/strax/__init__.py'
>>> st.get_source_sf('053505', 'peaklets')
[]
>>> st.is_stored('053505', 'peaklets')
False
>>> st.get_source_sf('053447', 'peaklets' )
[straxen.storage.rundb.RunDB, readonly: True]
>>> st.is_stored('053447', 'peaklets' )
True

@dachengx dachengx merged commit 2aa293a into master Feb 7, 2024
9 checks passed
@dachengx dachengx deleted the find_sf branch February 7, 2024 08:50
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.

None yet

3 participants