absolute module import in stackSentinel/StripMap.py#505
absolute module import in stackSentinel/StripMap.py#505hfattahi merged 1 commit intoisce-framework:mainfrom
stackSentinel/StripMap.py#505Conversation
+ use absolute module import in stackSentinel.py and stackStripMap.py to allow for pythonic calls - e.g. stackSentinel.main() and stackStripMap.main() + contrib/stack/README.md: update installation note to add $ISCE_STACK to $PYTHONPATH + alosStack: use $ISCE_STACK/alosStack to replace $PATH_ALOSSTACK for style consistency
|
Looks helpful to make the |
What if we also install topsStack, stripmapStack, etc along with the other python modules? Then we can simply |
|
@rtburns-jpl I think the problem is that |
|
Yeah, we wouldn't be able to install the applications in a flat namespace, so if you wanted to simply run |
|
If installed via conda, all the stack processors are currently included in the Since topsStack is more frequently used in its development version (for me at least), is there an easy way to point |
|
Although the current way of adding |
|
We should decide today or tomorrow whether to merge this before we freeze version for the UNAVCO 2022 short course. I don't understand enough about how Python works to advise on the details. |
If I understand that correctly, we definitely shouldn't merge something breaking for a bugfix release. I think we can come up with something that will not break existing setups, and will make the stack more programmable without involving more env variable trickery. |
Yeah, I agree with this. |
I would argue that:
Thus, I would think it is good to be merged, probably after the currently planned next bugfix release. Adding @hfattahi and @piyushrpt to see if they have opinions on this. |
|
@rtburns-jpl I think this is useful functionality and would be nice to merge. You can increment the minor release and make it clear in README of the release what users need to change to be able to keep running the stack processor. @yunjunz can help with that clarification. |
|
Ok sounds good, thanks. I'll include this in the next feature release. |
|
Thanks, @hfattahi and @rtburns-jpl. Here is a note for clarification in the release: NOTE: Since this release, users should add |
|
@rtburns-jpl When you have some time, I think this is a substantial change to ISCE2 that would merit at least a minor version bump. |
+ resolve the conflicts since stackSentinel.py has been updated (in isce-framework#505, isce-framework#702)
This PR replaces the
from Stack import *line instackSentinel.pyandstackStripMap.pywith the absolute module import below, to allow for pythonic calls to theirmain().This change requires adding
$ISCE_STACKto$PYTHONPATH, thus, would break the previous default setup for stack processors. But it enables a more programmable workflow/recipe for the downstream developers. So I think it's a good change at a small cost: updating the stack processor path setup, which is updated in the README file.The PR also includes a small change on
alosStack: use $ISCE_STACK/alosStack to replace $PATH_ALOSSTACK for style consistency