BREAKING: Figure.coast: Add parameter river_lakes for setting fills of river-lakes separately#4376
Open
seisman wants to merge 6 commits into
Open
BREAKING: Figure.coast: Add parameter river_lakes for setting fills of river-lakes separately#4376seisman wants to merge 6 commits into
seisman wants to merge 6 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors Figure.coast’s handling of GMT’s -C option to provide a clearer long-form API for setting lake vs river-lake fills, while preserving backward compatibility with the existing lakes=[...] list syntax.
Changes:
- Added a dedicated
_alias_option_Chelper to build-Carguments fromlakes/river_lakes, including a compatibility path for the legacy list form. - Introduced new
river_lakesparameter and updatedcoastvalidation logic and alias mapping accordingly. - Updated docstring alias/parameter documentation around lake and river-lake fills.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…f lakes/river-lakes
34 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR improves the alias of
coast's-Coption. The GMT CLI syntax is-Cfill[+l|+r].Previously,
-Cwas aliased tolakes. This PR split the-Coption into two parameters,lakesandriver_lakes. Here is a comparison of old and new usages:lakes="blue"lakes="blue", river_lakes="blue"lakes="blue+r"river_lakes="blue"lakes="blue+l"lakes="blue"lakes=["blue+r", "green+l"]lakes="green", river_lakes="blue"Please note that in the old syntax, using
lakes="blue"also set the fill color of river-lakes to"blue". If we preserved that behavior, there would be no Pythonic way to fill only lakes without also filling river-lakes. Therefore, I decided to aliaslakes="blue"to-Cblue+l, meaning “fill lakes only.” This introduces a breaking change.Related to #4240