You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.
def validate(file, dir):
"""
Function that validates if a file and/or directory exist. If not a
RunTimeError is raised which is picked up by Autoreduction.
:param file: full path of data file. Provide empty string to ignore
:type file: str
:param dir: full path of a directory. Provide empty string to ignore
:type dir: str
"""
print("Running validation")
if file:
if not os.path.isfile(file):
raise RuntimeError("Unable to find file: {}".format(file))
if dir:
if not os.path.isdir(dir):
raise RuntimeError("Unable to find directory: {}".format(dir))
print("Validation successful")
and this method is called in main to check input_file and output_dir exist and return error messages back to users which can be presented in Webapp.
With this issue:
move this validate step to sit within Autoreduction service, work as before and with furhter potential benefit not starting reduction in the first place if this validation fails (Dimitar)
contact the instrument scientists that are known maintainers of reduce.py and inform of this simplication change to their scripts, and this include Pascal, Rob and Duc
remove validate() code from all reduce.py files including for production instruments
How to test the issue is resolved
unit testing please
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Issue raised by: developer
What?
Currently in all
reduce.py
we have:and this method is called in
main
to checkinput_file
andoutput_dir
exist and return error messages back to users which can be presented in Webapp.With this issue:
Follow up after validation of this work:
How to test the issue is resolved
unit testing please
The text was updated successfully, but these errors were encountered: