Skip to content

Update pygmt.config baseline images for GMT 6.2.0rc1 - #1235

Merged
weiji14 merged 1 commit into
masterfrom
gmt-6.2.0rc1/config
Apr 23, 2021
Merged

weiji14 merged 1 commit into
masterfrom
gmt-6.2.0rc1/config

Conversation

@weiji14

@weiji14 weiji14 commented Apr 22, 2021 •

Copy link
Copy Markdown
Member

Description of proposed changes

Updates baseline images for the pygmt.config tests.

Addresses #1217

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@weiji14 weiji14 added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Apr 22, 2021
@weiji14 weiji14 added this to the 0.4.0 milestone Apr 22, 2021
@weiji14 weiji14 self-assigned this Apr 22, 2021
@github-actions

Copy link
Copy Markdown
Contributor

Summary of changed images

This is an auto-generated report of images that have changed on the DVC remote

Status Path
modified pygmt/tests/baseline/test_config.png
modified pygmt/tests/baseline/test_config_font_annot.png
modified pygmt/tests/baseline/test_config_font_one.png
modified pygmt/tests/baseline/test_config_format_time_map.png
modified pygmt/tests/baseline/test_config_map_annot_offset.png
modified pygmt/tests/baseline/test_config_map_grid_cross_size.png
modified pygmt/tests/baseline/test_config_map_grid_pen.png
modified pygmt/tests/baseline/test_config_map_tick_length.png
modified pygmt/tests/baseline/test_config_map_tick_pen.png

Image diff(s)

Details

Added images

Modified images

Path Old New
test_config.png
test_config_font_annot.png
test_config_font_one.png
test_config_format_time_map.png
test_config_map_annot_offset.png
test_config_map_grid_cross_size.png
test_config_map_grid_pen.png
test_config_map_tick_length.png
test_config_map_tick_pen.png

Report last updated at commit d70061c

@seisman

seisman commented Apr 22, 2021

Copy link
Copy Markdown
Member

test_config_font_annot.png: the annotations near the needle are wrong, right?

@weiji14

weiji14 commented Apr 22, 2021 •

Copy link
Copy Markdown
Member Author

test_config_font_annot.png: the annotations near the needle are wrong, right?

Yeah, why is it 4 instead of -4? Upstream bug?

def test_config_font_annot():
"""
Test that setting FONT_ANNOT config changes both FONT_ANNOT_PRIMARY and
FONT_ANNOT_SECONDARY.
"""
fig = Figure()
with config(FONT_ANNOT="6p,red"):
fig.basemap(region=[0, 9, 0, 9], projection="C3/3/9c", compass="jTL+w4c+d4.5")
fig.basemap(compass="jBR+w5c+d-4.5")
return fig

Same case with test_config_font_one.png

@weiji14 weiji14 mentioned this pull request Apr 22, 2021
1 of 3 tasks
@maxrjones

Copy link
Copy Markdown
Member

test_config_font_annot.png: the annotations near the needle are wrong, right?

Yeah, why is it 4 instead of -4? Upstream bug?

def test_config_font_annot():
"""
Test that setting FONT_ANNOT config changes both FONT_ANNOT_PRIMARY and
FONT_ANNOT_SECONDARY.
"""
fig = Figure()
with config(FONT_ANNOT="6p,red"):
fig.basemap(region=[0, 9, 0, 9], projection="C3/3/9c", compass="jTL+w4c+d4.5")
fig.basemap(compass="jBR+w5c+d-4.5")
return fig

Same case with test_config_font_one.png

This is a consequence of FORMAT_GEO_MAP changing from ddd:mm:ss to ddd:mm:ssF. Feel free to open a GMT issue if you think FORMAT_GEO_MAP should not change these annotations.

@weiji14

weiji14 commented Apr 22, 2021

Copy link
Copy Markdown
Member Author

This is a consequence of FORMAT_GEO_MAP changing from ddd:mm:ss to ddd:mm:ssF. Feel free to open a GMT issue if you think FORMAT_GEO_MAP should not change these annotations.

Ok, I see at https://docs.generic-mapping-tools.org/6.2.0rc1/theme-settings.html#default-settings-for-build-in-themes that FORMAT_GEO_MAP defaults to ddd:mm:ssF for the new 'modern' GMT theme. where F is the 'Encode sign using WESN suffix'.

image

@meghanrjones, could you link to the discussion on why ddd:mm:ssF is used? Just want to have an informed opinion on this.

@maxrjones

Copy link
Copy Markdown
Member

@meghanrjones, could you link to the discussion on why ddd:mm:ssF is used? Just want to have an informed opinion on this.

If there was a discussion about this, it would have happened in this PR: GenericMappingTools/gmt#3344. I do not remember any discussion after Paul's initial suggestion that maps should have the indicators on them, but I may have missed it.

It might be possible to have an auto option for FORMAT_GEO_MAP similar to the new auto selection for some other parameters, which would add WESN suffix for map annotations but not for the declination annotation. But, I haven't looked through how this would work when for example both basemap frame and compass are used so it's just an off-hand idea.

@weiji14

weiji14 commented Apr 23, 2021

Copy link
Copy Markdown
Member Author

@meghanrjones, could you link to the discussion on why ddd:mm:ssF is used? Just want to have an informed opinion on this.

If there was a discussion about this, it would have happened in this PR: GenericMappingTools/gmt#3344. I do not remember any discussion after Paul's initial suggestion that maps should have the indicators on them, but I may have missed it.

It might be possible to have an auto option for FORMAT_GEO_MAP similar to the new auto selection for some other parameters, which would add WESN suffix for map annotations but not for the declination annotation. But, I haven't looked through how this would work when for example both basemap frame and compass are used so it's just an off-hand idea.

Thanks Meghan. Combing through the ~250 comments, the only reference I can find on ddd.:mm:ssF is Paul's initial comment at GenericMappingTools/gmt#3344 (comment). I think it relates to his point on:

  1. I think maps should have W-E-S-N indicators on them

which makes sense. Looking more closely at the changed figure, I think it's fine without the minus sign, the plot is actually correct because the declination annotation says 4°30W to indicate that it is pointing to the West. Before (in GMT 6.1.1), it would just use -4°30'.

image

In this case, can I get an approval for this PR? Unless there are other concerns.

@seisman

seisman commented Apr 23, 2021

Copy link
Copy Markdown
Member

I think it's weird to add E or W suffix to declination angles. Ping @PaulWessel to confirm whether it's a bug or expected.

@seisman seisman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

After reading the magnetic declination wikipedia page, I realize that both -4°30' and 4°30'W are correct expressions for magnetic declination.

Now this PR is good to merge.

@seisman seisman added the final review call This PR requires final review and approval from a second reviewer label Apr 23, 2021

@michaelgrund michaelgrund left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me.

@weiji14
weiji14 merged commit 6f3650a into master Apr 23, 2021
@weiji14
weiji14 deleted the gmt-6.2.0rc1/config branch April 23, 2021 20:44
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label May 27, 2021

This branch was previously deployed

1 inactive deployment
Preview — d70061c1 Deployed Apr 22, 2021 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants