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

Download correct ddl for 64 system on windows with Plexon #1350

Merged
merged 9 commits into from
Dec 6, 2023

Conversation

h-mayorquin
Copy link
Contributor

@h-mayorquin h-mayorquin commented Nov 17, 2023

Currently plexon download is fixed to use the 32 bits architecture. This means that plexon is not working if the windows machine is 64 bits. This PR fixes this by adding code that checks the architecture and selects the appropriate file to download based on that query.

There is a warning that I think should be removed in the code. Let me know what you think.

[EDIT] it seems that wine on linux uses the 32 bit architecture (I wonder why?) so I added code that restricts the 64 dll only for windows which does make sense anyway.

@pep8speaks
Copy link

pep8speaks commented Nov 17, 2023

Hello @h-mayorquin! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 89:100: E501 line too long (102 > 99 characters)

Comment last updated at 2023-12-06 15:04:03 UTC

Copy link
Contributor

@zm711 zm711 left a comment

Choose a reason for hiding this comment

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

One question @h-mayorquin and I support the removal of the warning personally!

neo/rawio/plexon2rawio/plexon2rawio.py Show resolved Hide resolved
# I think this warning should be removed
# Warnings should provide a solution but this is just a reminder to the user of normal behavior
# Nothing to do
warnings.warn(f'Using cached plexon dll at {pl2_dll_file_path}')
Copy link
Contributor

Choose a reason for hiding this comment

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

Super fair point. I don't think this warning is doing anything!

@@ -288,7 +301,7 @@ def _get_signal_size(self, block_index, seg_index, stream_index):
stream_id = self.header['signal_streams'][stream_index]['id']
stream_characteristic = list(self.signal_stream_characteristics.values())[stream_index]
assert stream_id == stream_characteristic.id
return stream_characteristic.n_samples
return int(stream_characteristic.n_samples) # Avoids returning a numpy.int64 scalar
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change is related to this:
SpikeInterface/spikeinterface#2223

Copy link
Contributor

@zm711 zm711 left a comment

Choose a reason for hiding this comment

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

This should fix 3/4 of the pep8 issues. The line too long could be fixed, but then it would look super ugly. The L84 issue is the most annoying pep8 check ever. But there were spaces on the blank line, so I think I deleted them all.

EDIT: Just to be clear, I don't care about them but if they are enforced this is just to make it easier to fix them really quick.

neo/rawio/plexon2rawio/plexon2rawio.py Outdated Show resolved Hide resolved
neo/rawio/plexon2rawio/plexon2rawio.py Outdated Show resolved Hide resolved
neo/rawio/plexon2rawio/plexon2rawio.py Outdated Show resolved Hide resolved
@alejoe91 alejoe91 merged commit 51063db into NeuralEnsemble:master Dec 6, 2023
1 check passed
@h-mayorquin h-mayorquin deleted the platform_neo branch December 6, 2023 15:25
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.

4 participants