Skip to content

Commit

Permalink
ocs-client-cli: add docs and move it into library to be a console-script
Browse files Browse the repository at this point in the history
  • Loading branch information
mhasself committed Aug 17, 2021
1 parent 60606ac commit 1502d6b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
15 changes: 15 additions & 0 deletions docs/user/cli_tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,18 @@ For information on how to run::
is meant to only avoid reuploading already pushed data, particularly valuable
if you need to restart a large upload job. This will be ``.g32influx.db`` in
the directory you run the script from.


ocs-client-cli
==============

(The output from ``ocs-client-cli --help`` should be rendered here.
In addition to the options discussed, the script supports the same
"Site Config Options" that Agents usually support, such as
``--site-file=...``. If there are some stray instances of
``%(prog)s``, imagine ``ocs-client-cli`` in their place.)

.. argparse::
:module: ocs.client_cli
:func: get_parser
:prog: ocs-client-cli
6 changes: 0 additions & 6 deletions bin/ocs-client-cli → ocs/client_cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3

import argparse
import sys
import code
Expand Down Expand Up @@ -28,7 +26,6 @@
%(prog)s scan
----
"""


Expand Down Expand Up @@ -135,6 +132,3 @@ def main(args=None):
shell(parser, args)
else:
parser.error(f"Unknown command '{args.command}'")

if __name__ == '__main__':
main()
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
description='Observatory Control System',
package_dir={'ocs': 'ocs'},
packages=find_packages(include=['ocs', 'ocs.*']),
scripts=['bin/ocsbow', 'bin/ocs-client-cli'],
scripts=['bin/ocsbow'],
entry_points={
'console_scripts': [
'ocs-client-cli=ocs.client_cli:main',
],
},
package_data={'': ['support/*json']},
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass())

0 comments on commit 1502d6b

Please sign in to comment.