-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
V4 - feat: A new
diagnostics
module has been added. (#1628)
* feat: A new `diagnostics` module has been added. The `get_report` function can be used to get a gather and report on various diaganostics. * fix testoutput annotation * add test * Add `PRAGMA DELAY ...` breaking change * bump qcs-sdk-python
- Loading branch information
Showing
6 changed files
with
86 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import pyquil | ||
from qcs_sdk import diagnostics | ||
|
||
|
||
def get_report() -> str: | ||
""" | ||
Get a report of the current state of the pyQuil installation, Python environment, | ||
and supporting packages. | ||
Note: this format is not stable and its content may change between versions. | ||
""" | ||
return f"""pyQuil version: {pyquil.__version__} | ||
{diagnostics.get_report()} | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import pyquil | ||
from pyquil.diagnostics import get_report | ||
|
||
|
||
def test_report(): | ||
report = get_report() | ||
assert report.split("\n").pop(0) == "pyQuil version: {}".format(pyquil.__version__) |