Skip to content

Use plugins to load workers and expose cli options #1044

@lorengordon

Description

@lorengordon

Right now, any cli argument is managed directly in the cli.py module. It passes all unknown arguments directly through to all workers. This was good for rapid iteration on worker functionality, but means that exposing arguments for a given worker requires modifying the cli.py module directly (as well as the worker itself).

Instead, consider an approach that is more modular, where the cli config for a worker is managed entirely in the worker. Where workers are "registered" as plugins with watchmaker, and that registration informs watchmaker how to expose the cli options for that worker. Look to pytest and pytest plugins for an example.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions