From 6f390eb743cd70811821d919dba8914af8c7bce8 Mon Sep 17 00:00:00 2001 From: Peter-Metz Date: Fri, 11 Oct 2019 13:30:05 -0400 Subject: [PATCH] filter unsectioned params --- cs-config/cs_config/functions.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cs-config/cs_config/functions.py b/cs-config/cs_config/functions.py index 59c1bce..199d146 100644 --- a/cs-config/cs_config/functions.py +++ b/cs-config/cs_config/functions.py @@ -13,6 +13,7 @@ from dask import delayed, compute from collections import defaultdict from marshmallow import fields +from collections import OrderedDict AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "") @@ -59,10 +60,16 @@ def get_inputs(meta_params_dict): year=metaparams.year.tolist(), data_source=metaparams.data_source, ) + + filtered_pol_params = OrderedDict() + for k, v in policy_params.dump().items(): + if k =="schema" or v.get("section_1", False): + filtered_pol_params[k] = v + behavior_params = BehaviorParams() default_params = { - "policy": policy_params.dump(), + "policy": filtered_pol_params, "behavior": behavior_params.dump() } meta = metaparams.dump()