Commit 4145b858 authored by Sean Leavey's avatar Sean Leavey
Browse files

Use sphinxcontrib-programoutput to show output from CLI commands

parent 6b2557ae
Pipeline #112710 passed with stage
in 30 minutes and 24 seconds
......@@ -45,25 +45,7 @@ Search queries are specified as a set of declarative filters after the ``zero li
command. |Zero| implements an expression parser which allows queries to be
arbitrarily long and complex, e.g.:
.. code-block:: text
$ zero library search "model != OP* & ((vnoise <= 2n & vcorner < 10) | (vnoise <= 25n & inoise < 100f & icorner < 100))" --vnoise --vcorner --inoise --icorner
╒═════════╤════════════════════╤════════════╤════════════════════╤════════════╕
│ Model │ vnoise │ vcorner │ inoise │ icorner │
╞═════════╪════════════════════╪════════════╪════════════════════╪════════════╡
│ PZTFET1 │ 1.0000 nV/sqrt(Hz) │ 1.0000 Hz │ 1.0000 pA/sqrt(Hz) │ 1.0000 Hz │
├─────────┼────────────────────┼────────────┼────────────────────┼────────────┤
│ PZTFET2 │ 1.0000 nV/sqrt(Hz) │ 1.0000 Hz │ 1.0000 pA/sqrt(Hz) │ 1.0000 Hz │
├─────────┼────────────────────┼────────────┼────────────────────┼────────────┤
│ LT1028 │ 850.00 pV/sqrt(Hz) │ 3.5000 Hz │ 1.0000 pA/sqrt(Hz) │ 250.00 Hz │
├─────────┼────────────────────┼────────────┼────────────────────┼────────────┤
│ PZTFET3 │ 1.0000 nV/sqrt(Hz) │ 1.0000 Hz │ 1.0000 pA/sqrt(Hz) │ 1.0000 Hz │
├─────────┼────────────────────┼────────────┼────────────────────┼────────────┤
│ AD706 │ 17.000 nV/sqrt(Hz) │ 3.0000 Hz │ 50.000 fA/sqrt(Hz) │ 10.000 Hz │
├─────────┼────────────────────┼────────────┼────────────────────┼────────────┤
│ AD8628 │ 22.000 nV/sqrt(Hz) │ 1.0000 µHz │ 5.0000 fA/sqrt(Hz) │ 1.0000 µHz │
╘═════════╧════════════════════╧════════════╧════════════════════╧════════════╛
.. command-output:: zero library search "model != OP* & ((vnoise <= 2n & vcorner < 10) | (vnoise <= 25n & inoise < 100f & icorner < 100))"
The expression must be defined on one line. Whitespace is ignored. Where values are specified,
such as "1n", these are parsed by :class:`.Quantity`
......
......@@ -33,8 +33,12 @@ Showing the configuration
-------------------------
The combined contents of the built-in configuration and any user-defined additions or overrides can
be printed to the screen with ``zero config show``. For large configurations, it is often useful to
specify the ``--paged`` flag to allow the contents to be navigated.
be printed to the screen with:
.. command-output:: zero config show
For large configurations, it is often useful to specify the ``--paged`` flag to allow the contents
to be navigated.
Styling plots
-------------
......
......@@ -43,6 +43,7 @@ extensions = [
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'sphinxcontrib.programoutput',
'sphinx_click.ext',
'matplotlib.sphinxext.plot_directive',
]
......
......@@ -27,6 +27,7 @@ EXTRAS = {
"sphinx-autobuild",
"sphinx-click",
"sphinx_rtd_theme",
"sphinxcontrib-programoutput",
"doc8",
"numpydoc",
"nbsphinx",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment