You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a lot of GMT processing scripts that take in one or more table/grid inputs, and I was wondering how this should be handled. This came up as I was trying to wrap text at #321 and it also applies to grdtrack at #308 and other functions (see e.g. this search).
In gmt bash, it looks something like this:
gmt func data1.txt data2.txt -A -B -C
Implementation ideas
So the least amount of work would be to disallow multiple file inputs and force the user write a for-loop to process each file separately. This 'feature' would then need to be documented somewhere.
Another way I've thought about is to patch the kwargs_to_string function in decorators.py to include a 'sequence_space' convertor. This means a user can pass in a list of filenames (e.g. ["data1.txt", "data2.txt"]) which will be converted into a space-separated string (i.e. "data1.txt data2.txt") that can then be passed into the wrapper function when we do:
Description of the desired feature
There are a lot of GMT processing scripts that take in one or more table/grid inputs, and I was wondering how this should be handled. This came up as I was trying to wrap
text
at #321 and it also applies togrdtrack
at #308 and other functions (see e.g. this search).In gmt bash, it looks something like this:
Implementation ideas
So the least amount of work would be to disallow multiple file inputs and force the user write a
for-loop
to process each file separately. This 'feature' would then need to be documented somewhere.Another way I've thought about is to patch the
kwargs_to_string
function in decorators.py to include a'sequence_space'
convertor. This means a user can pass in a list of filenames (e.g.["data1.txt", "data2.txt"]
) which will be converted into a space-separated string (i.e."data1.txt data2.txt"
) that can then be passed into the wrapper function when we do:Thoughts?
Are you willing to help implement and maintain this feature? Yes!
The text was updated successfully, but these errors were encountered: