Closed mwheeler closed 2 years ago
This issue is to resolve a bug with PathParameter, where tasks which are given a None value (eg: no file/path provided) end up with a "None" string (which code tries to interpret as a file path), instead of an actual None value.
PathParameter
None
"None"
One example of this causing issues is IFG land center: https://github.com/GeoscienceAustralia/gamma_insar/blob/pygamma_workflow/insar/workflow/luigi/interferogram.py#L66-L71
self.shape_file is "None" thus a file called "None" is attempted to be read (and fails).
self.shape_file
The issue stems somewhere within Luigi maybe? but an easy fix is probably just to add a work-around in PathParameter in the short term.
https://github.com/GeoscienceAustralia/gamma_insar/blob/pygamma_workflow/insar/workflow/luigi/utils.py#L114
None if (not arguments or arguments == "None") else Path(arguments) could probably work around this issue.
None if (not arguments or arguments == "None") else Path(arguments)
This issue is to resolve a bug with
PathParameter
, where tasks which are given aNone
value (eg: no file/path provided) end up with a"None"
string (which code tries to interpret as a file path), instead of an actualNone
value.One example of this causing issues is IFG land center: https://github.com/GeoscienceAustralia/gamma_insar/blob/pygamma_workflow/insar/workflow/luigi/interferogram.py#L66-L71
self.shape_file
is"None"
thus a file called"None"
is attempted to be read (and fails).The issue stems somewhere within Luigi maybe? but an easy fix is probably just to add a work-around in
PathParameter
in the short term.https://github.com/GeoscienceAustralia/gamma_insar/blob/pygamma_workflow/insar/workflow/luigi/utils.py#L114
None if (not arguments or arguments == "None") else Path(arguments)
could probably work around this issue.