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

qobj_schema.json not included in sdist #859

Closed
mtreinish opened this issue Sep 4, 2018 · 0 comments · Fixed by #860
Closed

qobj_schema.json not included in sdist #859

mtreinish opened this issue Sep 4, 2018 · 0 comments · Fixed by #860

Comments

@mtreinish
Copy link
Member

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.

mtreinish added a commit to mtreinish/qiskit-core that referenced this issue Sep 4, 2018
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.

Fixes Qiskit#859
lia-approves pushed a commit to edasgupta/qiskit-terra that referenced this issue Jul 30, 2019
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.

Fixes Qiskit#859
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 a pull request may close this issue.

1 participant