Skip to content

Conversation

@weiji14
Copy link
Member

@weiji14 weiji14 commented Oct 8, 2025

Description of proposed changes

Skip doctests using __doctest_skip__ on _GMT_IMAGE.to_xarray and GMTBackendEntrypoint, due to changes in xarray=2025.10.1 from repr changes to the coords ordering, xref pydata/xarray#10778.

Also removed ellipsis and added the size of the DataArray and coordinates in kB.

Fixes #4143

Preview: https://pygmt-dev--4145.org.readthedocs.build/en/4145/api/generated/pygmt.GMTBackendEntrypoint.html

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 wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • 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 command is:

  • /format: automatically format and lint the code

Specifically on `_GMT_IMAGE.to_xarray` and `GMTBackendEntrypoint`, due to changes in xarray=2025.10.0 from repr changes to the coords ordering, xref pydata/xarray#10778. Also removed ellipsis and added the size of the DataArray and coordinates in kB.
@weiji14 weiji14 added this to the 0.18.0 milestone Oct 8, 2025
@weiji14 weiji14 self-assigned this Oct 8, 2025
@weiji14 weiji14 added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Oct 8, 2025
@weiji14 weiji14 changed the title Add doctest_skips for xarray<2025.10.0 Add doctest_skips for xarray<2025.10.0 and update output DataArray repr Oct 8, 2025
Copy link
Member

@seisman seisman left a comment

Choose a reason for hiding this comment

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

It should be good to merge after addressing my comments.

@weiji14 weiji14 changed the title Add doctest_skips for xarray<2025.10.0 and update output DataArray repr Add doctest_skips for xarray<2025.10.1 and update output DataArray repr Oct 8, 2025
@weiji14 weiji14 marked this pull request as ready for review October 8, 2025 23:57
@weiji14 weiji14 enabled auto-merge (squash) October 9, 2025 00:00
@weiji14 weiji14 merged commit 13fb1b2 into main Oct 9, 2025
23 of 28 checks passed
@weiji14 weiji14 deleted the xr-repr-2025.10 branch October 9, 2025 00:06
@seisman
Copy link
Member

seisman commented Oct 9, 2025

This solution is not perfect, because when running make doctest in the "Doctests" workflow, the __doctest_skip__ is not activated, so we will see failures in this workflow.

@weiji14
Copy link
Member Author

weiji14 commented Oct 9, 2025

This solution is not perfect, because when running make doctest in the "Doctests" workflow, the __doctest_skip__ is not activated, so we will see failures in this workflow.

Yes I realized that when running make doctest locally. But I thought we're not testing old versions of xarray in the .github/workflows/ci_doctests.yaml, so shouldn't be an issue?

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.

Doctest failures due to changes in xarray 2025.10

3 participants