Add 'about' function giving information on local installation.#1840
Add 'about' function giving information on local installation.#1840nonhermitian wants to merge 1 commit into
Conversation
| print("Install path: %s" % qiskit_install_path) | ||
|
|
||
|
|
||
| def get_available_providers(): |
There was a problem hiding this comment.
This would only return providers that are within the qiskit.providers namespace, which currently is only BasicAer, Aer, and IBMQ i think.
For example, this 3rd party provider will not be returned?
https://github.com/Qiskit/qiskit-jku-provider
There was a problem hiding this comment.
This actually is a good match up with #1465 which will add a discovery mechanism for this and populate the providers off of qiskit.providers
There was a problem hiding this comment.
Well, I am not sure how to handle providers that do not inject themselves into qiskit, but rather must be imported. One could imagine that you could look for all packages with instances of BaseProvider in them. But that seems less than ideal. There is a PR on provider registration #1465, and this could easily be modified to deal with that case when it comes.
| print("Qiskit-terra: %s" % qiskit.__version__) | ||
| print("Numpy: %s" % numpy.__version__) | ||
| print("Scipy: %s" % scipy.__version__) | ||
| print("Networkx: %s" % nx.__version__) |
There was a problem hiding this comment.
rather than hardcoding these, why not get them from requirements.txt?
because say we remove networkx in the future, someone then has to remember to update this.
Also, do the versions of dependencies make a difference to the user experience (assuming they meet the minimum requirement)?
There was a problem hiding this comment.
These are not hardcoded but grabbed from the modules. These numbers are likely not the minimum values given in the requirements.txt.
If people remove packages, then of course you need to update stuff. That would be a one-line change. If I include a test, then in your situation, the test would fail telling people to remove the code in question.
So they could. What it does help is with bug reporting. It could be that new versions cause trouble, or version mismatches, and this info can be included in a bug report. Basically the "Information" section that the top of our bug reports could be replace with just the return from this function.
There was a problem hiding this comment.
Oh I see what your saying. Because I do not want to list all the requirements. psutil, ply are probably not as important as the more 'core' packages above.
|
should this be in the mega qiskit as it should also give aer etc? |
|
oh i see it does find aer :-) |
|
So aer is injected as provider in qiskit.providers, as is ibmq. However in meta could have single about for all elements. May be verbose though |
|
It might be good to integrate this with |
|
shall we try to merge this for 0.8? @nonhermitian can you keep it mergeable? |
|
I am thinking just to close this. We can return to it if need be. |
Summary
Gives information about local install:
Details and comments