-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Ben Dichter <[email protected]> Co-authored-by: Cody Baker <[email protected]>
- Loading branch information
1 parent
6df8660
commit fc6ae26
Showing
15 changed files
with
167 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Install packages | ||
description: This action installs the package and its dependencies for testing | ||
|
||
inputs: | ||
os: | ||
description: 'Operating system to set up' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install wine on Linux | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list | ||
sudo dpkg --add-architecture i386 | ||
sudo apt-get update -qq | ||
sudo apt-get install -yqq --allow-downgrades libc6:i386 libgcc-s1:i386 libstdc++6:i386 wine | ||
shell: bash | ||
- name: Install wine on macOS | ||
if: runner.os == 'macOS' | ||
run: | | ||
brew install --cask xquartz | ||
brew install --cask wine-stable | ||
shell: bash | ||
|
||
- name: Skip installation on Windows | ||
if: ${{ inputs.os == 'Windows' }} | ||
run: echo "Skipping Wine installation on Windows. Not necessary." | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,11 @@ jobs: | |
git config --global user.email "[email protected]" | ||
git config --global user.name "CI Almighty" | ||
- name: Install Wine (For Plexon2 Tests) | ||
uses: ./.github/actions/install-wine | ||
with: | ||
os: ${{ runner.os }} | ||
|
||
- name: Install full requirements | ||
run: pip install --no-cache-dir .[full,test] | ||
|
||
|
@@ -70,7 +75,7 @@ jobs: | |
id: cache-ephys-datasets | ||
with: | ||
path: ./ephy_testing_data | ||
key: ephys-datasets-2024-03-27-${{ matrix.os }}-${{ steps.ephys.outputs.HASH_EPHY_DATASET }} | ||
key: ephys-datasets-2024-06-21-ubuntu-latest-${{ steps.ephys.outputs.HASH_EPHY_DATASET }} | ||
- name: Get ophys_testing_data current head hash | ||
id: ophys | ||
run: echo "::set-output name=HASH_OPHYS_DATASET::$(git ls-remote https://gin.g-node.org/CatalystNeuro/ophys_testing_data.git HEAD | cut -f1)" | ||
|
@@ -79,7 +84,7 @@ jobs: | |
id: cache-ophys-datasets | ||
with: | ||
path: ./ophys_testing_data | ||
key: ophys-datasets-2022-08-18-${{ matrix.os }}-${{ steps.ophys.outputs.HASH_OPHYS_DATASET }} | ||
key: ophys-datasets-2022-08-18-ubuntu-latest-${{ steps.ophys.outputs.HASH_OPHYS_DATASET }} | ||
- name: Get behavior_testing_data current head hash | ||
id: behavior | ||
run: echo "::set-output name=HASH_BEHAVIOR_DATASET::$(git ls-remote https://gin.g-node.org/CatalystNeuro/behavior_testing_data.git HEAD | cut -f1)" | ||
|
@@ -88,7 +93,7 @@ jobs: | |
id: cache-behavior-datasets | ||
with: | ||
path: ./behavior_testing_data | ||
key: behavior-datasets-2023-07-26-${{ matrix.os }}-${{ steps.behavior.outputs.HASH_behavior_DATASET }} | ||
key: behavior-datasets-2023-07-26-ubuntu-latest-${{ steps.behavior.outputs.HASH_behavior_DATASET }} | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Plexon2 Recording Conversion | ||
---------------------------- | ||
|
||
Install NeuroConv with the additional dependencies necessary for reading Plexon acquisition data. | ||
|
||
.. code-block:: bash | ||
pip install neuroconv[plexon] | ||
.. warning:: | ||
When running plexon2 conversion on platforms other than Windows, you also need to install `wine <https://www.winehq.org/>`_. | ||
|
||
Convert Plexon2 recording data to NWB using :py:class:`~neuroconv.datainterfaces.ecephys.plexon.plexondatainterface.Plexon2RecordingInterface`. | ||
|
||
.. code-block:: python | ||
>>> from datetime import datetime | ||
>>> from zoneinfo import ZoneInfo | ||
>>> from pathlib import Path | ||
>>> from neuroconv.datainterfaces import Plexon2RecordingInterface | ||
>>> | ||
>>> file_path = f"{ECEPHY_DATA_PATH}/plexon/4chDemoPL2.pl2" | ||
>>> # Change the file_path to the location in your system | ||
>>> interface = Plexon2RecordingInterface(file_path=file_path, verbose=False) | ||
>>> | ||
>>> # Extract what metadata we can from the source files | ||
>>> metadata = interface.get_metadata() | ||
>>> # For data provenance we add the time zone information to the conversion | ||
>>> tzinfo = ZoneInfo("US/Pacific") | ||
>>> session_start_time = metadata["NWBFile"]["session_start_time"] | ||
>>> metadata["NWBFile"].update(session_start_time=session_start_time.replace(tzinfo=tzinfo)) | ||
>>> | ||
>>> # Choose a path for saving the nwb file and run the conversion | ||
>>> nwbfile_path = f"{path_to_save_nwbfile}" | ||
>>> interface.run_conversion(nwbfile_path=nwbfile_path, metadata=metadata) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
zugbruecke >= 0.2.1; platform_system != "Windows" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
spikeinterface>=0.101.0 | ||
neo>=0.13.1 | ||
neo>=0.13.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
neo>=0.9.0 | ||
neo>=0.13.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import datetime | ||
|
||
from neuroconv.datainterfaces import Plexon2RecordingInterface | ||
|
||
from ..setup_paths import ECEPHY_DATA_PATH | ||
|
||
|
||
def test_session_start_time(): | ||
file_path = f"{ECEPHY_DATA_PATH}/plexon/4chDemoPL2.pl2" | ||
interface = Plexon2RecordingInterface(file_path=file_path) | ||
metadata = interface.get_metadata() | ||
session_start_time = metadata["NWBFile"]["session_start_time"] | ||
|
||
assert session_start_time == datetime.datetime(2013, 11, 20, 15, 59, 39) |