Skip to content

DOC: sphinx warnings because of **kwds in the stats distributions docstrings. #3915

Closed

Description

@WarrenWeckesser

When building the HTML documentation, a warning of the form

/.../scipy/doc/source/generated/scipy.stats.alpha.rst:197: WARNING: Inline strong start-string without end-string.

is generated for each distribution in scipy.stats, and for rv_continuous. (That's over 80 warnings.) The problem is the class docstring includes the signature of the expect method, which is

expect(func, %(shapes)s, loc=0, scale=1, lb=None, ub=None, conditional=False, **kwds)

and ** is the markup for "strong emphasis".

The specific lines (at the time of writing this) are https://github.com/scipy/scipy/blob/master/scipy/stats/_distn_infrastructure.py#L119 and https://github.com/scipy/scipy/blob/master/scipy/stats/_distn_infrastructure.py#L1272

Activity

  1. WarrenWeckesser commented on Aug 29, 2014

    @WarrenWeckesser
    MemberAuthor

    A simple fix is to enclose the function signatures in double backticks:

    ``expect(func, %(shapes)s, loc=0, scale=1, lb=None, ub=None, conditional=False, **kwds)``
    

    That prevents the warnings, and it looks OK in the HTML output, but it adds a bit of clutter to the plain text docstring that one sees when using an interactive shell.

    If we do this, all the signatures in those docstrings should be handled like this, so we maintain a consistent style.

  2. argriffing commented on Aug 29, 2014

    @argriffing
    Contributor

    If we do this, all the signatures in those docstrings should be handled like this, so we maintain a consistent style.

    Maybe someone at euroscipy will be excited to do this at the sprints.

  3. WarrenWeckesser commented on Aug 29, 2014

    @WarrenWeckesser
    MemberAuthor

    It would take a special kind of person to be excited about cleaning up sphinx warnings. :)

    But it would be great if someone gave it a shot. If I were there, I'd buy him or her a beer.

  4. jvkersch commented on Aug 30, 2014

    @jvkersch
    Contributor

    I'm at EuroSciPy, and I really, really hate Sphinx warnings ;-) I can take a look tomorrow if nobody else has done so by then.

  5. rgommers commented on Aug 30, 2014

    @rgommers
    Member

    That would be great Joris. Will you join the sprint tomorrow?

  6. added a commit that references this issue on Aug 31, 2014
    abcac91
  7. added this to the 0.15.0 milestone on Aug 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Build issuesIssues with building from source, including different choices of architecture, compilers and OSDocumentationIssues related to the SciPy documentation. Also check https://github.com/scipy/scipy.orgdefectA clear bug or issue that prevents SciPy from being installed or used as expected

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions