You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oodt.apache.org by Lewis John McGibbney <le...@apache.org> on 2018/12/04 18:34:02 UTC
Re: Question about Dynamic Workflows
OK Chris, working off of this
https://github.com/apache/drat/tree/master/pge/src/main/resources/config
Thanks
On 2018/11/30 05:20:36, Chris Mattmann <ma...@apache.org> wrote:
> Lewis, check out DRAT’s PGE config. I think you will find good help there.
>
> Also you can use the ConfigFileWriter (there is a template one, for an example
> I will dig one up and commit one from one of our airborne missions).
>
>
>
>
>
>
>
> From: lewis john mcgibbney <le...@apache.org>
> Reply-To: "dev@oodt.apache.org" <de...@oodt.apache.org>
> Date: Thursday, November 29, 2018 at 2:12 PM
> To: "dev@oodt.apache.org" <de...@oodt.apache.org>
> Subject: Question about Dynamic Workflows
>
>
>
> Hi dev@,
>
> I am working on a PGE which will essentially execute a (Python) command
>
> line tool but i am struggling with definition of parameters from the input
>
> data product to the PGE XML definition. Specifically I am not sure of how
>
> to map the product name to an input parameter for the command line tool
>
> invocation.
>
> The following PGE configuration snippet shows this
>
>
>
> ...
>
> <pgeConfig>
>
>
>
> <exe dir="[JobDir]" shell="/bin/bash">
>
> <cmd>pycoal-mineral ${flag#1} ${parameter#1} ${flag#2} ${parameter#2}
>
> ${flag#3} ${parameter#3} ...</cmd>
>
> </exe>
>
>
>
> In the above example ${flag#1} would be something like '-i' and the
>
> parameter value should be the name of a data product which has already been
>
> catalogued and archived to a success directory during a previous data
>
> acquisition task.
>
>
>
> The full CLI command execution would ultimately look something like the
>
> following
>
>
>
> pycoal-mineral \
>
> --image /usr/local/pycoal_data/
>
> avng.jpl.nasa.gov/AVNG_2015_data_distribution/L2/ang20150420t182050_rfl_v1e/ang20150420t182050_corr_v1e_img.hdr
>
> \
>
> --slib /usr/local/pycoal/pycoal/tests/s07_AV95_envi.hdr \
>
> --rgb_filename ang20150420t182050_corr_v1e_img_rgb.hdr
>
> --classified_filename ang20150420t182050_corr_v1e_img_mineral.hdr
>
> --algorithm SAM
>
>
>
> I need to
>
>
>
> 1. automatically infer the 1st parameter value for '--image' from the
>
> input data file which has been processed and archived to a specific
>
> directory
>
> 2. infer the 3rd parameter value for '--rgb_filename' from the 1st
>
> parameter and edit it slightly, and
>
> 3. infer the 4th parameter value for '--classified_filename' from the
>
> 1st parameter and edit it slightly
>
>
>
> Thanks for any help folks I really appreciate it.
>
> Lewis
>
>
>
> --
>
> http://home.apache.org/~lewismc/
>
> http://people.apache.org/keys/committer/lewismc
>
>
>
>