Skip to content

Commit 4eccbc9

Browse files
authored
docs: clarify documentation about local environment setup (#13763)
This change makes the local environment setup documentation clearer and easier to understand ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [ ] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
1 parent 82ca0cf commit 4eccbc9

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

docs/contributing-testing.rst

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,37 +29,23 @@ of code organization.
2929
How do I run the test suite?
3030
----------------------------
3131

32-
We assume you have `docker <https://www.docker.com/products/docker>`_ installed.
32+
Install and run `docker <https://www.docker.com/products/docker>`_ .
3333

34-
In addition, you will need `riot <https://ddriot.readthedocs.io/en/latest/>`_ and `hatch <https://hatch.pypa.io/latest/>`_.
34+
This repo includes a Docker container definition that provides a prebuilt test environment.
35+
You can access it by running
3536

3637
.. code-block:: bash
3738
38-
$ pip install riot==0.20.1
39+
$ scripts/ddtest
3940
40-
Refer `hatch install <https://hatch.pypa.io/latest/install/>`_ for installation instructions
41+
Some of our test suites are managed with Riot, others with Hatch.
4142

42-
Some of our test environments are managed with Riot, others with Hatch.
43-
44-
For riot environments, you can run:
43+
You can run riot and hatch commands in the test runner container with commands like these:
4544

4645
.. code-block:: bash
4746
4847
$ scripts/ddtest riot run -p 3.10
49-
50-
This command runs the entire test suite, which is probably not what you want to do.
51-
52-
For hatch environments, you can run:
53-
54-
.. code-block:: bash
55-
56-
$ hatch run lint:style
57-
58-
If you make a change to the `hatch.toml` or library dependencies, be sure to remove environments before re-running:
59-
60-
.. code-block:: bash
61-
62-
$ hatch env remove <ENV> # or hatch env prune
48+
$ scripts/ddtest hatch run lint:style
6349
6450
6551
How do I run only the tests I care about?
@@ -188,6 +174,16 @@ environment object.
188174
``for h in `riot list --hash-only "^${VENV_NAME}$"`; do rm .riot/requirements/${h}.txt; done; scripts/compile-and-prune-test-requirements``
189175
4. Commit the resulting changes to the ``.riot`` directory, and open a pull request against the trunk branch.
190176

177+
Why isn't my hatch config change taking effect?
178+
-----------------------------------------------
179+
180+
If you make a change to the `hatch.toml` or library dependencies, be sure to remove environments before re-running:
181+
182+
.. code-block:: bash
183+
184+
$ scripts/ddtest hatch env remove <ENV> # or hatch env prune
185+
186+
191187
What do I do when my pull request has failing tests unrelated to my changes?
192188
----------------------------------------------------------------------------
193189

0 commit comments

Comments
 (0)