← Back to Pull requests

Update quickstart guide to reflect user research #9137

Closed
nlhkabu closed this pull request without merging on May 23, 2021 10:54 UTC
View on GitHub
nlhkabu nlhkabu commented on Nov 15, 2020 12:04 UTC
Author

Updates quickstart guide to reflect most common tasks as discovered in our "buy a feature" user research.

Preview: https://pip--9137.org.readthedocs.build/en/9137/quickstart/

Diff: 136 lines (+101 / -35) across 1 files Reviewer: nlhkabu Review duration: 272089m
All Vouch review confidence checks passed
Residual risk 0.08 = Change Risk (0.46) × (1 − Review Confidence (0.84)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.46 · 136 lines diff across 1 files
0.46
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.71 · 5 substantive comment(s)
0.71
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
83%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.294
Self Review self_review
0.140
Real PR Conversation Timeline
12 items
nlhkabu nlhkabu commented on code on Nov 15, 2020 12:13 UTC
Code Review
docs/html/quickstart.rst:1
@@ -2,90 +2,126 @@
 Quickstart
 ==========
 
-First, :doc:`install pip <installing>`.
+pip is a command line tool for installing Python packages.
 
-Install a package from `PyPI`_:
+For a full tutorial on installing packages with pip, see the
+`Python Packaging User Guide`_
+
+For a more detailed exploration of pip's functionality see the pip
+:doc:`user guide <user_guide>`.
+
+Quick setup
+===========
+
+1. Check pip installation
+-------------------------
+Check if you already have pip installed by running:
+
+.. code-block:: console
+
+  pip --version
+
+See :doc:`installing pip <installing>` for more information, or to troubleshoot
+any problems.
+
+2. Check pip is up to date
+--------------------------
+
+To make sure you are running pip's latest version, run:
 
 .. tab:: Unix/macOS
 
    .. code-block:: console
 
-      $ python -m pip install SomePackage
-      [...]
-      Successfully installed SomePackage
+      python -m pip install -U pip
 
 .. tab:: Windows
 
    .. code-block:: console
 
-      C:\> py -m pip install SomePackage
-      [...]
-      Successfully installed SomePackage
+      py -m pip install -U pip
+
 
+3. Set up a virtual environment
+-------------------------------
 
-Install a package that's already been downloaded from `PyPI`_ or
-obtained from elsewhere. This is useful if the target machine does not have a
-network connection:
+Before using pip, we recommend you set up and use a virtual environment to
+isolate your project packages.
+
+See `Creating Virtual Environments`_ for more information.
+
+Common tasks
+============
+
+Install a package from `PyPI`_
+------------------------------
 
 .. tab:: Unix/macOS
 
    .. code-block:: console
 
-      $ python -m pip install SomePackage-1.0-py2.py3-none-any.whl
+      $ python -m pip install SomePackage
       [...]
       Successfully installed SomePackage
 
 .. tab:: Windows
 
    .. code-block:: console
 
-      C:\> py -m pip install SomePackage-1.0-py2.py3-none-any.whl
+      C:\> py -m pip install SomePackage
       [...]
       Successfully installed SomePackage
 
-Show what files were installed:
+Install a package from GitHub
+------------------------------
 
-.. tab:: Unix/macOS
+Pip can install packages from common version control systems (VCS), including
+GitHub.
 
-   .. code-block:: console
+For example, to install a specific commit from the Django project, run:
 
-      $ python -m pip show --files SomePackage
-      Name: SomePackage
-      Version: 1.0
-      Location: /my/env/lib/pythonx.x/site-packages
-      Files:
-      ../somepackage/__init__.py
-      [...]
+.. code-block:: console
 
-.. tab:: Windows
+  pip install git+https://github.com/django/django.git@45dfb3641aa4d9828a7c5448d11aa67c7cbd7966
 
-   .. code-block:: console
+See VCS support for more information.

@pradyunsg I'd like to link to the VCS section in the user guide. How can I do this?

nlhkabu nlhkabu commented on code on Nov 15, 2020 15:16 UTC
Code Review
docs/html/quickstart.rst:1
@@ -2,90 +2,126 @@
 Quickstart
 ==========
 
-First, :doc:`install pip <installing>`.
+pip is a command line tool for installing Python packages.
 
-Install a package from `PyPI`_:
+For a full tutorial on installing packages with pip, see the
+`Python Packaging User Guide`_
+
+For a more detailed exploration of pip's functionality see the pip
+:doc:`user guide <user_guide>`.
+
+Quick setup
+===========
+
+1. Check pip installation
+-------------------------
+Check if you already have pip installed by running:
+
+.. code-block:: console
+
+  pip --version
+
+See :doc:`installing pip <installing>` for more information, or to troubleshoot
+any problems.
+
+2. Check pip is up to date
+--------------------------
+
+To make sure you are running pip's latest version, run:
 
 .. tab:: Unix/macOS
 
    .. code-block:: console
 
-      $ python -m pip install SomePackage
-      [...]
-      Successfully installed SomePackage
+      python -m pip install -U pip
 
 .. tab:: Windows
 
    .. code-block:: console
 
-      C:\> py -m pip install SomePackage
-      [...]
-      Successfully installed SomePackage
+      py -m pip install -U pip
+
 
+3. Set up a virtual environment
+-------------------------------
 
-Install a package that's already been downloaded from `PyPI`_ or
-obtained from elsewhere. This is useful if the target machine does not have a
-network connection:
+Before using pip, we recommend you set up and use a virtual environment to
+isolate your project packages.
+
+See `Creating Virtual Environments`_ for more information.
+
+Common tasks
+============
+
+Install a package from `PyPI`_
+------------------------------
 
 .. tab:: Unix/macOS
 
    .. code-block:: console
 
-      $ python -m pip install SomePackage-1.0-py2.py3-none-any.whl
+      $ python -m pip install SomePackage
       [...]
       Successfully installed SomePackage
 
 .. tab:: Windows
 
    .. code-block:: console
 
-      C:\> py -m pip install SomePackage-1.0-py2.py3-none-any.whl
+      C:\> py -m pip install SomePackage
       [...]
       Successfully installed SomePackage
 
-Show what files were installed:
+Install a package from GitHub
+------------------------------
 
-.. tab:: Unix/macOS
+Pip can install packages from common version control systems (VCS), including
+GitHub.
 
-   .. code-block:: console
+For example, to install a specific commit from the Django project, run:
 
-      $ python -m pip show --files SomePackage
-      Name: SomePackage
-      Version: 1.0
-      Location: /my/env/lib/pythonx.x/site-packages
-      Files:
-      ../somepackage/__init__.py
-      [...]
+.. code-block:: console
 
-.. tab:: Windows
+  pip install git+https://github.com/django/django.git@45dfb3641aa4d9828a7c5448d11aa67c7cbd7966
 
-   .. code-block:: console
+See VCS support for more information.
 
-      C:\> py -m pip show --files SomePackage
-      Name: SomePackage
-      Version: 1.0
-      Location: /my/env/lib/pythonx.x/site-packages
-      Files:
-      ../somepackage/__init__.py
-      [...]
+Install a package you have already downloaded
+---------------------------------------------
 
-List what packages are outdated:
+This is useful if the target machine does not have a network connection:
 
 .. tab:: Unix/macOS
 
    .. code-block:: console
 
-      $ python -m pip list --outdated
-      SomePackage (Current: 1.0 Latest: 2.0)
+      $ python -m pip install SomePackage-1.0-py2.py3-none-any.whl
+      [...]
+      Successfully installed SomePackage
 
 .. tab:: Windows
 
    .. code-block:: console
 
-      C:\> py -m pip list --outdated
-      SomePackage (Current: 1.0 Latest: 2.0)
+      C:\> py -m pip install SomePackage-1.0-py2.py3-none-any.whl
+      [...]
+      Successfully installed SomePackage
+
+Install packages from a file
+----------------------------
 
-Upgrade a package:
+Many Python projects use a requirements.txt file to specify the list of packages
+that need to be installed for the project to run. To install the packages
+listed in the file, run:
+
+.. code-block:: console
+
+  pip install -r requirements.txt
+
+See requirements files for more information.

Again, I;d like to link the requirements section in the user guide here, but I don't know how

nlhkabu nlhkabu commented on code on Nov 15, 2020 15:16 UTC
Code Review
docs/html/quickstart.rst:1
@@ -133,4 +170,8 @@ Uninstall a package:
       Proceed (y/n)? y
       Successfully uninstalled SomePackage
 
+For a full list of pip commands, see the pip :doc:`reference guide <reference>`.

This does not seem to have worked :(

pradyunsg pradyunsg commented on code on Nov 15, 2020 15:34 UTC
Code Review
docs/html/quickstart.rst:1
@@ -133,4 +170,8 @@ Uninstall a package:
       Proceed (y/n)? y
       Successfully uninstalled SomePackage
 
+For a full list of pip commands, see the pip :doc:`reference guide <reference>`.

You'd want to use reference/index here.

nlhkabu nlhkabu commented on Nov 17, 2020 06:54 UTC
Author

@pradyunsg or @uranusjr this content is ready for review.
If you can let me know if it is _accurate_ I will fix linting and add a news entry. Thanks!

pradyunsg pradyunsg commented on code on Nov 17, 2020 13:26 UTC
Code Review
docs/html/quickstart.rst:1
@@ -2,90 +2,150 @@
 Quickstart
 ==========
 
-First, :doc:`install pip <installing>`.
+pip is a command line tool for installing Python packages.
 
-Install a package from `PyPI`_:
+For a full tutorial on installing packages with pip, see the
+`Python Packaging User Guide`_

For a full tutorial on installing packages with pip, see the
`Python Packaging User Guide`_.

pradyunsg pradyunsg commented on code on Nov 17, 2020 13:27 UTC
Code Review
docs/html/quickstart.rst:1
@@ -2,90 +2,150 @@
 Quickstart
 ==========
 
-First, :doc:`install pip <installing>`.
+pip is a command line tool for installing Python packages.
 
-Install a package from `PyPI`_:
+For a full tutorial on installing packages with pip, see the
+`Python Packaging User Guide`_
+
+For a more detailed exploration of pip's functionality see the pip

nit:

For a more detailed exploration of pip's functionality, see the pip

pradyunsg pradyunsg commented on code on Nov 17, 2020 13:28 UTC
Code Review
docs/html/quickstart.rst:1
@@ -2,90 +2,150 @@
 Quickstart
 ==========
 
-First, :doc:`install pip <installing>`.
+pip is a command line tool for installing Python packages.
 
-Install a package from `PyPI`_:
+For a full tutorial on installing packages with pip, see the
+`Python Packaging User Guide`_
+
+For a more detailed exploration of pip's functionality see the pip
+:doc:`user guide <user_guide>`.
+
+Quick setup
+===========

Setup
=====

Is the quickness implied by being a part of the Quickstart page? :)

pradyunsg pradyunsg commented on Nov 17, 2020 13:30 UTC
Reviewer

Looks great to me! A few fairly minor comments.

uranusjr uranusjr commented on Nov 18, 2020 12:19 UTC
Contributor

#9131 (merged recently) also included similar instruction on installing and upgrading pip in the Installaton page. Is this duplication intentional, or should we simply redirect users to that page instead?

Current “latest” pip documentation: https://pip.pypa.io/en/latest/installing/

pradyunsg pradyunsg commented on Nov 30, 2020 21:13 UTC
Contributor

@nlhkabu If you rebase this PR on the current master branch, that'll fix the CI here.

Is this duplication intentional, or should we simply redirect users to that page instead?

https://www.writethedocs.org/guide/writing/docs-principles/#arid

I think this duplication is A-OK.

Reviewers
Assignees
nlhkabu nlhkabu
Labels
risk: low confidence: 83.6% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 46.4% (MEDIUM) · Higher = larger blast radius
46.4%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 83.6% · Lower = rushed or shallow review
83.6%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 7.6% · Safe to merge
7.6%
Repository