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 cache of Rechunker, zero chunk is not None #849

Merged
merged 2 commits into from
Jun 29, 2024
Merged

Conversation

dachengx
Copy link
Collaborator

@dachengx dachengx commented Jun 29, 2024

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

This PR solves the error we see in straxen testing GitHub action: https://github.com/XENONnT/straxen/actions/runs/9516464741/job/26232816323

When the length of a chunk is zero, this line returns False:

if self.cache:

Which is not intended. The intended behavior is to concatenate the cache and a new chunk if the cache is not None. This PR fix it.

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

@dachengx dachengx marked this pull request as ready for review June 29, 2024 20:53
Copy link

Coverage Status

coverage: 90.458% (+0.2%) from 90.238%
when pulling 2f1c6b8 on debug_chunk
into d92e64b on master.

1 similar comment
@coveralls
Copy link

Coverage Status

coverage: 90.458% (+0.2%) from 90.238%
when pulling 2f1c6b8 on debug_chunk
into d92e64b on master.

@coveralls
Copy link

Coverage Status

coverage: 90.519% (-0.07%) from 90.587%
when pulling 2f1c6b8 on debug_chunk
into d92e64b on master.

@coveralls
Copy link

Coverage Status

Changes unknown
when pulling 2f1c6b8 on debug_chunk
into ** on master**.

@dachengx dachengx merged commit f9d953e into master Jun 29, 2024
9 checks passed
@dachengx dachengx deleted the debug_chunk branch June 29, 2024 21:04
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.

2 participants