Skip to content

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

Closed
musicinmybrain wants to merge 1 commit intoSpikeInterface:mainfrom
musicinmybrain:issue-321
Closed

Move probeinterface.testing out of the API; fixes #321#322
musicinmybrain wants to merge 1 commit intoSpikeInterface:mainfrom
musicinmybrain:issue-321

Conversation

@musicinmybrain
Copy link
Copy Markdown
Contributor

This is one idea for how to deal with #321.

$ python3 -m venv _e
$ . _e/bin/activate
(_e) $ pip install -e .[test]
(_e) $ python3 -m pytest -v
[…]
= 86 passed, 1 warning in 2.69s =

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.53%. Comparing base (26634d6) to head (71753f7).
Report is 62 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #322      +/-   ##
==========================================
- Coverage   89.58%   89.53%   -0.05%     
==========================================
  Files          12       11       -1     
  Lines        1939     1930       -9     
==========================================
- Hits         1737     1728       -9     
  Misses        202      202              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

from probeinterface import read_3brain

from probeinterface.testing import validate_probe_dict
from ..utilities import validate_probe_dict
Copy link
Copy Markdown
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...

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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same here

@alejoe91
Copy link
Copy Markdown
Member

alejoe91 commented Mar 7, 2025

@musicinmybrain thanks for working on this!
After some discussion, we merged this one instead #326, that adds the schema to the package data and makes jsonschema import optional

@alejoe91 alejoe91 closed this Mar 7, 2025
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.

2 participants