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

Mandatorily wrap _read_chunk in a check_chunk_n decorator #758

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

dachengx
Copy link
Collaborator

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

To ease the workflow of developing a new StorageBackend, the PR mandatorily wraps _read_chunk in a check_chunk_n decorator instead.

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

@github-actions
Copy link

Coverage Status

coverage: 91.439% (-0.02%) from 91.454% when pulling 4cbc457 on chunk_n_backend into 1ca53c6 on master.

@JYangQi00
Copy link
Collaborator

Thanks Dacheng,

I just want to make sure I'm understanding this correctly, so please correct me if I am wrong. The point of this PR is just to reduce code duplication by making the wrapper apply to every instance of a StorageBackend via the __new__ class, correct? If so, this PR looks good to me and I will accept

@dachengx
Copy link
Collaborator Author

Thanks Dacheng,

I just want to make sure I'm understanding this correctly, so please correct me if I am wrong. The point of this PR is just to reduce code duplication by making the wrapper apply to every instance of a StorageBackend via the __new__ class, correct? If so, this PR looks good to me and I will accept

Thanks. Yes, you are correct.

@dachengx dachengx merged commit e3692be into master Sep 19, 2023
8 checks passed
@dachengx dachengx deleted the chunk_n_backend branch September 19, 2023 20:06
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