Steve Piercy
2018-10-09 23fbcac9c35c5f74a1258a72100518fcff3b03e3
Use correct invocation of `pip install - e ".[dev]"` instead of [testing]
4 files modified
15 ■■■■ changed files
docs/quick_tutorial/debugtoolbar.rst 5 ●●●●● patch | view | raw | blame | history
docs/quick_tutorial/functional_testing.rst 4 ●●●● patch | view | raw | blame | history
docs/quick_tutorial/tutorial_approach.rst 2 ●●● patch | view | raw | blame | history
docs/quick_tutorial/unit_testing.rst 4 ●●●● patch | view | raw | blame | history
docs/quick_tutorial/debugtoolbar.rst
@@ -102,8 +102,9 @@
Extra credit
============
#.  We added ``pyramid_debugtoolbar`` to the list of ``install_requires`` dependencies in ``debugtoolbar/setup.py`` because this tutorial is for development and educational purposes only.
    In what cases would you *not* want to add ``pyramid_debugtoolbar`` to your dependencies?
#.  We added ``pyramid_debugtoolbar`` to the list of ``dev_requires`` dependencies in ``debugtoolbar/setup.py``.
    We then installed the dependencies via ``pip install -e ".[dev]"`` by virtue of the Setuptools ``extras_require`` value in the Python dictionary.
    Why did we add them there instead of in the ``requires`` list?
#.  Introduce a bug into your application. Change:
docs/quick_tutorial/functional_testing.rst
@@ -45,11 +45,11 @@
        :emphasize-lines: 16
#.  Install our project and its newly added dependency.
    Note that we use the extra specifier ``[testing]`` to install testing requirements and surround it with double quote marks.
    Note that we use the extra specifier ``[dev]`` to install testing requirements and surround it with double quote marks.
    .. code-block:: bash
        $VENV/bin/pip install -e ".[testing]"
        $VENV/bin/pip install -e ".[dev]"
#.  Let's extend ``functional_testing/tutorial/tests.py`` to include a functional test:
docs/quick_tutorial/tutorial_approach.rst
@@ -45,4 +45,4 @@
For a few steps, you won't copy an earlier step's directory, but you will still need to install your project with ``$VENV/bin/pip install -e .``.
Finally for a few steps, you might add a dependency to your project in its ``setup.py`` file, and then install both the dependency and the project with either ``$VENV/bin/pip install -e .`` or ``$VENV/bin/pip install -e ".[testing]"``.
Finally for a few steps, you might add a dependency to your project in its ``setup.py`` file, and then install both the dependency and the project with either ``$VENV/bin/pip install -e .`` or ``$VENV/bin/pip install -e ".[dev]"``.
docs/quick_tutorial/unit_testing.rst
@@ -57,11 +57,11 @@
        :emphasize-lines: 11-16, 21-23
#.  Install our project and its newly added dependency.
    Note that we use the extra specifier ``[testing]`` to install testing requirements and surround it with double quote marks.
    Note that we use the extra specifier ``[dev]`` to install testing requirements and surround it with double quote marks.
    .. code-block:: bash
        $VENV/bin/pip install -e ".[testing]"
        $VENV/bin/pip install -e ".[dev]"
#.  Now we write a simple unit test in ``unit_testing/tutorial/tests.py``: