question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add call outs to all references in docstrings

See original GitHub issue

#833 converts all references into the numpydoc format. The unfortunate side effect of this is that it creates a lot of warnings in the sphinx build because many of the references are not called out in the docstring. #833 silences these warnings using suppress_warnings = ['ref.footnote']. In the long run, it would be great to call out the references and remove the suppress warnings statement. That would move us one step closer to automatically and comprehensively checking docstrings for style.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
cwhansecommented, Jan 9, 2020

scipy uses both styles (footnote and citation), e.g. nonlin.py it appears that the style is up to the implementer. scipy puts citations with each function, and repeats the docstring text where the citation applies to more than one function. The scipy docs style avoids formatting numbered citation callouts as superscripts (footnote style), e.g. newton-krylov

I don’t have a strong preference for either [1] or [Perez90]. It would be nice to not see callouts as superscripts, but that’s a nice-to-have.

I’m now -1 on collecting references into a common file. That may be advantageous for documentation pages, but I see removing the references from each function is a step backwards and isn’t worth the small gain of removing repeated text from docstrings.

1reaction
souravsinghcommented, Jan 7, 2020

@wholmgren I am interested in taking a stab at the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Docstrings Tutorial : Examples & Format for Pydoc ...
See Python Docstrings. Learn about the different types of docstrings & various docstring formats like Sphinx, Numpy, and Pydoc with examples now.
Read more >
Python Docstring: Documenting And Introspecting Functions
This tutorial explains what is Python Docstring and how to use it to document Python functions with examples.
Read more >
Pycharm docstring: code references and docstring inheritance
I want to link to other methods / functions / classes from some of the docstrings, but I cannot figure out how to...
Read more >
pandas docstring guide — pandas 1.5.2 documentation
A Python docstring is a string used to document a Python module, class, function or method, so programmers can understand what it does...
Read more >
Documenting Python Code: A Complete Guide
Documenting your Python code is all centered on docstrings. ... Short and stout; here is my input and print me for my out"...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found