When the core PGE capabilities were first written, it was thought that we might need to support execution of the SAS as Python module vs. a Python script (ex. python3 -m opera.adt.dswx_s1). Fallback logic was added to run_utils.create_sas_command_line and run_utils.create_qa_command_line to run the command from the RunConfig as a Python module if it was not an executable file. However, this feature has not shown itself to be useful for OPERA, and if anything it can create more confusion when a configured executable is simply missing on local disk.
The goal of this ticket is to replace this conditional branch with an error that states the "configured executable from the RunConfig cannot be found" or similar. The same change should also be applied here.
Lastly, we should add a unit test to test_base_pge.py that hits this new condition (configured executable from RunConfig does not exist on local filesystem) and ensures we get the expected Exception back.
When the core PGE capabilities were first written, it was thought that we might need to support execution of the SAS as Python module vs. a Python script (ex.
python3 -m opera.adt.dswx_s1
). Fallback logic was added torun_utils.create_sas_command_line
andrun_utils.create_qa_command_line
to run the command from the RunConfig as a Python module if it was not an executable file. However, this feature has not shown itself to be useful for OPERA, and if anything it can create more confusion when a configured executable is simply missing on local disk.The goal of this ticket is to replace this conditional branch with an error that states the "configured executable from the RunConfig cannot be found" or similar. The same change should also be applied here.
Lastly, we should add a unit test to
test_base_pge.py
that hits this new condition (configured executable from RunConfig does not exist on local filesystem) and ensures we get the expected Exception back.