Closed
Description
The new module probeinterface.testing
, which ships as part of the probeinterface
wheel, loads probe.json.schema
at import time, but this only works using relative paths in a git checkout; probe.json.schema
doesn’t ship in the wheel at all.
Separately, probeinterface.testing
imports jsonschema
, which isn’t a regular dependency, only a test
extra dependency. I guess that’s “more OK:”
$ python3 -m venv _e
$ . _e/bin/activate
(_e) $ pip install probeinterface
$ python3 -c 'import probeinterface.testing'
Traceback (most recent call last):
File "<string>", line 1, in <module>
import probeinterface.testing
File "/home/ben/tmp/_e/lib64/python3.13/site-packages/probeinterface/testing.py", line 5, in <module>
import jsonschema
ModuleNotFoundError: No module named 'jsonschema'
(_e) $ pip install probeinterface[test]
(_e) $ $ python3 -c 'import probeinterface.testing'
Traceback (most recent call last):
File "<string>", line 1, in <module>
import probeinterface.testing
File "/home/ben/tmp/_e/lib64/python3.13/site-packages/probeinterface/testing.py", line 8, in <module>
schema = json.load(open(json_schema_file, "r"))
~~~~^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/ben/tmp/_e/lib64/python3.13/resources/probe.json.schema'
I’m not quite sure what would make this “nicer” in the most straighforward way. If it’s feasible to move probeinterface.testing
back out of probeinterface
and into tests/
, that would probably be best. Where it is, it looks like a public API, and that really doesn’t seem to be the intent.
Metadata
Metadata
Assignees
Labels
No labels