Skip to content

TST: any_* fixtures are confusingly named #38017

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
jreback opened this issue Nov 23, 2020 · 12 comments · Fixed by #43047
Closed

TST: any_* fixtures are confusingly named #38017

jreback opened this issue Nov 23, 2020 · 12 comments · Fixed by #43047
Assignees
Labels
ExtensionArray Extending pandas with custom dtypes or arrays. good first issue Testing pandas testing functions or related to the test suite
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Nov 23, 2020

the naming on the any_* fixtures in pandas/conftest.py is pretty confusing

  • any_int_dtype (numpy only)
  • any_int_nullable_dtype (EA only)
  • any_numeric_dtype both numpy & EA
  • any_real_dtype both numpy int & float
  • sint_dtype signed numpy ints

for example

so we need dtypes that are numpy_only and EA only and numpy + EA both for ints & floats

would propose something like

any_int_numpy_dtype
any_int_ea_dtype
any_int_dtype -> both numpy + ea

same for float

then

any_numeric_nump_dtype
any_numeric_ea_dtype

for float + int

which means we rename
sint_dtype -> any_signed_int_numpy_dtype

I think this would require a PR to organize, a PR to create new names & fix everything.

@jreback jreback added Testing pandas testing functions or related to the test suite Dtype Conversions Unexpected or buggy dtype conversions ExtensionArray Extending pandas with custom dtypes or arrays. labels Nov 23, 2020
@jreback jreback added this to the 1.2 milestone Nov 23, 2020
@jreback
Copy link
Contributor Author

jreback commented Nov 23, 2020

cc @jbrockmendel

@jbrockmendel
Copy link
Member

makes sense

@jorisvandenbossche jorisvandenbossche removed this from the 1.2 milestone Nov 23, 2020
@jorisvandenbossche
Copy link
Member

Proposed naming seems to make sense

(note I removed the 1.2 milestone, since I don't think this is in any way important for the release? So we can use the milestone to track release critical issues)

@jreback jreback added this to the Contributions Welcome milestone Nov 23, 2020
@rkc007
Copy link
Contributor

rkc007 commented Nov 23, 2020

@jreback I would love to work on this issue. If you agree then I will start working on it.

@Mikhaylov-yv
Copy link
Contributor

take

@Mikhaylov-yv
Copy link
Contributor

I apologize, I cannot deal with this problem now.

@Anupam-USP
Copy link
Contributor

Hey @jreback I want to take this issue, but being it my very first contribution, how to check the what datatype does the variable takes, like is it numpy or ea or both. Sorry for this silly question

@jbrockmendel
Copy link
Member

@Anupam-USP look at the params in the existing fixture and it should be clear which are numpy dtypes and which are EA dtypes

@Anupam-USP
Copy link
Contributor

I think this was the very first dtype mentioned but in the pytest function it is clearly written ALL_INT_DTYPES. Is it correct or am I referring to wrong params?

@Anupam-USP
Copy link
Contributor

Hey, I am still looking for response on this, not stuck on this but wanted to complete this issue!

@jbrockmendel
Copy link
Member

Can you rephrase the question? I don't understand what you're looking for.

@mroeschke mroeschke removed the Dtype Conversions Unexpected or buggy dtype conversions label Aug 14, 2021
@pratyushsharan
Copy link
Contributor

@jreback @jbrockmendel Since this issue was most probably lying dormant, I took some liberty and made some changes. Can you review the PR?

@jreback jreback modified the milestones: Contributions Welcome, 1.4 Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ExtensionArray Extending pandas with custom dtypes or arrays. good first issue Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants