-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST: Fix doctest in read_stata #42670
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
Labels
Comments
take |
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 24, 2021
4 tasks
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 25, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 26, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 26, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 26, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 26, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 26, 2021
… auto formatted by accident)
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 27, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 27, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 27, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 27, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 27, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 27, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 27, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 27, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 27, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 27, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 27, 2021
bashtage
pushed a commit
that referenced
this issue
Jul 31, 2021
* doctest fix for #42670 * added read_stata docstring into the doctests Co-authored-by: KrishnaSai2020 <[email protected]>
feefladder
pushed a commit
to feefladder/pandas
that referenced
this issue
Sep 7, 2021
* doctest fix for pandas-dev#42670 * added read_stata docstring into the doctests Co-authored-by: KrishnaSai2020 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
tl;dr
Fix the next doctest error:
Detailed instructions
Python allows to have example code in the documentation, like in:
In pandas, we use this to document most elements. And there are tools, like pytest,
that can run the examples, and make sure everything is correct.
For historical reasons, we have many examples where the code fails to run, or the
actual output is different from the expected output. For example, check the next
incorrect examples:
All them will fail for different reasons. To test the docstring of an object,
the next command can be run:
Where
pandas/core/frame.py
is the file where the docstring is defined, andpandas.core.frame.DataFrame.info
is the object. A whole file can also be testedby removing the
::
and the object from the command above.In general, the errors in the examples can be fixed with things like:
df
is used, butno sample dataset
df
has been first defined)For example, a function that connects to a private webservice. In
such cases, we can add
# doctest: +SKIP
at the end of the linesthat should not run
To be able to properly fix an example for the first time, the next steps
are needed:
simplified instructions in this page,
and more detailed information in pandas official contributing page.
and make sure the examples are still broken in the
master
branch ofpandas
fix is working as expected
follow PEP-8, and fix the style if it doesn't
request. Make sure you edit the line
Closes #XXXX
with the issuenumber you are addressing, so the issue is automatically closed,
when the pull request is merged
in green. If it doesn't, check if the problem is in your changes
(sometimes things break in master for technical problems, and in
that case you just need to wait for a core developer to fix the
problem)
commit, and push to your branch, no need to open new pull requests)
The text was updated successfully, but these errors were encountered: