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

Mention breaking change regarding extra quotation marks around text strings in changelog v0.12.0 #3462

Merged
merged 3 commits into from
Sep 28, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@

### Enhancements

* **Breaking**: (Unneeded) extra quotation marks around text strings (containing whitespaces) are now considered as part of the text string ([#3132](https://github.com/GenericMappingTools/pygmt/pull/3132), [#3457](https://github.com/GenericMappingTools/pygmt/issues/3457))
Copy link
Member

@weiji14 weiji14 Sep 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to be specific that it is double quotes " " that will show up after v0.12.0?

Suggested change
* **Breaking**: (Unneeded) extra quotation marks around text strings (containing whitespaces) are now considered as part of the text string ([#3132](https://github.com/GenericMappingTools/pygmt/pull/3132), [#3457](https://github.com/GenericMappingTools/pygmt/issues/3457))
* **Breaking**: (Unneeded) extra double quotes around text strings (containing whitespaces) are now considered as part of the text string ([#3132](https://github.com/GenericMappingTools/pygmt/pull/3132), [#3457](https://github.com/GenericMappingTools/pygmt/issues/3457))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. In principle both comibinations (" ' ' " , ' " " ') are possible and working:

import pygmt 

size = 1
title = "my title"

fig = pygmt.Figure()
fig.basemap(region=[-size, size] * 2, projection="X5c/1c", frame=[f'WSne+t"this is {title}"'])
fig.shift_origin(xshift="+w+1c")
fig.basemap(region=[-size, size] * 2, projection="X5c/1c", frame=[f"WSne+t'this is {title}'"])
fig.show()

text_whitespace_quotationmarks_included

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As shown in #3457 (comment), single quotes are part of the text string since the first PyGMT version, so it's not considered to be a breaking change in v0.12.0.

Copy link
Member Author

@yvonnefroehlich yvonnefroehlich Sep 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, OK. Then adjustment of the formulation is fair and makes sense.

* pygmt.project: Add 'output_type' parameter for output in pandas/numpy/file formats ([#3110](https://github.com/GenericMappingTools/pygmt/pull/3110))
* pygmt.grdtrack: Add 'output_type' parameter for output in pandas/numpy/file formats ([#3106](https://github.com/GenericMappingTools/pygmt/pull/3106))
* pygmt.blockm*: Add 'output_type' parameter for output in pandas/numpy/file formats ([#3103](https://github.com/GenericMappingTools/pygmt/pull/3103))
Expand Down