Skip to content

Commit 6205cd1

Browse files
authored
Allow for separate code gen app config (#7)
* Allow for seperate code gen app.config while retaining the helm chart generated config
1 parent 5db543e commit 6205cd1

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

servicex_codegen/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ def create_app(test_config=None, provided_translator=None):
5757

5858
if test_config:
5959
app.config.from_mapping(test_config)
60-
elif 'APP_CONFIG_FILE' in os.environ:
61-
app.config.from_envvar('APP_CONFIG_FILE')
60+
else:
61+
if 'APP_CONFIG_FILE' in os.environ:
62+
app.config.from_envvar('APP_CONFIG_FILE')
63+
if 'CODEGEN_CONFIG_FILE' in os.environ:
64+
app.config.from_envvar('CODEGEN_CONFIG_FILE')
6265

6366
with app.app_context():
6467
translator = provided_translator

servicex_codegen/post_operation.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,12 @@ def post(self):
9090
body["code"], cache_path=tempdir)
9191

9292
zip_data = self.stream_generated_code(generated_code_result)
93-
# code gen transformer returns the default transformer image mentioned in the config file
93+
# code gen transformer returns the default transformer image mentioned in
94+
# the config file
9495
transformer_image = current_app.config.get("TRANSFORMER_SCIENCE_IMAGE")
95-
# Send the response back to you-know-what.
9696

97-
# MultipartEncoder library takes multiple types of data fields and merge them into a multipart mime data type
97+
# MultipartEncoder library takes multiple types of data fields and merge
98+
# them into a multipart mime data type
9899
m = MultipartEncoder(
99100
fields={'transformer_image': transformer_image,
100101
'zip_data': zip_data}

0 commit comments

Comments
 (0)