Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set contents of temporary file if reference data does not match in ref_data_compare_from_paths.ipynb #58

Merged
merged 3 commits into from
Nov 17, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions notebooks/ref_data_compare_from_paths.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,22 @@
" tmp2['/test_runner_simple/spectrum_virtual/_frequency'][:-1], \n",
" tmp2['/test_runner_simple/spectrum_virtual/luminosity'])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"if False in tt.match.values or None in tt.match.values:\n",
" print(\"Reference files do not match, setting contents of tmp file to zero.\")\n",
" with open('/tmp/refdata_compare_result', 'w+') as file:\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

" file.write('0')\n",
"else:\n",
" print(\"Reference files match.\")\n",
" with open('/tmp/refdata_compare_result', 'w+') as file:\n",
" file.write('1') "
]
}
],
"metadata": {
Expand Down