Skip to content

Let the build_arg_string function handle GMT configurations #2299

Closed

Description

@seisman

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}

Activity

  1. added
    enhancement
    question
    on Jan 4, 2023
  2. seisman commented on Jan 7, 2023

    @seisman
    MemberAuthor

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

  3. michaelgrund commented on Jan 7, 2023

    @michaelgrund
    Member

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

    Sounds good from my side!

  4. weiji14 commented on Jan 8, 2023

    @weiji14
    Member

    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.

  5. seisman commented on Jan 9, 2023

    @seisman
    MemberAuthor

    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.

  6. weiji14 commented on Jan 9, 2023

    @weiji14
    Member

    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.

  7. removed
    question
    on Jan 14, 2023
  8. added this to the 0.9.0 milestone on Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions