Use correct invocation of `pip install - e ".[dev]"` instead of [testing]
| | |
| | | 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: |
| | | |
| | |
| | | :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: |
| | | |
| | |
| | | |
| | | 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]"``. |
| | |
| | | :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``: |
| | | |