1. 08 Jul, 2016 2 commits
    • David Johnson's avatar
      Expose manager as an ApplicableClass, and a couple methods. · f13a48ca
      David Johnson authored
      Expose the ensure_slice and ensure_sliver methods as managed_* aliases
      to hopefully avoid confusion.
      f13a48ca
    • David Johnson's avatar
      Separate the log stuff out, and add early-log-via-envvar. · 0539c9d7
      David Johnson authored
      Since the Applicable code logs as it is being used as a decorator as
      other files are being parsed, we need a logger before the command-line
      options are parsed.  And now, since multiple source files might setup
      the root logger, we ensure it only gets hooked up to the console once.
      Subsequent calls to configure_logging only affect the logging level.
      
      If you need early debug logging, set ELASTICSLICE_DEBUG to anything.
      
      Oh, and I changed the default log level to WARN, from INFO.
      0539c9d7
  2. 07 Jul, 2016 2 commits
    • David Johnson's avatar
    • David Johnson's avatar
      Significant improvements to Applicable*. · bf4ab421
      David Johnson authored
      Now we try to harvest as much info as possible from the function
      metadata (i.e. args, kwargs, default values) and function
      docstrings, assuming that the markup is sphinxy python (i.e.,
      :param foo: help for foo).  This saves a ton of redundant typing in the
      decorators.  The ApplicableMethod decorator can be told *not* to auto-
      populate from the metadata and docstrings, *or* it can be told to
      exclude certain function parameters from promotion to argparse
      parameters.
      
      Also, drink our own koolaid by creating ApplicableFormatters,
      so we can have custom formatters per-function, that each have their
      own arguments.  To reuse all this argparse automation code, they have to
      be decorators on the formatter function.
      bf4ab421
  3. 06 Jul, 2016 2 commits
  4. 29 Jun, 2016 1 commit
    • David Johnson's avatar
      Add a single-command mode for the client. · 19476ddb
      David Johnson authored
      This is based on a decorator class, ApplicableMethod, that exposes
      methods on objects to direct invocation from the command line.
      
      It uses argparse + subcommands (+ a default subcommand of 'interactive'
      to preserve old behavior).
      
      The decorator class methods create argparse subparsers based on
      the decorator args for each decorated function.  Kinda cool.  Didn't
      end up working as slick as I would have liked, due to decorator
      limitations.  But still, useful... and eliminates tons of boilerplate.
      19476ddb
  5. 08 Jun, 2016 2 commits
  6. 07 Jun, 2016 2 commits
  7. 06 Jun, 2016 1 commit
  8. 28 May, 2016 1 commit
  9. 27 May, 2016 1 commit
  10. 26 May, 2016 1 commit
  11. 23 May, 2016 1 commit