docs: add a command line reference (no bug), r=releng-reviewers,gbrown
authorAndrew Halberstadt <ahal@mozilla.com>
Wed, 23 Mar 2022 20:28:11 +0000
changeset 388 0d0a66e79086b569061900b7e6abe0fcffd7f2c6
parent 387 50fedb350a6f9e137ca4b42a95fc285d4a3fe88b
child 389 8ad78a37ec18fda719479cfd085a2f3a6db16eb6
push id214
push userahalberstadt@mozilla.com
push dateWed, 23 Mar 2022 20:30:16 +0000
treeherdertaskgraph@8ad78a37ec18 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersreleng-reviewers, gbrown
docs: add a command line reference (no bug), r=releng-reviewers,gbrown This is autogenerated using the 'sphinx-argparse' extension. Jira: RELENG-709 Depends on D141849 Differential Revision: https://phabricator.services.mozilla.com/D141850
docs/conf.py
docs/howto/run-locally.rst
docs/reference/cli.rst
docs/reference/index.rst
requirements/test.in
requirements/test.txt
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -25,16 +25,17 @@ author = "releng"
 # -- General configuration ---------------------------------------------------
 
 # Add any Sphinx extension module names here, as strings. They can be
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
 # ones.
 extensions = [
     "sphinx.ext.autodoc",
     "sphinx.ext.napoleon",
+    "sphinxarg.ext",
     "sphinxcontrib.mermaid",
 ]
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ["_templates"]
 
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
--- a/docs/howto/run-locally.rst
+++ b/docs/howto/run-locally.rst
@@ -34,17 +34,18 @@ For a list of available sub-commands, se
 
    taskgraph --help
 
 .. _useful arguments:
 
 Useful Arguments
 ~~~~~~~~~~~~~~~~
 
-Here are some useful arguments accepted by most ``taskgraph`` subcommands.
+Here are some useful arguments accepted by most ``taskgraph`` subcommands. For
+a full reference, see :doc:`/reference/cli`.
 
 ``-J/--json``
 +++++++++++++
 
 By default only the task labels are displayed as output, but when ``-J/--json``
 is used, the full JSON representation of all task definitions are displayed.
 
 .. note::
new file mode 100644
--- /dev/null
+++ b/docs/reference/cli.rst
@@ -0,0 +1,7 @@
+Command Line
+============
+
+.. argparse::
+   :module: taskgraph.main
+   :func: create_parser
+   :prog: taskgraph
--- a/docs/reference/index.rst
+++ b/docs/reference/index.rst
@@ -1,7 +1,8 @@
 Reference
 =========
 
 .. toctree::
    :maxdepth: 2
 
+   cli
    source/modules
--- a/requirements/test.in
+++ b/requirements/test.in
@@ -1,10 +1,11 @@
 -r base.in
 black
 dataclasses; python_version < "3.7"  # not a direct dependency
 flake8
 mock
 pytest
 responses
 sphinx
+sphinx-argparse
 sphinxcontrib-mermaid
 yamllint
--- a/requirements/test.txt
+++ b/requirements/test.txt
@@ -1,9 +1,9 @@
-# SHA1:b3a9f1aaacb779b8db0e65f71adecef658dd908a
+# SHA1:7669d3b3a2f05c977a1c6ec997a20dc6740d4166
 #
 # This file is autogenerated by pip-compile-multi
 # To update, run:
 #
 #    pip-compile-multi
 #
 -r base.txt
 alabaster==0.7.12 \
@@ -195,16 +195,22 @@ six==1.16.0 \
     # via responses
 snowballstemmer==2.2.0 \
     --hash=sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1 \
     --hash=sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a
     # via sphinx
 sphinx==4.3.2 \
     --hash=sha256:0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c \
     --hash=sha256:6a11ea5dd0bdb197f9c2abc2e0ce73e01340464feaece525e64036546d24c851
+    # via
+    #   -r requirements/test.in
+    #   sphinx-argparse
+sphinx-argparse==0.3.1 \
+    --hash=sha256:295ccae425874630b6a3b47254854027345d786bab2c3ffd5e9a0407bc6856b2 \
+    --hash=sha256:82151cbd43ccec94a1530155f4ad34f251aaca6a0ffd5516d7fadf952d32dc1e
     # via -r requirements/test.in
 sphinxcontrib-applehelp==1.0.2 \
     --hash=sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a \
     --hash=sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58
     # via sphinx
 sphinxcontrib-devhelp==1.0.2 \
     --hash=sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e \
     --hash=sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4