From 520b643252e9d211b2032fad15d6176bbac96f26 Mon Sep 17 00:00:00 2001 From: Brandt Bucher Date: Sat, 5 Aug 2023 17:22:28 -0700 Subject: [PATCH] Add a pytest example, and link to the PyCon talk --- README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dc934cf..6aa2690 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,8 @@ optimizes your code. -Installation ------------- +Getting Started +--------------- Specialist supports CPython 3.11+ on all platforms. @@ -36,6 +36,17 @@ To install, just run: $ pip install specialist ``` +If you normally use `pytest` to run your tests, then you can try using the +following command to run them instead: + +```sh +$ specialist --output report --targets '**/*.py' -m pytest # any additional pytest options here... +``` + +After your tests complete, `specialist` will create a directory named `report` +and fill it with browsable HTML visualizations for each module in the current +directory tree. + Background ---------- @@ -68,7 +79,8 @@ one. At this point, the cycle repeats itself. Specialist aims to provide insight into this process for the maintainers of CPython itself, as well as for users seeking an optimization profile for their -own code. +own code. If you're curious to learn more about specialization, check out [this +talk from PyCon US 2023](https://youtu.be/shQtrn1v7sQ). Tutorial