Skip to content

Conversation

@GenevieveBuckley
Copy link
Collaborator

@GenevieveBuckley GenevieveBuckley commented Nov 12, 2025

Closes #415

The __init__.py file of the dask_image.ndinterp has become very large (~780 lines), and currently contains five public API functions, plus associated helper functions. This is not ideal, since bigger files are harder to understand and maintain, and if anyone else adds a new function to the ndinterp package it'll push the file size over what's generally considered best practice (pylint suggests a maximum line limit of around 1000)

To avoid future problems, in this PR I've split the ndinterp init.py file into separate smaller files while keeping the git history preserved for each line. Now you can more easily see which part of the code is the most relevant, and each file is a more manageable size (roughly150-250 lines).

I followed this guide to split the files while still preserving the full git history.

@GenevieveBuckley
Copy link
Collaborator Author

fyi I checked the git history was kept by looking at the GitLens inline display of the git blame info in VScode. It seems to have worked properly. I'll cross check it against the inline git blame info shown in the github web browser.

@GenevieveBuckley GenevieveBuckley merged commit d5e334f into main Nov 12, 2025
17 checks passed
@GenevieveBuckley GenevieveBuckley deleted the split-long-ndinterp-init-file branch November 12, 2025 00:53
@GenevieveBuckley GenevieveBuckley mentioned this pull request Nov 12, 2025
@m-albert
Copy link
Collaborator

This is great!

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.

Maintenance: unpack long __init__.py file contents into separate files

3 participants