Programmatically Executing a Luigi Workflow
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

As seen above, command line integration is achieved by simply adding

.. code:: python

    if __name__ == '__main__':
        luigi.run()

This will read the args from the command line (using argparse) and
invoke everything.

In case you just want to run a Luigi chain from a Python script, you can
do that internally without the command line integration. The code will
look something like

.. code:: python

    task = MyTask(123, 'xyz')
    sch = scheduler.CentralPlannerScheduler()
    w = worker.Worker(scheduler=sch)
    w.add(task)
    w.run()

Programmatically Executing a Luigi Workflow
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

As seen above, command line integration is achieved by simply adding

.. code:: python

    if __name__ == '__main__':
        luigi.run()

This will read the args from the command line (using argparse) and
invoke everything.

In case you just want to run a Luigi chain from a Python script, you can
do that internally without the command line integration. The code will
look something like

.. code:: python

    task = MyTask(123, 'xyz')
    interface.setup_interface_logging()
    sch = scheduler.CentralPlannerScheduler()
    w = worker.Worker(scheduler=sch)
    w.add(task)
    w.run()

Add setup_interface_logging() to execution docs.
Add setup_interface_logging() to execution docs.

Correct the programmatic execution example so that it, like run(),
configures interface logging.

Fixes the runtime error that occurs when following
the current docs/programmatic_execution.rst, namely:

    No handlers could be found for logger "luigi-interface"
