From 934da3a3ea4d0f50261ec28d0b53fd70f1b8ddfe Mon Sep 17 00:00:00 2001 From: "Ian H. Pittwood" Date: Wed, 29 May 2019 11:36:46 -0500 Subject: [PATCH] Adds force option to manifest generation This change adds the "force" option to the XLS plugin, allowing users to forgo manifest missing data validation. Depends-On: Iff000eb173995156fbc6b44e621c59ba4dffae35 Change-Id: Icc9bf1bef0a6126e0d3915d3c809888c62086ee3 --- spyglass_plugin_xls/cli.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/spyglass_plugin_xls/cli.py b/spyglass_plugin_xls/cli.py index fec0fcf..31835f4 100644 --- a/spyglass_plugin_xls/cli.py +++ b/spyglass_plugin_xls/cli.py @@ -100,6 +100,13 @@ MANIFEST_DIR_OPTION = click.option( required=False, help='Path to place created manifest files.') +FORCE_OPTION = click.option( + '--force', + 'force', + is_flag=True, + default=False, + help="Forces manifests to be written, regardless of undefined data.") + @excel.command('intermediary', short_help='generate intermediary', @@ -135,6 +142,7 @@ def generate_intermediary(*args, **kwargs): @SITE_NAME_CONFIGURATION_OPTION @TEMPLATE_DIR_OPTION @MANIFEST_DIR_OPTION +@FORCE_OPTION def generate_manifests_and_intermediary(*args, **kwargs): process_input_ob = \ spyglass.cli.intermediary_processor('excel', **kwargs) @@ -147,5 +155,6 @@ def generate_manifests_and_intermediary(*args, **kwargs): LOG.debug("Skipping dump for intermediary yaml") LOG.info("Generating site Manifests") - processor_engine = SiteProcessor(intermediary_yaml, kwargs['manifest_dir']) + processor_engine = SiteProcessor( + intermediary_yaml, kwargs['manifest_dir'], kwargs['force']) processor_engine.render_template(kwargs['template_dir'])