88```
99
1010Our tests are inside ` tests/ ` . Tests are implemented using
11- [ pytest] [ pytest ] .
11+ [ pytest] .
1212
1313` make test ` will create a tmux server on a separate ` socket_name `
1414using ` $ tmux -L test_case ` .
@@ -24,97 +24,88 @@ using `$ tmux -L test_case`.
2424To begin developing, check out the code from github:
2525
2626``` console
27-
2827$ git clone git@github.com:tmux-python/tmuxp.git
29- $ cd tmuxp
30-
3128```
3229
33- ### Advanced: Manual virtual
34-
35- Now create a virtualenv, if you don't know how to, you can create a
36- virtualenv with:
37-
3830``` console
39-
40- $ virtualenv .venv
41-
42- ```
43-
44- Then activate it to your current tty / terminal session with:
45-
46- ``` console
47-
48- $ source .venv/bin/activate
49-
50- ```
51-
52- Good! Now let's run this:
53-
54- ``` console
55-
56- $ pip install -e .
57-
58- ```
59-
60- This has ` pip ` , a python package manager install the python package
61- in the current directory. ` -e ` means ` --editable ` , which means you can
62- adjust the code and the installed software will reflect the changes.
63-
64- ``` console
65-
66- $ tmuxp
67-
31+ $ cd tmuxp
6832```
6933
70- ### Simple: Using poetry
34+ ### Bootstrap
7135
72- The easiest way to configure a dev environment is through [ poetry] [ poetry ] . This
36+ The easiest way to configure a dev environment is through [ poetry] . This
7337automatically will manage virtualenv and python dependencies for tmuxp.
74- For information on installing poetry visit the [ poetry's documentation] [ poetry's documentation ] .
38+ For information on installing poetry visit the [ poetry's documentation] .
7539
7640To begin developing, check out the code from github:
7741
7842``` console
79-
8043$ git clone git@github.com:tmux-python/tmuxp.git
81- $ cd tmuxp
44+ ```
8245
46+ ``` console
47+ $ cd tmuxp
8348```
8449
8550You can create a virtualenv, and install all of the locked
8651packages as listed in poetry.lock:
8752
8853``` console
89-
9054$ poetry install
91-
9255```
9356
9457If you ever need to update packages during your development session, the
9558following command can be used to update all packages as per poetry settings or
9659individual package (second command):
9760
9861``` console
99-
10062$ poetry update
101- $ poetry update requests
63+ ```
10264
65+ ``` console
66+ $ poetry update requests
10367```
10468
10569Then activate it to your current tty / terminal session with:
10670
10771``` console
108-
10972$ poetry shell
110-
11173```
11274
11375That is it! You are now ready to code!
11476
11577[ poetry ] : https://python-poetry.org/
11678[ poetry's documentation ] : https://python-poetry.org/docs/
11779
80+ ### Advanced: Manual virtualenv
81+
82+ Now create a virtualenv, if you don't know how to, you can create a
83+ virtualenv with:
84+
85+ ``` console
86+ $ virtualenv .venv
87+ ```
88+
89+ Then activate it to your current tty / terminal session with:
90+
91+ ``` console
92+ $ source .venv/bin/activate
93+ ```
94+
95+ Good! Now let's run this:
96+
97+ ``` console
98+ $ pip install -e .
99+ ```
100+
101+ This has ` pip ` , a python package manager install the python package
102+ in the current directory. ` -e ` means ` --editable ` , which means you can
103+ adjust the code and the installed software will reflect the changes.
104+
105+ ``` console
106+ $ tmuxp
107+ ```
108+
118109## Test Runner
119110
120111[ pytest] is used for tests.
@@ -204,11 +195,11 @@ $ make test
204195You probably didn't see anything but tests scroll by.
205196
206197If you found a problem or are trying to write a test, you can file an
207- [ issue on github] [ issue on github ] .
198+ [ issue on github] .
208199
209200(test-specific-tests)=
210201
211- ### Test runner options
202+ ### Manual invocation
212203
213204Test only a file:
214205
@@ -232,7 +223,7 @@ $ py.test tests/test_{window,pane}.py tests/test_config.py::test_export_json
232223
233224(test-builder-visually)=
234225
235- ## Visual testing
226+ ### Visual testing
236227
237228You can watch tmux testsuite build sessions visually by keeping a client
238229open in a separate terminal.
@@ -252,7 +243,7 @@ Create two terminals:
252243Terminal 1 should have flickered and built the session before your eyes.
253244tmuxp hides this building from normal users.
254245
255- ## Run tests on save
246+ ### Run tests on save (old method)
256247
257248You can re-run tests automatically on file edit.
258249
@@ -272,7 +263,7 @@ $ make watch_test
272263```
273264
274265You can also re-run a specific test file or any other [ py.test usage
275- argument] [ py.test usage argument ] :
266+ argument] :
276267
277268``` console
278269$ make watch_test test=tests/test_config.py
@@ -282,7 +273,21 @@ $ make watch_test test=tests/test_config.py
282273$ make watch_test test=' -x tests/test_config.py tests/test_util.py'
283274```
284275
285- ## Rebuild sphinx docs on save
276+ ### Testing options
277+
278+ ` RETRY_TIMEOUT_SECONDS ` can be toggled if certain workspace builder
279+ tests are being stubborn.
280+
281+ e.g. ` RETRY_TIMEOUT_SECONDS=10 py.test `
282+
283+ ``` {literalinclude} ../.github/workflows/tests.yml
284+ :language: yaml
285+
286+ ```
287+
288+ ## Documentation
289+
290+ ### Rebuild on save
286291
287292Rebuild the documentation when an ` .rst ` file is edited:
288293
@@ -312,9 +317,7 @@ $ make SPHINXBUILD='poetry run sphinx-build' watch
312317After you {ref}` install-dev-env ` , when inside the tmuxp checkout:
313318
314319``` console
315-
316320$ tmuxp load .
317-
318321```
319322
320323this will load the ` .tmuxp.yaml ` in the root of the project.
@@ -333,26 +336,16 @@ this will load the `.tmuxp.yaml` in the root of the project.
333336
334337(gh-actions)=
335338
336- ## Github Actions
339+ ## Continuous integration
340+
341+ ### Github Actions
337342
338- tmuxp uses [ github actions] [ github actions ] for continuous integration / automatic unit
343+ tmuxp uses [ github actions] for continuous integration / automatic unit
339344testing.
340345
341- To view the tmux and python versions tested see the [ .github/workflows/tests.yml] [ .github/workflows/tests.yml ] .
346+ To view the tmux and python versions tested see the [ .github/workflows/tests.yml] .
342347Builds are done on ` master ` and pull requests and can be viewed on
343- the [ gh build site] [ gh build site ] .
344-
345- ## Testing options
346-
347- ` RETRY_TIMEOUT_SECONDS ` can be toggled if certain workspace builder
348- tests are being stubborn.
349-
350- e.g. ` RETRY_TIMEOUT_SECONDS=10 py.test `
351-
352- ``` {literalinclude} ../.github/workflows/tests.yml
353- :language: yaml
354-
355- ```
348+ the [ gh build site] .
356349
357350[ py.test usage argument ] : https://pytest.org/latest/usage.html
358351[ entr ] : http://entrproject.org/
0 commit comments