Repository navigation
Conversation
- Rename "Reference" to "References" and indent the reference entries - Add the missing blank line before the dictionaries listed under Returns - Rename "Example" to "Examples" in proximal_bregman_log_plan_batch - Move "See Also" before "Examples" in solve_batch so the references label is kept - Cite [92] instead of the undefined [91] in solve_sample_batch Part of PythonOT#222.
Lbobon
force-pushed
the
doc-fix-batch-docstrings
branch
from
November 23, 2026 16:18
5a6153a to
31e14b2
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #222, starting with
ot.batch. Several of its docstrings break the API page:make html-noplotreports 6 docutils errors and 26 warnings for this module.solve_batchandproximal_bregman_log_plan_batchuse aReferenceheading. numpydoc does not recognise it, so docutils sees a raw section title inside the docstring (ERROR: Unexpected section title) and the reference entries render as plain text.Returns(tensor_batch,bregman_projection_batch,bregman_log_projection_batch,proximal_bregman_log_plan_batch) start right after "Dictionary containing:" with no blank line, which givesERROR: Unexpected indentation.solve_sample_batchlinks to[91] <references-batch-solver>, but that references section only defines[92](Xie et al., the proximal point method the sentence refers to).Fix
Reference→References, with the entries indented as in the rest of POT, andExample→Examples.Returnsdict, so they render as lists.solve_batch,See Alsomoves beforeExamples. Otherwise the See Also parser swallows the.. _references-batch-solver:label and the:ref:links to it break. With the label at the end ofExamples, it works the same way as inot.emd.[91]→[92]insolve_sample_batch.After the change
ot.batchhas no errors and 8 warnings, and nothing new appears in other modules apart from the "duplicate label … other instance in all.rst" warning that every module already gets. The 8 left are citation numbers ([2],[12],[92]) defined in several functions on the same page. That affects the whole documentation, so I left it for a separate PR.Docstring-only change: pre-commit and
pytest --doctest-modules ot/batchpass.