You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python version: 3.7 (but it's not dependent on version)
Operating system: Linux
What is the current behavior?
When running on current master when running anything that calls the validate_qobj_against_schema() function will fail if installing the code outside of the repo. This is because the json file isn't included in the sdist. (because it's not a python file) So when the function tries to load the schema file it will fail.
Steps to reproduce the problem
I've been installing qiskit from master with pip in a venv to reproduce this. Just do:
$ virtualenv3 test
$ test/bin/python $repo_path/setup.py build
$ test/bin/python -m pip install $repo_path
$ run_code that uses qiskit and calls qobj_validation (I've been running the performance benchmarks)
This commit fixes a small oversight when qobj validation was added
in Qiskit#805. The validation depends on a json schema files being present
to validate against, however these weren't being included in the
python package. This just adds it to the MANIFSET file to make sure we
include it.
FixesQiskit#859
This commit fixes a small oversight when qobj validation was added
in Qiskit#805. The validation depends on a json schema files being present
to validate against, however these weren't being included in the
python package. This just adds it to the MANIFSET file to make sure we
include it.
FixesQiskit#859
Informations
Current master
What is the current behavior?
When running on current master when running anything that calls the
validate_qobj_against_schema()
function will fail if installing the code outside of the repo. This is because the json file isn't included in the sdist. (because it's not a python file) So when the function tries to load the schema file it will fail.Steps to reproduce the problem
I've been installing qiskit from master with pip in a venv to reproduce this. Just do:
$ virtualenv3 test
$ test/bin/python $repo_path/setup.py build
$ test/bin/python -m pip install $repo_path
$ run_code that uses qiskit and calls qobj_validation (I've been running the performance benchmarks)
What is the expected behavior?
The qobj validation finds the schema and works.
Suggested solutions
There are 2 possible solutions, leverage data files to include the json file in the sdist: https://python-packaging.readthedocs.io/en/latest/non-code-files.html
Or alternatively encapsulate the json schema in a python file. Basically just make the json a string (or a native jsonschema object) in a python file.
The text was updated successfully, but these errors were encountered: