Skip to content

More cleanup of imports focused mostly on testing and utils around testing #3841

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

Merged
merged 9 commits into from
Apr 22, 2025

Conversation

zm711
Copy link
Member

@zm711 zm711 commented Apr 4, 2025

I'm going to keep chipping away at this cleanup to try to add some margin speed gains in the library. :)

Also fixed a typo in a function name. This is pretty deep in the sorter utils. Maybe a deprecation, but I feel like no?

@alejoe91 alejoe91 added the packaging Related to packaging/style label Apr 17, 2025
@zm711 zm711 marked this pull request as ready for review April 18, 2025 12:37
@@ -24,6 +23,7 @@
# ----------------------------------------------------------------------------------------------------------------------


### Shouldn't we skip if we can't find the package. In both these cases we skip if we find the packages.....#####
Copy link
Member Author

Choose a reason for hiding this comment

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

@alejoe91 actually I had one question about this PR while we work on fixing the testing suite? What is the point of this check? I understand that we skip if ON_GITHUB but why would we skip if we find the packages we need in order to run the test?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah logic is wrong! If you have the packages locally it should run!

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed :)

@zm711
Copy link
Member Author

zm711 commented Apr 22, 2025

@h-mayorquin any interest in taking a quick look at this :)

Copy link
Collaborator

@h-mayorquin h-mayorquin left a comment

Choose a reason for hiding this comment

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

Some comments, looks OK to me.

@@ -40,11 +40,10 @@ def has_plexon2_dependencies():
return False

# Check for 'zugbruecke' using pip
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# Check for 'zugbruecke' using pip

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'm cool with committing this. Will do next.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes, that comment is ... false, right?

@@ -116,8 +116,6 @@ def _set_params(
**other_kwargs,
):

import pandas as pd
Copy link
Collaborator

Choose a reason for hiding this comment

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

The import should throw an error at the init of anything that will need it downstream. Is this the case, here?

Copy link
Member Author

Choose a reason for hiding this comment

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

If that's the case we can check check for the spec and raise an error. I can add that in a new commit.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I am just wondering if this is a place where some things are initialized but I don't know template metrics.

Copy link
Member Author

@zm711 zm711 Apr 22, 2025

Choose a reason for hiding this comment

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

We are NOT currently using the package here. I think because we use it later Sam/Alessio just import it everywhere. Tests are passing so we are not directly using it at init. But you raise a good point that we should probably check that it is around at init for users!

@zm711
Copy link
Member Author

zm711 commented Apr 22, 2025

thanks for your comments Heberto. Let me doublecheck on the pandas thing.

Copy link
Collaborator

@h-mayorquin h-mayorquin left a comment

Choose a reason for hiding this comment

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

LGTM.

@alejoe91 alejoe91 merged commit 444b382 into SpikeInterface:main Apr 22, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packaging Related to packaging/style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants