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

Dev no relative imports 2 #1277

Merged
merged 27 commits into from
Feb 15, 2024
Merged

Dev no relative imports 2 #1277

merged 27 commits into from
Feb 15, 2024

Conversation

pgunn
Copy link
Member

@pgunn pgunn commented Feb 15, 2024

This is a successor to #1202 (which was too stale to commit and probably benefitted anyhow from another look).

At point of PR it's relatively maximalist (except in a few cases where I backed off a bit), particularly in cases where the full name of a function competes with a local name (where I think we really need to go to the extra effort to distinguish them).

After the PR exists:
A) I'll fix anything that CI catches
B) I'll go back and look at walking some of this; being able to reliably know from looking at code where something came from is important (and where an object, method, or local function has the same name as a pathed function/class, staying maximalist makes sense no matter how long things get), but where pathed functions get long enough and there are no overlaps, I'll consider doing named function imports. Particularly where we're just doing one import. I think this is a workable compromise and will get us more consistency than what we'd get if we go to bat for-or-against particular cases.
C) I'll also have to grep the codebase for any more relative imports, as I may have missed some. Hoping to also entirely get rid of any instances of "import caiman as cm / cm.foo()" which is not grep-friendly b/c of matplotlib.cm.foo() and a few other weird things.

I'll be landing this pretty soon to avoid risk of merge conflicts because it touches a lot of the codebase and I don't want to redo it again

@pgunn pgunn merged commit 1cf9d71 into dev Feb 15, 2024
3 checks passed
@pgunn pgunn deleted the dev_no_relative_imports_2 branch February 15, 2024 23:11
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.

1 participant