Skip to content

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

Merged
alejoe91 merged 9 commits into
NeuralEnsemble:masterfrom
h-mayorquin:platform_neo
Dec 6, 2023
Merged

alejoe91 merged 9 commits into
NeuralEnsemble:masterfrom
h-mayorquin:platform_neo

Conversation

@h-mayorquin

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

Copy link
Copy Markdown
Contributor

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

pep8speaks commented Nov 17, 2023 •

Copy link
Copy Markdown

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

@zm711 zm711 left a comment

Copy link
Copy Markdown
Contributor

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!

Comment thread neo/rawio/plexon2rawio/plexon2rawio.py Resolved
Comment thread neo/rawio/plexon2rawio/plexon2rawio.py Outdated
# 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
Copy Markdown
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!

Comment thread neo/rawio/plexon2rawio/plexon2rawio.py Resolved
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
Copy Markdown
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

@zm711 zm711 left a comment •

Copy link
Copy Markdown
Contributor

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.

Comment thread neo/rawio/plexon2rawio/plexon2rawio.py Resolved
Comment thread neo/rawio/plexon2rawio/plexon2rawio.py Resolved
Comment thread neo/rawio/plexon2rawio/plexon2rawio.py Resolved
@alejoe91
alejoe91 merged commit 51063db into NeuralEnsemble:master Dec 6, 2023
@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