Skip to content

Commit

Permalink
Replace sphinx[...]-autoprogram by sphinx-argparse
Browse files Browse the repository at this point in the history
Why:

sphinxcontrib-autoprogram's pip version does not support python 3. There
is a more recent version in bitbucket's repository but the installation
is tedious for the few features it gives.
(See comment SMART-Lab#160 (comment)
 for more details on the problem)

How:

sphinxcrontrib-autoprogram was only used to generate automatic
documentation of the script smart-dispatch so the replacement was
trivial. The output is slightly different, arguments being included in
tables for sphinx-argparse while not for sphinxcrontrib-autoprogram.
Overall sphinx-argparse seems good enough.
  • Loading branch information
bouthilx committed Sep 14, 2017
1 parent db9a31a commit 94a2148
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
5 changes: 1 addition & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# 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', 'sphinxcontrib.autoprogram']
extensions = ['sphinx.ext.autodoc', 'sphinxarg.ext']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down Expand Up @@ -151,6 +151,3 @@
author, 'SmartDispatch', 'One line description of project.',
'Miscellaneous'),
]



4 changes: 3 additions & 1 deletion docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Usage
=====

.. autoprogram:: scripts/smart-dispatch:get_parser()
.. argparse::
:filename: scripts/smart-dispatch
:func: get_parser
:prog: smart-dispatch


Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
'scripts/sd-launch-pbs'],
url='https://github.com/SMART-Lab/smartdispatch',
license='LICENSE.txt',
description='An easy to use job launcher for supercomputers with PBS compatible job manager.',
description=('An easy to use job launcher for supercomputers with PBS '
'compatible job manager.'),
long_description=open('README.md').read(),
install_requires=['psutil>=1'],
extras_require={
'doc': ['sphinxcontrib-autoprogram>=0.1.3']
'doc': ['sphinx-argparse>=0.2.1']
},
package_data={'smartdispatch': ['config/*.json']}
)

0 comments on commit 94a2148

Please sign in to comment.