Skip to content

Add show_backends and print show_versions as markdown - #11700

Merged
headtr1ck merged 7 commits into
pydata:mainfrom
headtr1ck:show-backends
Oct 22, 2026
Merged

headtr1ck merged 7 commits into
pydata:mainfrom
headtr1ck:show-backends

Conversation

@headtr1ck

@headtr1ck headtr1ck commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Adds xr.show_backends() and gives xr.show_versions() a formatted notebook display and a markdown option for GitHub issues. Supersedes #9821, which added show_backends as an alias of list_engines.

  • show_backends prints the available backends, including third-party ones, in the order they are tried when no engine is given, with description, url and the providing package.
  • Both print plain text in terminals, display formatted markdown in Jupyter, and print markdown wrapped in <details> with markdown=True.
  • show_versions reads versions from the package metadata instead of importing every package, and drops rows of missing packages in favour of a single "Not installed" line.

Checklist

  • Closes ENH: list_engines function #6577
  • Tests added
  • User visible changes (including notable bug fixes) are documented in whats-new.rst
  • New functions/methods are listed in api.rst

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.
      Tools: Claude Code

[This is Claude Code on behalf of Michael Niklas]

🤖 Generated with Claude Code

show_backends prints the available IO backends, including those of
other packages, with their description, url and providing package, in
the order they are tried when no engine is given.

show_versions now prints markdown tables wrapped in a <details> block,
so the output can be pasted as is into GitHub issues, and displays
formatted tables in Jupyter notebooks. Versions are read from the
package metadata instead of importing the packages.

Co-authored-by: Nick Hodgskin <VeckoTheGecko@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added topic-backends Automation Github bots, testing workflows, release automation io labels Oct 9, 2026
headtr1ck and others added 2 commits October 9, 2026 14:45
Terminals get the simple text output again, notebooks still display the
formatted markdown and markdown=True prints it for GitHub issues. This
also restores the bug report template, as old xarray versions print
plain text.

Co-authored-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The markdown tables rendered right aligned and squeezed together in
Jupyter. Use titled, left aligned HTML tables next to each other instead.

Co-authored-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@headtr1ck

Copy link
Copy Markdown
Collaborator Author

When using in Jupyter notebooks (dark more for me):
xr.show_versions()
Screenshot From 2026-10-09 16-25-27
xr.show_backends
Screenshot From 2026-10-09 16-25-37

In cmd you will get the previous simple text output. Additionally you can use markdown=True now.

headtr1ck and others added 2 commits October 9, 2026 16:31
Copying the displayed show_versions or show_backends output in a
notebook gives the markdown to paste into a GitHub issue. show_backends
is displayed as HTML too, and the display includes the plain text for
frontends without HTML support like jupyter console.

Co-authored-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@headtr1ck

Copy link
Copy Markdown
Collaborator Author

ok, this got fancy enough. Now when you copy the output of show_versions it will replace the html with markdown so you can paste it in the issue template. (Hopefully that will not confuse people trying to paste it somewhere else).
I leave it here.

@headtr1ck headtr1ck added the plan to merge Final call for comments label Oct 16, 2026
@headtr1ck
headtr1ck enabled auto-merge (squash) October 22, 2026 11:42
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	xarray/util/print_versions.py
@headtr1ck
headtr1ck merged commit 030b276 into pydata:main Oct 22, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Automation Github bots, testing workflows, release automation io plan to merge Final call for comments topic-backends

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: list_engines function

1 participant