nasa / opera-sds-pge

Observational Products for End-Users from Remote Sensing Analysis (OPERA)
Apache License 2.0
16 stars 6 forks source link

Remove Python module execution support from run_utils.py #473

Closed collinss-jpl closed 1 month ago

collinss-jpl commented 2 months ago

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.

collinss-jpl commented 1 month ago

Closed by #494