-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
create_fake_backend: tool for creating fake backend files and settings #8466
Conversation
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
Pull Request Test Coverage Report for Build 3083784995
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really nice and handy! I left a few comments.
In addition, I think it would be great if this script also runs the update_fake_backends.py
script so just one command python ./tools/create_fake_backend.py --hub <redacted> ibm_oslo
to create the files and pull the system snapshots.
parser.add_argument("backend_name", type=str, default=None) | ||
parser.add_argument("system_name", type=str, default=None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we pass in only the system name as argument instead of both backend name and system name? You can stripe off the leading ibm_
or ibmq_
from system name to get the backend name
python ./tools/create_fake_backend.py --hub <...> ibm_oslo
instead of
python ./tools/create_fake_backend.py --hub <...> oslo ibm_oslo
vars_ = { | ||
"HEADER": HEADER, | ||
"backend_name": args.backend_name, | ||
"capital_backend_name": args.backend_name.capitalize(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there was a discussion that we don't need to add BackendV1
fake backend any more. Ideally I would like to have FakeVigo
to be a backend that has the latest backend version, FakeVigoV1
and FakeVigoV2
to have explicit backend version name in the class and FakeVigo
is simply FakeVigoV2
and it will be FakeVigoV3
if there is a new backend version.
But at the moment we don't have this distinction. Fake backends without explicit version like FakeVigo
are all V1 backends. So I would suggest to add V2
for all the backends that are created using this script to avoid confusion. What do you think?
One last thing. Can you also add documentation of how to run the script in the same file? |
This probably should be in the provider, once #9553 gets addressed . |
With moving the IBM's fake providers to |
This script creates the file for setting a new fake backend, including inserting the lines around and the release note.