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

Set child_plugin to salting plugins #48

Merged
merged 1 commit into from
Apr 28, 2024
Merged

Set child_plugin to salting plugins #48

merged 1 commit into from
Apr 28, 2024

Conversation

dachengx
Copy link
Collaborator

Because they borrowed the functions but not the lineage.

In other words, if the lineage is sensitive to the change of version of the base class, like EventShadowSalted, it is fine to not set the child_plugin to be True. But for plugins that only borrow the methods, like EventBasicsSalted, we need to make sure that the lineage tracks the version change of EventBasics.

To test this, without child_plugin=True, when __version__ of straxen.EventBasics is changed, the linage or hash of EventBasicsSalted will not change.

It would be better if we could use XENONnT/straxen#1273 to test this PR. But it is OK because it is not merged.

close #42

Because they borrowed the functions but not the lineage
@coveralls
Copy link

Coverage Status

coverage: 54.936% (+0.3%) from 54.626%
when pulling 5b17f47 on set_child_plugin
into ab18078 on main.

@dachengx dachengx merged commit 85f81b8 into main Apr 28, 2024
7 checks passed
@dachengx dachengx deleted the set_child_plugin branch April 28, 2024 15:35
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.

Set child_plugin if necessary
2 participants