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

passing/overriding config via flask ...run <param> #85

Open
leo-schick opened this issue Jun 21, 2022 · 0 comments
Open

passing/overriding config via flask ...run <param> #85

leo-schick opened this issue Jun 21, 2022 · 0 comments
Labels

Comments

@leo-schick
Copy link
Member

I would wish an option in the cli command flask mara_pipelines.ui.run to override variables.

Example:

I have a app.config.py file:

from enum import Enum

class ProcessingMode(Enum):
    FULL = 'full'
    INCREMENTAL = 'incremental'

def processing_mode() -> ProcessingMode:
    """The processing mode to be used"""
    return ProcessingMode.INCREMENTAL

def default_window_in_days() -> int:
    """The default refresh window for models when running a incremental sync."""
    return 90

Now I would like to override the config for a singe pipeline execution.

Sample design:

# sets the processing_mode to FULL
flask mara_pipelines.ui.run --patch-config app.config.processing_mode=FULL

# sets the default_window_in_days to 180 days
flask mara_pipelines.ui.run --patch-config app.config.default_window_in_days=FULL

The parameter name should maybe not be called --patch-config <str>. Terraform uses e.g. -var=<...>/-var-file=<...>

@leo-schick leo-schick changed the title passing/overriding variables via flask ...run <param> passing/overriding config via flask ...run <param> Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant