-
Notifications
You must be signed in to change notification settings - Fork 160
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
Test against mindeps #1314
Test against mindeps #1314
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1314 +/- ##
==========================================
+ Coverage 85.83% 85.87% +0.03%
==========================================
Files 35 35
Lines 5584 5584
==========================================
+ Hits 4793 4795 +2
+ Misses 791 789 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This last doctest is a pain ( I'd rather not just skip it, but unsure if there's a good solution here. Ideally we'd just ignore the lines that are different or skip this bit only when pandas is older. We could maybe skip doc tests for minimum dependencies since I would expect more things like this to come up (especially with warnings), but they are very good for catching bugs. |
Co-authored-by: Philipp A. <[email protected]>
for more information, see https://pre-commit.ci
@@ -1350,7 +1351,7 @@ def test_concat_size_0_dim(axis, join_type, merge_strategy, shape): | |||
FutureWarning, | |||
match=r"The behavior of DataFrame concatenation with empty or all-NA entries is deprecated", | |||
) | |||
if shape[axis] == 0 | |||
if shape[axis] == 0 and Version(pd.__version__) >= Version("2.1") |
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.
if shape[axis] == 0 and Version(pd.__version__) >= Version("2.1") | |
if shape[axis] == 0 and Version(version("pandas")) >= Version("2.1") |
same as above
What’s the difference in the format? maybe we can modify it in a way that smooths over the differences, e.g. |
The name of the series and the name of the index are different. For example: >>> pd.DataFrame({"a": [1, 1, 2, 3, 4, 4, 4]})["a"].value_counts()
4 3
1 2
2 1
3 1
Name: a, dtype: int64
>>> pd.__version__
'1.4.4' >>> pd.DataFrame({"a": [1, 1, 2, 3, 4, 4, 4]})["a"].value_counts()
a
4 3
1 2
2 1
3 1
Name: count, dtype: int64
>>> pd.__version__
'2.1.2' I don't like the idea of modifying the command just to get it reproducible since it's meant to be an example for the user, and it's a weird thing to select as an example without the context. If we had a different example to show, that could be useful. We could even just remove this line. |
Sure, only if it makes sense. a trailing |
I'm converting back to draft while I get this working for scanpy. I think there will be a few changes that it'd be good to get in here too. |
OK! Thanks for the hard work figuring out the deps. I guess we should make the script a standalone package or something if you want to reuse it? |
Co-authored-by: Isaac Virshup <[email protected]>
TODO:
Won't do in this PR:
Current problems:
pd.value_counts
depending on version