Skip to content

Outputs of test_x2sys_cross on Ubuntu 26.04 x86_64 match Windows platform - #4981

Merged
seisman merged 1 commit into
mainfrom
test/x2sys_cross
Nov 16, 2026
Merged

seisman merged 1 commit into
mainfrom
test/x2sys_cross

Conversation

@seisman

@seisman seisman commented Nov 16, 2026

Copy link
Copy Markdown
Member

x2sys_cross tests started to fail suddently for Ubuntu 26.04 x86_64 (https://github.com/GenericMappingTools/pygmt/actions/runs/43835607179/job/133199745461):

=================================== FAILURES ===================================
_______________ test_x2sys_cross_region_interpolation_numpoints ________________

    @pytest.mark.usefixtures("mock_x2sys_home")
    def test_x2sys_cross_region_interpolation_numpoints():
        """
        Test that x2sys_cross's region (R), interpolation (l) and numpoints (W) arguments
        work.
        """
        with TemporaryDirectory(prefix="X2SYS", dir=Path.cwd()) as tmpdir:
            tag = Path(tmpdir).name
            x2sys_init(tag=tag, fmtfile="xyz", force=True)
            output = x2sys_cross(
                tracks=["@tut_ship.xyz"],
                tag=tag,
                coe="i",
                region=[245, 250, 20, 25],
                interpolation="a",  # Akima spline interpolation
                numpoints=5,  # Use up to 5 data points in interpolation
            )
    
            assert isinstance(output, pd.DataFrame)
    
            if platform.machine() in {"aarch64", "arm64"} or (
                platform.system() == "Linux"
                and platform.freedesktop_os_release()["PRETTY_NAME"].startswith(
                    "Ubuntu 26.04"
                )
            ):
>               assert output.shape == (3894, 12)
E               assert (3882, 12) == (3894, 12)
E                 
E                 At index 0 diff: 3882 != 3894
E                 
E                 Full diff: (-: missing in left side, +: extra in left side)
E                   (
E                 -     3894,
E                 ?       ^^
E                 +     3882,
E                 ?       ^^
E                       12,
E                   )

../pygmt/tests/test_x2sys_cross.py:264: AssertionError
----------------------------- Captured stderr call -----------------------------
x2sys_cross [WARNING]: No time column, use dummy times
----------------------------- Captured stderr call -----------------------------
x2sys_cross [WARNING]: No time column, use dummy times
----------------------------- Captured stderr call -----------------------------
x2sys_cross [WARNING]: No time column, use dummy times
________________________ test_x2sys_cross_track_values _________________________

    @pytest.mark.usefixtures("mock_x2sys_home")
    def test_x2sys_cross_track_values():
        """
        Test that x2sys_cross's track_values (Z) argument work.
        """
        with TemporaryDirectory(prefix="X2SYS", dir=Path.cwd()) as tmpdir:
            tag = Path(tmpdir).name
            x2sys_init(tag=tag, fmtfile="xyz", force=True)
            output = x2sys_cross(tracks=["@tut_ship.xyz"], tag=tag, track_values=True)
    
            assert isinstance(output, pd.DataFrame)
            if platform.machine() in {"aarch64", "arm64"} or (
                platform.system() == "Linux"
                and platform.freedesktop_os_release()["PRETTY_NAME"].startswith(
                    "Ubuntu 26.04"
                )
            ):
>               assert output.shape == (14374, 12)
E               assert (14338, 12) == (14374, 12)
E                 
E                 At index 0 diff: 14338 != 14374
E                 
E                 Full diff: (-: missing in left side, +: extra in left side)
E                   (
E                 -     14374,
E                 ?        ^^
E                 +     14338,
E                 ?        ^^
E                       12,
E                   )

@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Nov 16, 2026
@seisman seisman added this to the 0.20.0 milestone Nov 16, 2026

@weiji14 weiji14 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.

Ok, at least the results on x86-64 platforms is consistent now 😂

Previous thread for ref: #4672 (comment)

@seisman
seisman merged commit 28571ef into main Nov 16, 2026
25 checks passed
@seisman
seisman deleted the test/x2sys_cross branch November 16, 2026 09:46
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