You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given this is probably widely used, skipping doctest blindly is undesirable. Instead one could utilize .. doctest-requires:: directive to conditionally skip examples if the required backend is not installed. Even if this backend is not installed in the CI (which I think it might for alldeps job anyway), one could still run it locally if desired.
Hi. I noticed this issue is still open.
I willing to address the problem with the .. doctest-skip-all and i have already removed it and applied ..doctest-requires:: for pandas and polars especially to the @blocks
Other couple of solutions that i implement:
Keeping the original code blocks separated rather than merging them into 1 block (Sphinx naturally maintains the state across the blocks).
Added a .. doctest-skip:: specifically for the Excel example ( pandas.read_excel ) to prevent CI failures since the illustrative myexceltable.xlsx (file isn't existed yet on the repository.
But this approach had a two trade off:
Untested Excel Snippet: By using .. doctest-skip:: for the read_excel, specifically snippet is now a gap in the CI.
Pandas string/nullable representations (like , string8, str1) might cause the doctest to fail if the docs text is slightly outdated compared to the CI environment.
Activity
RadeshL commentedon May 17, 2026
hey I would love to contribute to this issue, can I be assigned with it?
My proposed solution:
arsenelupin14 commentedon May 23, 2026
Hi. I noticed this issue is still open.
I willing to address the problem with the .. doctest-skip-all and i have already removed it and applied ..doctest-requires:: for pandas and polars especially to the @blocks
Other couple of solutions that i implement:
But this approach had a two trade off:
TST: Enable doctest for dataframes.rst (astropy#19716)
Merge pull request #19804 from arsenelupin14/fix-doctest-19716