Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let the build_arg_string function handle GMT configurations #2299

Closed
seisman opened this issue Jan 4, 2023 · 5 comments · Fixed by #2324
Closed

Let the build_arg_string function handle GMT configurations #2299

seisman opened this issue Jan 4, 2023 · 5 comments · Fixed by #2324
Labels
enhancement Improving an existing feature
Milestone

Comments

@seisman
Copy link
Member

seisman commented Jan 4, 2023

Originally posted by @seisman in #2208 (comment)

When working on the Figure.timestamp function, I feel sometimes we may need to pass GMT's configurations directly to the GMT C API, i.e., passing a string like --FONT_LABEL=xxxx to the call_module function.

I propose to add a new parameter (e.g., confdict) to the build_arg_string function, which takes a dict and convert key-value pairs to the form of --key=value, e.g.,

build_arg_string(kwdict, confdict={"FONT_LOGO": font, "FORMAT_TIME_STAMP": timefmt}
@seisman seisman added enhancement Improving an existing feature question Further information is requested labels Jan 4, 2023
@seisman
Copy link
Member Author

seisman commented Jan 7, 2023

Ping @GenericMappingTools/pygmt-maintainers for comments on this enhancement before I start to work on it.

@michaelgrund
Copy link
Member

Ping @GenericMappingTools/pygmt-maintainers for comments on this enhancement before I start to work on it.

Sounds good from my side!

@weiji14
Copy link
Member

weiji14 commented Jan 8, 2023

Just to be clear, do you intend the --FONT_LABEL options to be internal only, or should users be allowed to do something like fig.timestamp(..., FONT_LABEL="xxxx")? By the way, this seems similar to what was discussed in #455.

@seisman
Copy link
Member Author

seisman commented Jan 9, 2023

do you intend the --FONT_LABEL options to be internal only, or should users be allowed to do something like fig.timestamp(..., FONT_LABEL="xxxx")?

It's only for internal use.

@weiji14
Copy link
Member

weiji14 commented Jan 9, 2023

do you intend the --FONT_LABEL options to be internal only, or should users be allowed to do something like fig.timestamp(..., FONT_LABEL="xxxx")?

It's only for internal use.

Ok, that sounds good.

@seisman seisman removed the question Further information is requested label Jan 14, 2023
@seisman seisman added this to the 0.9.0 milestone Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants