Skip to content

CI: Doctests failing on master #42798

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

Closed
datapythonista opened this issue Jul 29, 2021 · 7 comments · Fixed by #42790
Closed

CI: Doctests failing on master #42798

datapythonista opened this issue Jul 29, 2021 · 7 comments · Fixed by #42790
Labels
CI Continuous Integration Docs Testing pandas testing functions or related to the test suite
Milestone

Comments

@datapythonista
Copy link
Member

The next doctests are failing on master, and are breaking the CI. Didn't check what caused the problem, would be good to understand (I guess we merged a PR that wasn't updated). In any case, we should update the output, so the CI is green again:

_______________ [doctest] pandas.core.construction.extract_array _______________
398     Categories (3, object): ['a', 'b', 'c']
399 
400     Other objects like lists, arrays, and DataFrames are just passed through.
401 
402     >>> extract_array([1, 2, 3])
403     [1, 2, 3]
404 
405     For an ndarray-backed Series / Index a PandasArray is returned.
406 
407     >>> extract_array(pd.Series([1, 2, 3]))
Expected:
    <PandasArray>
    [1, 2, 3]
    Length: 3, dtype: int64
Got:
    array([1, 2, 3])

/home/runner/work/pandas/pandas/pandas/core/construction.py:407: DocTestFailure
_______________ [doctest] pandas.core.indexing.IndexingMixin.loc _______________
356         Alignable boolean Series:
357 
358         >>> df.loc[pd.Series([False, True, False],
359         ...        index=['viper', 'sidewinder', 'cobra'])]
360                     max_speed  shield
361         sidewinder          7       8
362 
363         Index (same behavior as ``df.reindex``)
364 
365         >>> df.loc[pd.Index(["cobra", "viper"], name="foo")]
Differences (unified diff with -expected +actual):
    @@ -1,4 +1,3 @@
            max_speed  shield
    -foo
     cobra          1       2
     viper          4       5

/home/runner/work/pandas/pandas/pandas/core/indexing.py:365: DocTestFailure
__________________ [doctest] pandas.core.indexing._LocIndexer __________________
1043 Alignable boolean Series:
1044 
1045 >>> df.loc[pd.Series([False, True, False],
1046 ...        index=['viper', 'sidewinder', 'cobra'])]
1047             max_speed  shield
1048 sidewinder          7       8
1049 
1050 Index (same behavior as ``df.reindex``)
1051 
1052 >>> df.loc[pd.Index(["cobra", "viper"], name="foo")]
Differences (unified diff with -expected +actual):
    @@ -1,4 +1,3 @@
            max_speed  shield
    -foo
     cobra          1       2
     viper          4       5

/home/runner/work/pandas/pandas/pandas/core/indexing.py:1052: DocTestFailure

The next command should report the above errors, and should return clean after the fixes: ./ci/code_checks.sh doctests

@datapythonista datapythonista added Testing pandas testing functions or related to the test suite Docs CI Continuous Integration good first issue labels Jul 29, 2021
@hrishikeshnikam2000
Copy link

take

@hrishikeshnikam2000
Copy link

okay so this issue is actually because a PR #42705 had problems right? So should I make the changes or wait for the PR to be edited?

@datapythonista
Copy link
Member Author

Not exactly. Those doctests are broken in master, which means that any PR that we open now, even one with an empty commit, will fail, and we won't be able to merge it. So, the PR for this issue is the first one that should be merged, before we can merge anything else.

@jreback
Copy link
Contributor

jreback commented Jul 29, 2021

@datapythonista

this already has an issue and a PR to fix

@datapythonista
Copy link
Member Author

Thanks for the heads up. There is no issue, I see the PR now, didn't see it.

@hrishikeshnikam2000 seems like there is a PR for this already.

@hrishikeshnikam2000
Copy link

Not exactly. Those doctests are broken in master, which means that any PR that we open now, even one with an empty commit, will fail, and we won't be able to merge it. So, the PR for this issue is the first one that should be merged, before we can merge anything else.

Okay I, will make the changes. could you please let me know in which file are we supposed to make the changes?

@datapythonista

this already has an issue and a PR to fix

So should I look into any other issue.

I'm sorry its my first Issue in this community

@datapythonista datapythonista mentioned this issue Jul 29, 2021
3 tasks
@hrishikeshnikam2000
Copy link

hrishikeshnikam2000 commented Jul 29, 2021

Thanks for the heads up. There is no issue, I see the PR now, didn't see it.

@hrishikeshnikam2000 seems like there is a PR for this already.

okay got it

@lithomas1 lithomas1 added this to the 1.4 milestone Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Docs Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants