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

Move probeinterface.testing out of the API; fixes #321 #322

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added tests/__init__.py
Empty file.
Empty file added tests/test_io/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion tests/test_io/test_3brain.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from probeinterface import read_3brain

from probeinterface.testing import validate_probe_dict
from ..utilities import validate_probe_dict
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
from ..utilities import validate_probe_dict
from probeinterface.testing import validate_probe_dict

@musicinmybrain can you elaborate on why it's not a good ide to include the validate_probe_dict in the API? I think it's an important function also for the package, so I would leave it there...



data_path = Path(__file__).absolute().parent.parent / "data" / "3brain"
Expand Down
3 changes: 2 additions & 1 deletion tests/test_io/test_imro.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import numpy as np

from probeinterface import read_imro, write_imro
from probeinterface.testing import validate_probe_dict

from ..utilities import validate_probe_dict

data_path = Path(__file__).absolute().parent.parent / "data" / "imro"
imro_files = glob.glob(str(data_path / "*.imro"))
Expand Down
3 changes: 2 additions & 1 deletion tests/test_io/test_maxwell.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import pytest

from probeinterface import read_maxwell
from probeinterface.testing import validate_probe_dict

from ..utilities import validate_probe_dict

data_path = Path(__file__).absolute().parent.parent / "data" / "maxwell"

Expand Down
3 changes: 2 additions & 1 deletion tests/test_io/test_openephys.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import pytest

from probeinterface import read_openephys
from probeinterface.testing import validate_probe_dict

from ..utilities import validate_probe_dict

data_path = Path(__file__).absolute().parent.parent / "data" / "openephys"

Expand Down
3 changes: 2 additions & 1 deletion tests/test_io/test_spikegadgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

from probeinterface import read_spikegadgets
from probeinterface.io import parse_spikegadgets_header
from probeinterface.testing import validate_probe_dict

from ..utilities import validate_probe_dict


data_path = Path(__file__).absolute().parent.parent / "data" / "spikegadgets"
Expand Down
3 changes: 2 additions & 1 deletion tests/test_io/test_spikeglx.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
get_saved_channel_indices_from_spikeglx_meta,
parse_spikeglx_snsGeomMap,
)
from probeinterface.testing import validate_probe_dict

from ..utilities import validate_probe_dict

data_path = Path(__file__).absolute().parent.parent / "data" / "spikeglx"
meta_files = glob.glob(str(data_path / "*.meta"))
Expand Down
2 changes: 1 addition & 1 deletion src/probeinterface/testing.py → tests/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from probeinterface import __version__ as version
import jsonschema

json_schema_file = Path(__file__).absolute().parent.parent.parent / "resources" / "probe.json.schema"
json_schema_file = Path(__file__).absolute().parent.parent / "resources" / "probe.json.schema"
Copy link
Member

Choose a reason for hiding this comment

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

Same here

schema = json.load(open(json_schema_file, "r"))


Expand Down