Skip to content

Commit 8cba84d

Browse files
committed
DOC: contributing: explain how to tell asv which environment to use in more detail
1 parent 65db647 commit 8cba84d

File tree

1 file changed

+28
-10
lines changed

1 file changed

+28
-10
lines changed

doc/source/contributing.rst

+28-10
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,8 @@ with an imported pandas to run tests similarly.
547547
Running the performance test suite
548548
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
549549
Performance matters and it is worth considering whether your code has introduced
550-
performance regressions. *pandas* is in the process of migrating to the
551-
`asv library <https://github.com/spacetelescope/asv>`__
550+
performance regressions. *pandas* is in the process of migrating to
551+
`asv benchmarks <https://github.com/spacetelescope/asv>`__
552552
to enable easy monitoring of the performance of critical *pandas* operations.
553553
These benchmarks are all found in the ``pandas/asv_bench`` directory. asv
554554
supports both python2 and python3.
@@ -559,8 +559,9 @@ supports both python2 and python3.
559559
so many stylistic issues are likely a result of automated transformation of the
560560
code.
561561

562-
To use asv you will need either ``conda`` or ``virtualenv``. For more details
563-
please check the `asv installation webpage <http://asv.readthedocs.org/en/latest/installing.html>`_.
562+
To use all features of asv, you will need either ``conda`` or
563+
``virtualenv``. For more details please check the `asv installation
564+
webpage <http://asv.readthedocs.org/en/latest/installing.html>`_.
564565

565566
To install asv::
566567

@@ -571,6 +572,14 @@ the following if you have been developing on ``master``::
571572

572573
asv continuous master
573574

575+
This command uses ``conda`` by default for creating the benchmark
576+
environments. If you want to use virtualenv instead, write::
577+
578+
asv continuous -E virtualenv master
579+
580+
The ``-E virtualenv`` option should be added to all ``asv`` commands
581+
that run benchmarks. The default value is defined in ``asv.conf.json``.
582+
574583
If you are working on another branch, either of the following can be used::
575584

576585
asv continuous master HEAD
@@ -595,17 +604,26 @@ using ``.`` as a separator. For example::
595604

596605
will only run a ``groupby_agg_builtins1`` test defined in a ``groupby`` file.
597606

598-
It can also be useful to run tests in your current environment. You can simply do it by::
607+
You can also run the benchmark suite using the version of ``pandas``
608+
already installed in your current Python environment. This can be
609+
useful if you do not have virtualenv or conda, or are using the
610+
``setup.py develop`` approach discussed above; for the in-place build
611+
you need to set ``PYTHONPATH``, e.g.
612+
``PYTHONPATH="$PWD/.." asv [remaining arguments]``.
613+
You can run benchmarks using an existing Python
614+
environment by::
599615

600-
asv dev
616+
asv run -e -E existing
601617

602-
This command is equivalent to::
618+
or, to use a specific Python interpreter,::
603619

604-
asv run --quick --show-stderr --python=same
620+
asv run -e -E existing:python3.5
605621

606-
This will launch every test only once, display stderr from the benchmarks, and use your local ``python`` that comes from your ``$PATH``.
622+
This will display stderr from the benchmarks, and use your local
623+
``python`` that comes from your ``$PATH``.
607624

608-
Information on how to write a benchmark can be found in the `asv documentation <http://asv.readthedocs.org/en/latest/writing_benchmarks.html>`_.
625+
Information on how to write a benchmark and how to use asv can be found in the
626+
`asv documentation <http://asv.readthedocs.org/en/latest/writing_benchmarks.html>`_.
609627

610628
Running the vbench performance test suite (phasing out)
611629
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)