improve docs (2)
This commit is contained in:
parent
f1ea08346c
commit
1adc36ae24
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
*.pyc
|
||||
doc/build
|
||||
|
@ -31,6 +31,9 @@ import shlex
|
||||
# ones.
|
||||
extensions = [
|
||||
'sphinx.ext.viewcode',
|
||||
# 'oslosphinx',
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinxarg.ext',
|
||||
]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
@ -49,7 +52,7 @@ master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'timmy'
|
||||
copyright = u'2015, Mirantis'
|
||||
#copyright = u'2015, Mirantis'
|
||||
author = u'Mirantis'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
@ -87,7 +90,7 @@ exclude_patterns = []
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
@ -110,12 +113,13 @@ todo_include_todos = False
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'alabaster'
|
||||
html_theme = 'classic'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
#html_theme_options = {'incubating': True}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
@ -139,7 +143,7 @@ html_theme = 'alabaster'
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
#html_static_path = ['_static']
|
||||
|
||||
# Add any extra paths that contain custom files (such as robots.txt or
|
||||
# .htaccess) here, relative to this directory. These files are copied
|
||||
@ -177,7 +181,7 @@ html_static_path = ['_static']
|
||||
#html_show_sphinx = True
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
html_show_copyright = False
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
|
@ -14,7 +14,8 @@ Contents:
|
||||
specification
|
||||
configuration
|
||||
usage
|
||||
|
||||
cli
|
||||
tools
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
@ -6,6 +6,7 @@ The easiest way to launch timmy would be running the ``timmy.py`` script.
|
||||
However, you need to :doc:`configure </configuration>` it first.
|
||||
|
||||
Basically, the ``timmy.py`` is a simple wrapper that launches ``cli.py``.
|
||||
Full :doc:`reference </cli>` for command line interface
|
||||
|
||||
Basic parameters:
|
||||
|
||||
|
10
setup.py
10
setup.py
@ -3,19 +3,21 @@
|
||||
from setuptools import setup
|
||||
import os
|
||||
|
||||
dtm = os.path.join(os.path.abspath(os.sep), 'usr', 'share', 'timmy')
|
||||
pname = 'timmy'
|
||||
dtm = os.path.join(os.path.abspath(os.sep), 'usr', 'share', pname)
|
||||
rqfiles = [(os.path.join(dtm, root), [os.path.join(root, f) for f in files])
|
||||
for root, dirs, files in os.walk('rq')]
|
||||
rqfiles.append((os.path.join(dtm, 'configs'), ['config.yaml', 'rq.yaml']))
|
||||
|
||||
setup(name='timmy',
|
||||
setup(name=pname,
|
||||
version='1.2.0',
|
||||
author="Aleksandr Dobdin",
|
||||
author_email='dobdin@gmail.com',
|
||||
license='Apache2',
|
||||
url='https://github.com/adobdin/timmy',
|
||||
long_description=open('README.md').read(),
|
||||
packages=["timmy"],
|
||||
packages=[pname],
|
||||
data_files=rqfiles,
|
||||
include_package_data=True,
|
||||
entry_points={'console_scripts': ['timmy=timmy.cli:main']})
|
||||
entry_points={'console_scripts': ['%s=%s.cli:main' %(pname, pname) ]},
|
||||
)
|
||||
|
@ -17,5 +17,5 @@
|
||||
# Builds a Sphinx documentation
|
||||
|
||||
sphinx-build -b html doc/source/ doc/build/
|
||||
rm -f "./*.pyc"
|
||||
rm -f "./timmy/*.pyc"
|
||||
rm -f ./*.pyc
|
||||
rm -f ./timmy/*.pyc
|
||||
|
15
timmy/cli.py
15
timmy/cli.py
@ -33,12 +33,7 @@ def pretty_run(quiet, msg, f, args=[], kwargs={}):
|
||||
print('%s: done' % msg)
|
||||
return result
|
||||
|
||||
|
||||
@interrupt_wrapper
|
||||
def main(argv=None):
|
||||
if argv is None:
|
||||
argv = sys.argv
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description=('Parallel remote command'
|
||||
' execution and file'
|
||||
' manipulation tool'))
|
||||
@ -139,6 +134,14 @@ def main(argv=None):
|
||||
parser.add_argument('-d', '--debug',
|
||||
help='Be extremely verbose.',
|
||||
action='store_true')
|
||||
return parser
|
||||
|
||||
|
||||
@interrupt_wrapper
|
||||
def main(argv=None):
|
||||
if argv is None:
|
||||
argv = sys.argv
|
||||
parser = parse_args()
|
||||
args = parser.parse_args(argv[1:])
|
||||
if args.quiet and not args.warning:
|
||||
loglevel = logging.ERROR
|
||||
|
@ -164,6 +164,9 @@ def get_dir_structure(rootdir):
|
||||
|
||||
|
||||
def load_yaml_file(filename):
|
||||
"""
|
||||
Loads yaml data from file
|
||||
"""
|
||||
try:
|
||||
with open(filename, 'r') as f:
|
||||
return yaml.load(f)
|
||||
@ -181,6 +184,9 @@ def load_yaml_file(filename):
|
||||
|
||||
|
||||
def mdir(directory):
|
||||
"""
|
||||
Creates a directory if it doesn't exist
|
||||
"""
|
||||
if not os.path.exists(directory):
|
||||
logging.debug('creating directory %s' % directory)
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user