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

Allow different chunk size #687

Merged
merged 12 commits into from Apr 12, 2022
Merged

Conversation

JoranAngevaare
Copy link
Member

Allow different chunk target size from original

@coveralls
Copy link

coveralls commented Apr 11, 2022

Coverage Status

Coverage decreased (-0.009%) to 93.129% when pulling 19b277f on target_size_mb-for-rectunking into 2888e61 on master.

@JoranAngevaare JoranAngevaare marked this pull request as ready for review April 12, 2022 12:22
Comment on lines +1778 to +1779
def _check_copy_to_frontend_kwargs(self, run_id, target, target_frontend_id, rechunk, rechunk_to_mb) -> None:
"""Simple kwargs checks for copy_to_frontend"""
Copy link
Member Author

Choose a reason for hiding this comment

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

I must admit I only added this bit because codefactor complained

Comment on lines +1849 to +1851
if rechunk and md["chunk_target_size_mb"] != rechunk_to_mb:
self.log.info(f'Changing chunk-size: {md["chunk_target_size_mb"]} -> {rechunk_to_mb}.')
md.update({'chunk_target_size_mb': rechunk_to_mb})
Copy link
Member Author

Choose a reason for hiding this comment

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

This is actually the only real change, the rest is cosmetic

Copy link
Contributor

@jmosbacher jmosbacher left a comment

Choose a reason for hiding this comment

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

Looks good. Just a typo in a type annotation, see inline comment. dont think that affects anything but probably should fix before merging.

strax/context.py Outdated
def copy_to_frontend(self,
run_id: str,
target: str,
target_frontend_id: ty.Optional[int] = None,
target_compressor: ty.Optional[str] = None,
rechunk: bool = False):
rechunk: False = None,
Copy link
Contributor

Choose a reason for hiding this comment

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

is this a typo or some weird syntax I'm not familiar with? shouldn't it still be a bool type hint?

Copy link
Member Author

Choose a reason for hiding this comment

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

definitely a typo. thanks for spotting!

@JoranAngevaare JoranAngevaare merged commit 0da372c into master Apr 12, 2022
@JoranAngevaare JoranAngevaare deleted the target_size_mb-for-rectunking branch April 12, 2022 14:16
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