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

GMT_IMAGE: Remove 'nan_value' from the doctest since it depends on GMT versions #3384

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

seisman
Copy link
Member

@seisman seisman commented Aug 7, 2024

Description of proposed changes

In the "GMT Legacy Tests" workflow, we have one failure:

=================================== FAILURES ===================================
__________________ [doctest] pygmt.datatypes.image._GMT_IMAGE __________________
012 
013     GMT image data structure.
014 
015     Examples
016     --------
017     >>> import numpy as np
018     >>> from pygmt.clib import Session
019     >>> with Session() as lib:
Differences (unified diff with -expected +actual):
    @@ -9,4 +9,4 @@
     0 3 364 184
     [2, 2, 2, 2]
    -b'BRPa' 0.0 0.5
    +b'BRPa' nan 0.5
     1 0

/home/runner/work/pygmt/pygmt/pygmt/datatypes/image.py:19: DocTestFailure
----------------------------- Captured stderr call -----------------------------
Warning: sion [WARNING]: Remote dataset given to a data processing module but no registration was specified - default to gridline registration (if available)

The image.nan_value is 0.0 in GMT 6.5 and is nan in old versions. It's likely related to upstream changes in GenericMappingTools/gmt#7827, but I guess we don't care.

This PR remove header.nan_value from the doctest so it passes for GMT 6.3-6.5. I also change @earth_day_01d to @earth_day_01d_p to silent the warning.

Triggered CI runs at: https://github.com/GenericMappingTools/pygmt/actions/runs/10287846021

@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog needs review This PR has higher priority and needs review. labels Aug 7, 2024
@seisman seisman added this to the 0.13.0 milestone Aug 7, 2024
@seisman seisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Aug 8, 2024
@seisman seisman merged commit cf59045 into main Aug 8, 2024
28 of 29 checks passed
@seisman seisman deleted the test/image branch August 8, 2024 14:26
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Aug 8, 2024
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.

2 participants