Package: cognate
========
CognateWelcome toCognate, a package designed with making it easy to create
component services.Cognatestrives to ease the burden of configuration
management and logging configuration, by providing the infrastructure.Cognatefosters component service architectures by making the design,
implementation, and testing of services less of a chore.A sample hello world component:from cognate.component_core import ComponentCore
import sys

class HelloWorld(ComponentCore):
    def __init__(self, name='World', **kwargs):
        self.name = name

        super().__init__(**kwargs)

    def cognate_options(self, arg_parser):
        arg_parser.add_argument(
            '--name',
            default=self.name,
            help='Whom will receive the salutation.')

    def run(self):
        self.log.info('Hello %s', self.name)


if __name__ == '__main__':
    argv = sys.argv
    service = HelloWorld(argv=argv)
    service.run()Allows for the executable:$ python hello_world.py -h
usage: hello_world.py [-h] [--service_name SERVICE_NAME]
                      [--log_level {debug,info,warn,error}]
                      [--log_path LOG_PATH] [--verbose] [--name NAME]

optional arguments:
  -h, --help            show this help message and exit
  --service_name SERVICE_NAME
                        This will set the name for the current instance.
                        This will be reflected in the log output.
                        (default: HelloWorld)
  --log_level {debug,info,warn,error}
                        Set the log level for the log output. (default: error)
  --log_path LOG_PATH   Set the path for log output. The default file created
                        is "<log_path>/<service_name>.log". If the path
                        ends with a ".log" extension, then the path be a
                        target file. (default: None)
  --verbose             Enable verbose log output to console. Useful for
                        debugging. (default: False)
  --name NAME           Whom will receive the salutation. (default: World)DocumentationFor the latest documentation, visithttp://neoinsanity.github.io/cognate.Getting CognateInstallationUse pip to install Cognate.pip install cognateSourceThe latest stable release source ofCognatecan be found on the master
branch athttps://github.com/neoinsanity/cognate/tree/master.For the latest development code, use the develop branch athttps://github.com/neoinsanity/cognate. Please note that the development branch
may change without notification.To installCognatefrom source utilize thesetup.py:python setup.py installProject DevelopmentIf you are interested in developingCognatecode,
utilize the helper scripts in thecognate/bindirectory.Setup the Development EnvironmentPrior to running the dev setup scripts, ensure that you havevirtualenvinstalled. All setup commands are assumed to be run from the project root,
which is the directory containing thesetup.pyfile.Prep the development environment with the command:bin/dev_setup.shThis command will setup the virtualenv for the project in the
directory/venv. It will also install theCognatein a develop mode,
with the creation of a development egg file.Enable the Development EnvironmentTo make it easy to ensure a correctly configured development session,
utilize the command:. bin/enable_dev.shorsource bin/enable_dev.shNote that the script must be sourced, as it will enable a virtualenv session
and add thebindirectory scripts to environmentPATH.Running TestsTo run the unit tests:run_tests.shA BUILD/COVERAGE_REPORT directory will be generated with the test coverage
report. To view the report, open index.html in the generated directory in
a browser.Building DocumentationTo run the documentation generation:doc_build.shA BUILD//doc/build directory will be generated with the documentation. To
view the documentation, open index.html in the generated directory in
a browser.