From f32ec414df873952a16ca72060d858ff73da13bd Mon Sep 17 00:00:00 2001 From: Eran Date: Wed, 3 Jan 2024 09:15:11 -0500 Subject: [PATCH] check config keys --- process_bigraph/composite.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/process_bigraph/composite.py b/process_bigraph/composite.py index 4dd0397..493f698 100644 --- a/process_bigraph/composite.py +++ b/process_bigraph/composite.py @@ -103,6 +103,12 @@ def __init__(self, config=None, local_types=None): if config is None: config = {} + # check that all keywords in config are in config_schema + for key in config.keys(): + if key not in self.config_schema: + raise Exception(f'config key {key} not in config_schema for {self.__class__.__name__}') + + # fill in defaults for config self.config = self.types.fill( self.config_schema, config)