-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: add small guide on how to write examples that pass doctests #20037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC: add small guide on how to write examples that pass doctests #20037
Conversation
@@ -430,6 +430,70 @@ the documentation are also built by Travis-CI. These docs are then hosted `here | |||
<http://pandas-docs.github.io/pandas-docs-travis>`__, see also | |||
the :ref:`Continuous Integration <contributing.ci>` section. | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add sub-section refs
One that comes to my mind is reading from files, like |
Codecov Report
@@ Coverage Diff @@
## master #20037 +/- ##
==========================================
- Coverage 91.71% 91.69% -0.02%
==========================================
Files 150 150
Lines 49104 49112 +8
==========================================
- Hits 45035 45033 -2
- Misses 4069 4079 +10
Continue to review full report at Codecov.
|
The question is what to do in general for those IO functions. In principle you could always create a small file to then read back in. |
In general, for read functions, we could do like:
for write functions that is a bit more difficult, as you don't directly see what you get. Maybe just showing the basic usage (method call) and then referring to user guide is enough for those? |
This was included in the merge of #19704, so closing. |
Some initial attention points for getting doctests passing (this would eventually fit in the docstring guide, putting it in contributing.rst for now, will move once the other is merged).
Anybody else thinks of typical gotcha's?
cc @datapythonista