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

Add function to collect data_type and data_kind #839

Merged
merged 3 commits into from
May 16, 2024

Conversation

dachengx
Copy link
Collaborator

@dachengx dachengx commented May 14, 2024

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

Add a function to return the collection of which data_type belongs to which data_kind.

slack thread

Can you briefly describe how it works?

Iterate through the strax.Conetxt._plugin_class_registry and init plugins by strax.Conetxt.__get_plugin to let strax.Context to assign the data_kind, then collect the results.

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

In the test, the function get_data_kinds will return:

({'records': ['records'], 'peaks': ['peaks', 'cut_peaks']}, {'records': 'records', 'peaks': 'peaks', 'cut_peaks': 'peaks'})

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).

@dachengx dachengx requested a review from yuema137 May 14, 2024 14:40
@coveralls
Copy link

coveralls commented May 14, 2024

Coverage Status

coverage: 90.721% (+0.002%) from 90.719%
when pulling 5bd0f0e on data_kind_collection
into d66cd35 on master.

@dachengx dachengx marked this pull request as ready for review May 14, 2024 14:56
Copy link
Collaborator

@yuema137 yuema137 left a comment

Choose a reason for hiding this comment

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

@dachengx Thanks this looks good. I made a small modification to check the output in the test.

@dachengx dachengx merged commit 53499c3 into master May 16, 2024
9 checks passed
@dachengx dachengx deleted the data_kind_collection branch May 16, 2024 03:45
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.

3 participants