Skip to content

[Question] Why is test_fast.sh configured to work with only 4 cores ? #48535

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
1 task done
adrienpacifico opened this issue Sep 13, 2022 · 5 comments · Fixed by #48958
Closed
1 task done

[Question] Why is test_fast.sh configured to work with only 4 cores ? #48535

adrienpacifico opened this issue Sep 13, 2022 · 5 comments · Fixed by #48958
Labels
Clean Testing pandas testing functions or related to the test suite

Comments

@adrienpacifico
Copy link
Contributor

  • I have checked that the answer to this question is not present in any other issue, merge request comments, or the documentation.

test_fast.sh is the recommended way to run the test suite in an efficient manner.
However, it is configure to run only on 4 cores? Why?

Many modern computer has more than 4 cores. I would suggest to replace -n 4 to -n0 on the following test_fast.sh line

pytest pandas --skip-slow --skip-network --skip-db -m "not single_cpu" -n 4 -r sxX "$@"

@mroeschke was the last to commit on that file (https://github.com/pandas-dev/pandas/blame/main/test_fast.sh) (it case it changes something for triage).

@mroeschke
Copy link
Member

Thanks for the report. IMO since these scripts are so short, I would recommend removing them and just documenting the command with the note on how -n can be adjusted to the number of cores on the user's machine.

@mroeschke mroeschke added the Docs label Sep 13, 2022
@adrienpacifico
Copy link
Contributor Author

Thank you!
I see your point.

Just to report my experience. When I tried to run the tests for the first time, I ran the test_fast.sh file before reading the documentation. If I had not find that file, I would probably have ran pytest without these interesting options.

I think the -n0 option is improving most user situation without changing much their current workflow?
However, that does not seem very important!

@mroeschke
Copy link
Member

I think the -n0 option is improving most user situation without changing much their current workflow?

I suppose so. I have just found local development to be just a broad topic that maintaining the documentation on guiding users on how to prepare their environment for contribution easier than maintaining several scripts & misc tools that are "opinionated" since a user setups can be widely varied.

@rhshadrach
Copy link
Member

+1 for removal provided we're documenting the command in the contributing guide. I think it would be good to briefly describe what the options do (or at least link to pytest's documentation); I personally am not a fan of the -r sxX bit.

@WillAyd
Copy link
Member

WillAyd commented Sep 14, 2022

+1 to remove this script as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants