@@ -616,23 +616,23 @@ Or with one of the following constructs::
616
616
pytest pandas/tests/[test-module].py::[TestClass]
617
617
pytest pandas/tests/[test-module].py::[TestClass]::[test_method]
618
618
619
- Using `pytest-xdist <https://pypi.python.org/pypi/pytest-xdist >`_, one can
619
+ Using `pytest-xdist <https://pypi.python.org/pypi/pytest-xdist >`_, one can
620
620
speed up local testing on multicore machines. To use this feature, you will
621
621
need to install `pytest-xdist ` via::
622
622
623
623
pip install pytest-xdist
624
-
625
- Two scripts are provided to assist with this. These scripts distribute
624
+
625
+ Two scripts are provided to assist with this. These scripts distribute
626
626
testing across 4 threads.
627
627
628
628
On Unix variants, one can type::
629
629
630
630
test_fast.sh
631
-
631
+
632
632
On Windows, one can type::
633
633
634
634
test_fast.bat
635
-
635
+
636
636
This can significantly reduce the time it takes to locally run tests before
637
637
submitting a pull request.
638
638
@@ -657,12 +657,6 @@ to enable easy monitoring of the performance of critical *pandas* operations.
657
657
These benchmarks are all found in the ``pandas/asv_bench `` directory. asv
658
658
supports both python2 and python3.
659
659
660
- .. note ::
661
-
662
- The asv benchmark suite was translated from the previous framework, vbench,
663
- so many stylistic issues are likely a result of automated transformation of the
664
- code.
665
-
666
660
To use all features of asv, you will need either ``conda `` or
667
661
``virtualenv ``. For more details please check the `asv installation
668
662
webpage <https://asv.readthedocs.io/en/latest/installing.html> `_.
@@ -722,73 +716,6 @@ This will display stderr from the benchmarks, and use your local
722
716
Information on how to write a benchmark and how to use asv can be found in the
723
717
`asv documentation <https://asv.readthedocs.io/en/latest/writing_benchmarks.html >`_.
724
718
725
- .. _contributing.gbq_integration_tests :
726
-
727
- Running Google BigQuery Integration Tests
728
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
729
-
730
- You will need to create a Google BigQuery private key in JSON format in
731
- order to run Google BigQuery integration tests on your local machine and
732
- on Travis-CI. The first step is to create a `service account
733
- <https://console.developers.google.com/iam-admin/serviceaccounts/> `__.
734
-
735
- Integration tests for ``pandas.io.gbq `` are skipped in pull requests because
736
- the credentials that are required for running Google BigQuery integration
737
- tests are `encrypted <https://docs.travis-ci.com/user/encrypting-files/ >`__
738
- on Travis-CI and are only accessible from the pandas-dev/pandas repository. The
739
- credentials won't be available on forks of pandas. Here are the steps to run
740
- gbq integration tests on a forked repository:
741
-
742
- #. Go to `Travis CI <https://travis-ci.org/ >`__ and sign in with your GitHub
743
- account.
744
- #. Click on the ``+ `` icon next to the ``My Repositories `` list and enable
745
- Travis builds for your fork.
746
- #. Click on the gear icon to edit your travis build, and add two environment
747
- variables:
748
-
749
- - ``GBQ_PROJECT_ID `` with the value being the ID of your BigQuery project.
750
-
751
- - ``SERVICE_ACCOUNT_KEY `` with the value being the contents of the JSON key
752
- that you downloaded for your service account. Use single quotes around
753
- your JSON key to ensure that it is treated as a string.
754
-
755
- For both environment variables, keep the "Display value in build log" option
756
- DISABLED. These variables contain sensitive data and you do not want their
757
- contents being exposed in build logs.
758
- #. Your branch should be tested automatically once it is pushed. You can check
759
- the status by visiting your Travis branches page which exists at the
760
- following location: https://travis-ci.org/your-user-name/pandas/branches .
761
- Click on a build job for your branch. Expand the following line in the
762
- build log: ``ci/print_skipped.py /tmp/pytest.xml `` . Search for the
763
- term ``test_gbq `` and confirm that gbq integration tests are not skipped.
764
-
765
- Running the vbench performance test suite (phasing out)
766
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
767
-
768
- Historically, *pandas * used `vbench library <https://github.com/pydata/vbench >`_
769
- to enable easy monitoring of the performance of critical *pandas * operations.
770
- These benchmarks are all found in the ``pandas/vb_suite `` directory. vbench
771
- currently only works on python2.
772
-
773
- To install vbench::
774
-
775
- pip install git+https://github.com/pydata/vbench
776
-
777
- Vbench also requires ``sqlalchemy ``, ``gitpython ``, and ``psutil ``, which can all be installed
778
- using pip. If you need to run a benchmark, change your directory to the *pandas * root and run::
779
-
780
- ./test_perf.sh -b master -t HEAD
781
-
782
- This will check out the master revision and run the suite on both master and
783
- your commit. Running the full test suite can take up to one hour and use up
784
- to 3GB of RAM. Usually it is sufficient to paste a subset of the results into the Pull Request to show that the committed changes do not cause unexpected
785
- performance regressions.
786
-
787
- You can run specific benchmarks using the ``-r `` flag, which takes a regular expression.
788
-
789
- See the `performance testing wiki <https://github.com/pandas-dev/pandas/wiki/Performance-Testing >`_ for information
790
- on how to write a benchmark.
791
-
792
719
Documenting your code
793
720
---------------------
794
721
0 commit comments