Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic pipeline loading #106

Closed
yaythomas opened this issue Jan 16, 2019 · 0 comments
Closed

dynamic pipeline loading #106

yaythomas opened this issue Jan 16, 2019 · 0 comments
Assignees
Labels
enhancement new features type: core core functionality

Comments

@yaythomas
Copy link
Member

refactor to allow dynamic plug-in approach to discovering and loading pipelines.

def load_and_run_pipeline(
        pipeline_name,
        pipeline_context_input=None,
        working_dir=None,
        context=None,
        parse_input=True,
        loader=None
):
    # the default loader is the file loader.
    if not loader:
        loader = 'pypyr.pipeloaders.fileloader'

     # get loader dynamically
     loader_module = pypyr.moduleloader.get_module(loader)
     pipeline_definition = loader_module.get_pipeline_definition(...)

Refactor the current get_pipeline_definition() to a new pypyr.pipeloaders.fileloader

Add an optional loader param to pypyr.steps.pype step. this needs to be completely backwards compatible. In get_arguments:
loader = pype.get('loader', None)
and add to the return tuple.

Custom loaders need to adhere to the signature get_pipeline_definition(pipeline_name, working_dir), returning a dict-y pipeline definition.

@yaythomas yaythomas added enhancement new features type: core core functionality labels Jan 16, 2019
@yaythomas yaythomas added this to To do in pypyr roadmap via automation Jan 16, 2019
@yaythomas yaythomas moved this from To do to In progress in pypyr roadmap Jan 16, 2019
@yaythomas yaythomas assigned yaythomas and Reskov and unassigned yaythomas Jan 16, 2019
@yaythomas yaythomas mentioned this issue Jan 18, 2019
pypyr roadmap automation moved this from In progress to Done Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new features type: core core functionality
Projects
pypyr roadmap
  
Done
Development

No branches or pull requests

2 participants