From 4e8f6dea3e8eb8686361451b5565dee3b2be0542 Mon Sep 17 00:00:00 2001 From: Dr-Irv Date: Mon, 27 Feb 2017 16:02:14 -0500 Subject: [PATCH 1/2] DOC: Update contributing for test_fast, fix doc Windows build --- doc/make.py | 4 ++-- doc/source/contributing.rst | 24 +++++++++++++++--------- test_fast.bat | 3 +++ 3 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 test_fast.bat diff --git a/doc/make.py b/doc/make.py index d46be2611ce3d..8a6d4e5df24f0 100755 --- a/doc/make.py +++ b/doc/make.py @@ -202,8 +202,8 @@ def html(): raise SystemExit("Building HTML failed.") try: # remove stale file - os.system('rm source/html-styling.html') - os.system('cd build; rm -f html/pandas.zip;') + os.remove('source/html-styling.html') + os.remove('build/html/pandas.zip') except: pass diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index 2f838a3ab2386..d3af6ff954e6d 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -520,15 +520,6 @@ submitting code to run the check yourself on the diff:: git diff master | flake8 --diff -Furthermore, we've written a tool to check that your commits are PEP8 great, `pip install pep8radius -`_. Look at PEP8 fixes in your branch vs master with:: - - pep8radius master --diff - -and make these changes with:: - - pep8radius master --diff --in-place - Backwards Compatibility ~~~~~~~~~~~~~~~~~~~~~~~ @@ -611,6 +602,21 @@ Or with one of the following constructs:: pytest pandas/tests/[test-module].py::[TestClass] pytest pandas/tests/[test-module].py::[TestClass]::[test_method] +Using `pytest-xdist `_, one can +speed up local testing on multicore machines. Two scripts are provided to +assist with this. These scripts distribute testing across 4 threads. + +On Unix variants, one can type:: + + test_fast.sh + +On Windows, one can type:: + + test_fast.bat + +This can significantly reduce the time it takes to locally run tests before +submitting a pull request. + For more, see the `pytest `_ documentation. .. versionadded:: 0.20.0 diff --git a/test_fast.bat b/test_fast.bat new file mode 100644 index 0000000000000..17dc54b580137 --- /dev/null +++ b/test_fast.bat @@ -0,0 +1,3 @@ +:: test on windows +set PYTHONHASHSEED=314159265 +pytest --skip-slow --skip-network -m "not single" -n 4 pandas From 4f02d36df9ef9a663b86ceb0880949d274e9c0ef Mon Sep 17 00:00:00 2001 From: Dr-Irv Date: Mon, 27 Feb 2017 16:27:20 -0500 Subject: [PATCH 2/2] add pip install for xdist --- doc/source/contributing.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index d3af6ff954e6d..83f99b4f01b26 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -603,8 +603,13 @@ Or with one of the following constructs:: pytest pandas/tests/[test-module].py::[TestClass]::[test_method] Using `pytest-xdist `_, one can -speed up local testing on multicore machines. Two scripts are provided to -assist with this. These scripts distribute testing across 4 threads. +speed up local testing on multicore machines. To use this feature, you will +need to install `pytest-xdist` via:: + + pip install pytest-xdist + +Two scripts are provided to assist with this. These scripts distribute +testing across 4 threads. On Unix variants, one can type::