Skip to content

Commit e2bbf72

Browse files
authored
Doc / typos fixes (#569)
* docs: Fix grammatical error in about.md ('ran' to 'run') * docs: Fix repeated word 'and' in developing.md * docs: Remove redundant 'doctest.' in pytest-plugin/index.md * docs: Fix grammatical error in pytest-plugin/index.md ('These are fixtures are' -> 'These fixtures are') * docs: Complete session identifier example in about.md * docs: Improve punctuation in make commands documentation * docs: Improve clarity of test stability description in pytest-plugin/index.md * docs: Fix incorrect verb usage ('custom' -> 'customize') in pytest-plugin/index.md * docs: Fix incorrect apostrophe usage in plural 'IDs' * docs: Fix incorrect apostrophe usage in plural 'APIs' * docs: Fix inconsistent pluralization in list of tmux objects * docs: Make entr(1) references consistent in formatting * docs: Fix inconsistent capitalization of tmux object names * docs: Remove extra space before parenthesis * docs: Make command formatting consistent in developing.md * docs: Remove unnecessary explanation of $ symbol * docs: Make helper command formatting consistent * docs: Make watch_test command formatting consistent * docs: Make documentation build commands formatting consistent * docs: Standardize key combination format (Ctrl-a -> Ctrl+a) * docs: Replace # symbol with 'number' for clarity * docs: Make start_docs and start commands formatting consistent * docs: Make version number formatting consistent (0.10 -> v0.10) * docs: Remove extra blank lines in tmux session creation command block * docs: Fix grammar in sessions/windows lookup description * docs: Add missing ptpython link definition * docs: Make method reference format consistent in pytest plugin docs * docs: Add missing uv link definition * docs: Make code block formatting consistent in version update example * docs: Make code block formatting consistent in CHANGES example * docs: Make server fixture reference consistent * docs: Make helper commands formatting consistent with console code blocks * docs: Make tmux(1) reference formatting consistent * docs: Make entr(1) references consistent * docs: Make make(1) reference formatting consistent
1 parent 9097ace commit e2bbf72

File tree

4 files changed

+90
-43
lines changed

4 files changed

+90
-43
lines changed

docs/about.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
libtmux is a [typed](https://docs.python.org/3/library/typing.html) [abstraction layer] for tmux.
1818

1919
It builds upon the concept of targets `-t`, to direct commands against
20-
individual session, windows and panes and `FORMATS`, template variables
20+
individual sessions, windows and panes and `FORMATS`, template variables
2121
exposed by tmux to describe their properties. Think of `-t` analogously
2222
to [scope].
2323

@@ -32,18 +32,18 @@ relations of {class}`Server`, {class}`Session`, {class}`Window` and
3232
| {class}`Window` | {class}`Pane` | {class}`Session` |
3333
| {class}`Pane` | None | {class}`Window` |
3434

35-
Internally, tmux allows multiple servers to be ran on a system. Each one
35+
Internally, tmux allows multiple servers to be run on a system. Each one
3636
uses a socket. The server-client architecture is executed so cleanly,
3737
many users don't think about it. tmux automatically connects to a default
3838
socket name and location for you if none (`-L`, `-S`) is specified.
3939
A server will be created automatically upon starting if none exists.
4040

41-
A server can have multiple sessions. `Ctrl-a s` can be used to switch
41+
A server can have multiple sessions. `Ctrl+a s` can be used to switch
4242
between sessions running on the server.
4343

44-
Sessions, Windows and Panes all have their own unique identifier for
44+
Sessions, windows and panes all have their own unique identifier for
4545
internal purposes. {class}`common.TmuxMappingObject` will make use of the
46-
unique identifiers (`session_id`, `window_id`, `pane_id` ) to look
46+
unique identifiers (`session_id`, `window_id`, `pane_id`) to look
4747
up the data stored in the {class}`Server` object.
4848

4949
| Object | Prefix | Example |
@@ -56,7 +56,7 @@ up the data stored in the {class}`Server` object.
5656
## Similarities to tmux and Pythonics
5757

5858
libtmux was built in the spirit of understanding how tmux operates
59-
and how python objects and tools can abstract the API's in a pleasant way.
59+
and how python objects and tools can abstract the APIs in a pleasant way.
6060

6161
libtmux uses `FORMATTERS` in tmux to give identity attributes to
6262
{class}`Session`, {class}`Window` and {class}`Pane` objects. See
@@ -66,13 +66,13 @@ libtmux uses `FORMATTERS` in tmux to give identity attributes to
6666

6767
How is libtmux able to keep references to panes, windows and sessions?
6868

69-
> Tmux has unique ID's for sessions, windows and panes.
69+
> Tmux has unique IDs for sessions, windows and panes.
7070
>
7171
> panes use `%`, such as `%1234`
7272
>
7373
> windows use `@`, such as `@2345`
7474
>
75-
> sessions use `$`, for money, such as `$`
75+
> sessions use `$`, such as `$13`
7676
>
7777
> How is libtmux able to handle windows with no names?
7878
@@ -82,7 +82,7 @@ How is libtmux able to keep references to panes, windows and sessions?
8282
8383
> Pane index refers to the order of a pane on the screen.
8484
>
85-
> Window index refers to the # of the window in the session.
85+
> Window index refers to the number of the window in the session.
8686
>
8787
> To assert pane, window and session data, libtmux will use
8888
> {meth}`Server.sessions()`, {meth}`Session.windows()`,

docs/developing.md

+73-25
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Development
22

3-
Install and [git] and [uv]
3+
Install [git] and [uv]
44

55
Clone:
66

@@ -20,15 +20,29 @@ $ uv sync --all-extras --dev
2020

2121
[installation documentation]: https://docs.astral.sh/uv/getting-started/installation/
2222
[git]: https://git-scm.com/
23+
[uv]: https://github.com/astral-sh/uv
2324

2425
Makefile commands prefixed with `watch_` will watch files and rerun.
2526

2627
## Tests
2728

28-
`uv run py.test`
29+
```console
30+
$ uv run py.test
31+
```
2932

30-
Helpers: `make test`
31-
Rerun tests on file change: `make watch_test` (requires [entr(1)])
33+
### Helpers
34+
35+
```console
36+
$ make test
37+
```
38+
39+
Rerun tests on file change:
40+
41+
```console
42+
$ make watch_test
43+
```
44+
45+
(requires [entr(1)])
3246

3347
### Pytest plugin
3448

@@ -44,19 +58,50 @@ Default preview server: http://localhost:8023
4458

4559
[sphinx-autobuild] will automatically build the docs, watch for file changes and launch a server.
4660

47-
From home directory: `make start_docs` From inside `docs/`: `make start`
61+
From home directory:
62+
```console
63+
$ make start_docs
64+
```
65+
66+
From inside `docs/`:
67+
```console
68+
$ make start
69+
```
4870

4971
[sphinx-autobuild]: https://github.com/executablebooks/sphinx-autobuild
5072

5173
### Manual documentation (the hard way)
5274

53-
`cd docs/` and `make html` to build. `make serve` to start http server.
75+
```console
76+
$ cd docs/
77+
$ make html
78+
```
79+
80+
to build.
81+
82+
```console
83+
$ make serve
84+
```
85+
86+
to start http server.
5487

55-
Helpers: `make build_docs`, `make serve_docs`
88+
Helpers:
89+
```console
90+
$ make build_docs
91+
$ make serve_docs
92+
```
5693

57-
Rebuild docs on file change: `make watch_docs` (requires [entr(1)])
94+
Rebuild docs on file change:
95+
```console
96+
$ make watch_docs
97+
```
98+
(requires [entr(1)])
5899

59-
Rebuild docs and run server via one terminal: `make dev_docs` (requires above, and a `make(1)` with
100+
Rebuild docs and run server via one terminal:
101+
```console
102+
$ make dev_docs
103+
```
104+
(requires above, and {command}`make(1)` with
60105
`-J` support, e.g. GNU Make)
61106

62107
## Linting
@@ -95,7 +140,7 @@ $ make ruff
95140
$ make watch_ruff
96141
```
97142
98-
requires [`entr(1)`].
143+
requires [entr(1)].
99144
100145
````
101146

@@ -177,7 +222,7 @@ $ make mypy
177222
$ make watch_mypy
178223
```
179224
180-
requires [`entr(1)`].
225+
requires [entr(1)].
181226
````
182227

183228
## Releasing
@@ -197,15 +242,17 @@ Let's assume we pick 0.9.1
197242
`CHANGES`: Assure any PRs merged since last release are mentioned. Give a
198243
thank you to the contributor. Set the header with the new version and the date.
199244
Leave the "current" header and _Insert changes/features/fixes for next release here_ at
200-
the top::
245+
the top:
201246

202-
current
203-
-------
204-
- *Insert changes/features/fixes for next release here*
247+
```
248+
current
249+
-------
250+
- *Insert changes/features/fixes for next release here*
205251
206-
libtmux 0.9.1 (2020-10-12)
207-
--------------------------
208-
- :issue:`1`: Fix bug
252+
libtmux 0.9.1 (2020-10-12)
253+
--------------------------
254+
- :issue:`1`: Fix bug
255+
```
209256

210257
`libtmux/__init__.py` and `__about__.py` - Set version
211258

@@ -225,20 +272,21 @@ to PyPI.
225272
This isn't used yet since package maintainers may want setup.py in the source.
226273
See https://github.com/tmux-python/tmuxp/issues/625.
227274

228-
As of 0.10, [uv] handles virtualenv creation, package requirements, versioning,
275+
As of v0.10, [uv] handles virtualenv creation, package requirements, versioning,
229276
building, and publishing. Therefore there is no setup.py or requirements files.
230277

231-
Update `__version__` in `__about__.py` and `pyproject.toml`::
278+
Update `__version__` in `__about__.py` and `pyproject.toml`:
232279

233-
git commit -m 'build(libtmux): Tag v0.1.1'
234-
git tag v0.1.1
235-
git push
236-
git push --tags
280+
```console
281+
git commit -m 'build(libtmux): Tag v0.1.1'
282+
git tag v0.1.1
283+
git push
284+
git push --tags
285+
```
237286

238287
[twine]: https://twine.readthedocs.io/
239288
[uv]: https://github.com/astral-sh/uv
240289
[entr(1)]: http://eradman.com/entrproject/
241-
[`entr(1)`]: http://eradman.com/entrproject/
242290
[ruff format]: https://docs.astral.sh/ruff/formatter/
243291
[ruff]: https://ruff.rs
244292
[mypy]: http://mypy-lang.org/

docs/pytest-plugin/index.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,22 @@ The pytest plugin will be automatically detected via pytest, and the fixtures wi
3333
View libtmux's own [tests/](https://github.com/tmux-python/libtmux/tree/master/tests) as well as
3434
tmuxp's [tests/](https://github.com/tmux-python/tmuxp/tree/master/tests).
3535

36-
libtmux's tests `autouse` the {ref}`recommended-fixtures` above to ensure stable, assertions and
36+
libtmux's tests `autouse` the {ref}`recommended-fixtures` above to ensure stable test execution, assertions and
3737
object lookups in the test grid.
3838

3939
## pytest-tmux
4040

4141
`pytest-tmux` works through providing {ref}`pytest fixtures <pytest:fixtures-api>` - so read up on
4242
those!
4343

44-
The plugin's fixtures guarantee a fresh, headless `tmux(1)` server, session, window, or pane is
44+
The plugin's fixtures guarantee a fresh, headless {command}`tmux(1)` server, session, window, or pane is
4545
passed into your test.
4646

4747
(recommended-fixtures)=
4848

4949
## Recommended fixtures
5050

51-
These are fixtures are automatically used when the plugin is enabled and `pytest` is run.
51+
These fixtures are automatically used when the plugin is enabled and `pytest` is run.
5252

5353
- Creating temporary, test directories for:
5454
- `/home/` ({func}`home_path`)
@@ -67,14 +67,14 @@ options:
6767
- Pass a `config_file` into {class}`~libtmux.Server`
6868
- Set the `HOME` directory to a local or temporary pytest path with a configuration file
6969

70-
You could also read the code and override {func}`server fixtures <libtmux.pytest_plugin.server>`'s in your own doctest. doctest.
70+
You could also read the code and override {func}`server fixture <libtmux.pytest_plugin.server>` in your own doctest.
7171

7272
(custom_session_params)=
7373

7474
### Custom session parameters
7575

76-
You can override `session_params` to custom the `session` fixture. The
77-
dictionary will directly pass into :meth:`Server.new_session` keyword arguments.
76+
You can override `session_params` to customize the `session` fixture. The
77+
dictionary will directly pass into {meth}`Server.new_session` keyword arguments.
7878

7979
```python
8080
import pytest

docs/quickstart.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,14 @@ via trunk (can break easily):
5050
```
5151

5252
[pip]: https://pip.pypa.io/en/stable/
53+
[ptpython]: https://github.com/prompt-toolkit/ptpython
5354

5455
## Start a tmux session
5556

5657
Now, let's open a tmux session.
5758

5859
```console
59-
6060
$ tmux new-session -n bar -s foo
61-
6261
```
6362

6463
This tutorial will be using the session and window name in the example.
@@ -177,7 +176,7 @@ Session($1 ...)
177176

178177
However, this isn't guaranteed, libtmux works against current tmux information, the
179178
session's name could be changed, or another tmux session may be created,
180-
so {meth}`Server.sessions` and {meth}`Server.windows` exists as a lookup.
179+
so {meth}`Server.sessions` and {meth}`Server.windows` exist as a lookup.
181180

182181
## Get session by ID
183182

0 commit comments

Comments
 (0)