Commit 05c1d4db authored by Agata Malgorzata Chadaj's avatar Agata Malgorzata Chadaj
Browse files

wip

parent 06da42d8
Pipeline #3176858 passed with stage
in 30 seconds
......@@ -24,8 +24,8 @@ def get_result():
result_nb = nbformat.read(result_path, as_version=4)
nb = outputs.NotebookOutput(result_nb)
try:
summary = nb.get_cells_by_tag('result')[0].get_cell_output(outputs.CellOutputType.STDOUT)[0]
result_flag = nb.get_cells_by_tag('result')[1].get_cell_output(outputs.CellOutputType.STDOUT)[0]
summary = nb.get_cells_by_tag('result')[1].get_cell_output(outputs.CellOutputType.STDOUT)[0]
result_flag = nb.get_cells_by_tag('result')[0].get_cell_output(outputs.CellOutputType.STDOUT)[0]
except IndexError:
return 'FAILED', ''
return result_flag, summary
......@@ -35,7 +35,7 @@ def save_data_to_file(data: dict):
file_path = '/eos/home-m/mpesoft/test.csv'
df = pd.DataFrame([data])
with open(file_path, 'a') as f:
df.to_csv(f, mode='a', header=f.tell() == 0)
df.to_csv(f, mode='a', header=f.tell() == 0, index=False)
if __name__ == '__main__':
......
......@@ -21,7 +21,9 @@ class PapermillNxcalsEngine(NBClientEngine):
to the notebook. Then calls :func: `NBClientEngine.execute_managed_notebook` to execute the parameterized
notebook locally.
"""
print('papermill engine')
print(**kwargs)
print(kwargs)
# make all cells tagged with 'ignore' raw
for cell in nb_man.nb.cells:
if _IGNORE_TAG in cell.metadata.tags:
......@@ -34,6 +36,7 @@ class PapermillNxcalsEngine(NBClientEngine):
# call the papermill execution engine:
return super().execute_managed_notebook(nb_man, kernel_name, **kwargs)
# save_analysis_result()
def _replace_matplotlib_backend(nb_man, new_backend='inline'):
......@@ -58,3 +61,7 @@ def _get_nxcals_config_cell():
def _get_nxcals_config():
return pkgutil.get_data('resources', _MANUAL_SPARK_CONFIG_FILE).decode("utf-8")
def save_analysis_result():
pass
......@@ -236,7 +236,7 @@
},
"outputs": [],
"source": [
"ipq_analysis.get_result()"
"ipq_analysis.get_status()"
]
},
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment