Skip to content

[ArrayManager] TST: include subset of ArrayManager tests in all CI builds #40496

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

Merged
merged 13 commits into from
Mar 25, 2021

Conversation

jorisvandenbossche
Copy link
Member

xref #39146

@jorisvandenbossche jorisvandenbossche added Internals Related to non-user accessible pandas implementation Testing pandas testing functions or related to the test suite labels Mar 18, 2021
@jorisvandenbossche
Copy link
Member Author

@jreback @jbrockmendel as discussed, I am trying here the idea to run a specific subet of tests most relevant for the ArrayManager on each of the builds (right now testing with /frame/ tests).

For that, I added an "arraymanager" mark, and then doing a second pytest run with this mark activated.

(there are still some actual failures discovered by this to look at / solve)

@@ -926,7 +926,9 @@ def test_setitem_duplicate_columns_not_inplace(self):
tm.assert_frame_equal(df_view, df_copy)
tm.assert_frame_equal(df, expected)

@pytest.mark.parametrize("value", [1, np.array([[1], [1]]), [[1], [1]]])
@pytest.mark.parametrize(
"value", [1, np.array([[1], [1]], dtype="int64"), [[1], [1]]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

this is causing me problems in #35417 and i thinking making this change would fix that, but would feel like cheating

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just adding a fixed dtype, doesn't change anything else. The default dtype of numpy is platform dependent, while in pandas it's always int64 (as you know ;))

@@ -905,7 +905,7 @@ def test_unstack_nan_index3(self, using_array_manager):
if using_array_manager:
# INFO(ArrayManager) with ArrayManager preserve dtype where possible
cols = right.columns[[1, 2, 3, 5]]
right[cols] = right[cols].astype("int64")
right[cols] = right[cols].astype(df["C"].dtype)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i take it this is a 32bit thing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it was to fix the windows builds

@jbrockmendel
Copy link
Member

is the test_median failure a false-positive?

@jorisvandenbossche
Copy link
Member Author

No, that was an actual failure (forgot a colon in the filterwarnings signature)

@jorisvandenbossche
Copy link
Member Author

This is all green now.

For now, it only adds the /frame/ tests, we can later add the mark to more tests if we want. With only the frame tests, this currently adds eg 135s in the "actions-38.yaml, not slow and not network and not clipboard" build (so 2min to an overall of 42min), which I think is fine.

@jbrockmendel
Copy link
Member

so 2min to an overall of 42min), which I think is fine

Agreed. Do you expect to keep adding to this though?

@jorisvandenbossche
Copy link
Member Author

Do you expect to keep adding to this though?

Some I suppose, but I think we can evaluate that one at a time when actually adding it whether it adds too much time or not.
(eg the full pandas/tests/indexing takes less than a minute)

@jreback jreback added this to the 1.3 milestone Mar 24, 2021
@jreback
Copy link
Contributor

jreback commented Mar 24, 2021

looks good, can you rebase once more just to make sure (merged a bunch of things)

@jorisvandenbossche
Copy link
Member Author

Rebased, and all green.

@jorisvandenbossche jorisvandenbossche merged commit acacff3 into pandas-dev:master Mar 25, 2021
@jorisvandenbossche jorisvandenbossche deleted the am-tests-mark branch March 25, 2021 08:28
@jbrockmendel
Copy link
Member

@jorisvandenbossche is this the source of the codecov CI failure? looks like it wasnt green when merged, but the codecov failure may have predated this.

@jorisvandenbossche
Copy link
Member Author

looks like it wasnt green when merged, but the codecov failure may have predated this.

Ah, yes, sorry, I generally ignore codecov failures since they have been so flaky in the past (but maybe that's better now), but I missed that it wasn't the "patch" coverage that was failing, but the "project" one.

I suppose just removing the coverage from the ArrayManager pytest invocation should fix it. Will do a PR.

@jorisvandenbossche
Copy link
Member Author

#40711

vladu pushed a commit to vladu/pandas that referenced this pull request Apr 5, 2021
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internals Related to non-user accessible pandas implementation Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants