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

Fix savewhen issues #648

Merged
merged 18 commits into from Feb 14, 2022
Merged

Fix savewhen issues #648

merged 18 commits into from Feb 14, 2022

Conversation

JoranAngevaare
Copy link
Member

@JoranAngevaare JoranAngevaare commented Feb 12, 2022

Fix some issues introduced in features added in #631

also see XENONnT/straxen#879

@coveralls
Copy link

coveralls commented Feb 12, 2022

Pull Request Test Coverage Report for Build 1837651073

  • 20 of 20 (100.0%) changed or added relevant lines in 4 files are covered.
  • 8 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.01%) to 89.004%

Files with Coverage Reduction New Missed Lines %
strax/run_selection.py 1 86.84%
strax/processing/peak_building.py 2 98.03%
strax/processing/general.py 5 91.76%
Totals Coverage Status
Change from base Build 1837321917: -0.01%
Covered Lines: 4654
Relevant Lines: 5229

💛 - Coveralls

@WenzDaniel
Copy link
Collaborator

Hmm I thought we covered everything with the tests added in 631. What have we overlooked?

@JoranAngevaare
Copy link
Member Author

Some functions that use the lines I changed here and are failing in XENONnT/straxen#879

for p in self._plugin_class_registry.values()
for d in p.provides])

return {dtype: dict(hash=h, save_when=save_when.name, version=version)
Copy link
Member Author

Choose a reason for hiding this comment

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

issue 1, save_when.name

@@ -91,9 +91,10 @@ def scan_runs(self: strax.Context,
+ list(self.context_config['check_available'])))

for target in check_available:
p = self._plugin_class_registry[target]
if p.save_when < strax.SaveWhen.ALWAYS:
Copy link
Member Author

Choose a reason for hiding this comment

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

issue 2

@@ -203,6 +203,7 @@ class PeakClassification(strax.Plugin):
lone_hits='lone_hits')
depends_on = ('peaks',)
rechunk_on_save = True
save_when = immutabledict({k: strax.SaveWhen.ALWAYS for k in provides})
Copy link
Member Author

Choose a reason for hiding this comment

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

dummy way of testing logic

tests/test_context.py Outdated Show resolved Hide resolved
Comment on lines -427 to +428
if not self._plugin_class_registry[target].save_when > strax.SaveWhen.NEVER:
save_when = self.get_save_when(target)
if save_when == strax.SaveWhen.NEVER:
Copy link
Member Author

Choose a reason for hiding this comment

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

issue 3

Copy link
Collaborator

@WenzDaniel WenzDaniel 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 fixing. Looks good.

@WenzDaniel WenzDaniel merged commit 0803acb into master Feb 14, 2022
@WenzDaniel WenzDaniel deleted the fix_savewhen_issues branch February 14, 2022 07: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.

None yet

3 participants