Skip to content

Server,Session,Window,Pane(docs): Add task directories - #857

Open
tony wants to merge 1 commit into
masterfrom
docs/api-directory
Open

tony wants to merge 1 commit into
masterfrom
docs/api-directory

Conversation

@tony

@tony tony commented Nov 14, 2026

Copy link
Copy Markdown
Member

Summary

Most ports open their Server page on libtmux.org with a task directory; no Python type has one. This adds a directory to the Server, Session, Window and Pane class docstrings, after the opening description and before the numpydoc sections, with fully qualified Sphinx roles.

Changes

  • src/libtmux/server.py, Server: Connecting; Finding one thing; Listing everything; Filtering; Creating and destroying; Clients; Options, hooks and environment; Buffers and key bindings; Running a command.
  • src/libtmux/session.py, Session: Reading it; Finding it; Finding what is inside; Moving the selection; Adding windows; Changing it; Options, hooks and environment.
  • src/libtmux/window.py, Window: Reading it; Finding it; Finding its neighbours; Splitting and arranging; Linking and moving; Changing it; Options and hooks.
  • src/libtmux/pane.py, Pane: Reading it; Finding it; Finding its parents; Sending input; Reading output; Splitting and arranging; Modes, pipes and history; Changing it; Options and hooks.
  • CHANGES: a Documentation entry.

Review notes

  • Session.refresh() and Session.kill_window() failure behaviour is not stated, since their docstrings do not document it.

Test plan

  • The libtmux.org parser (parseApiProse and groupDirectory from libtmux/docs, after this port's doc parser) folds each new doc comment into a directory
  • ruff check and ruff format --check pass
  • The modules import
  • Sphinx build renders the directories
  • Doctests
  • The directories render on libtmux.org once the docs model is regenerated from this branch

…ocstrings

why: libtmux.org draws a class docstring as an API task directory when it
holds three or more bold-led paragraphs, each followed by a labelled list
of Sphinx roles. The python port had none, so none of the four core types
told a reader which call does which job or what it raises.
what:
- Server, Session, Window and Pane: add bold-led rows in the intro of the
  class docstring, each followed by a bullet list of `Label: :meth:` roles
  in the fully qualified `~libtmux.X.y` form
- State, from the source, what each group raises (ObjectDoesNotExist,
  TmuxObjectDoesNotExist, BadSessionName, OptionError, ValueError), which
  listings answer empty instead of raising, and which flags warn and are
  ignored on an older tmux
- CHANGES: record the documentation change
@codecov

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.09%. Comparing base (0f5701f) to head (c14b4e4).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #857   +/-   ##
=======================================
  Coverage   52.09%   52.09%           
=======================================
  Files          26       26           
  Lines        3751     3751           
  Branches      747      747           
=======================================
  Hits         1954     1954           
  Misses       1493     1493           
  Partials      304      304           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant