-
Notifications
You must be signed in to change notification settings - Fork 111
Commit 674bae9
committed
docs(snapshot[README]): add comprehensive doctest-based README for snapshot module
The snapshot module has been enhanced with a detailed README.md that serves
both as documentation and executable tests. This commit introduces a thorough
guide for users to understand and leverage the snapshot functionality.
- **Value Proposition Section**: Added clear explanation of benefits the
snapshot module provides for tmux automation and management
- **Progressive Learning Structure**: Organized examples from basic to advanced,
building user knowledge incrementally
- **Executable Documentation**: Converted all examples to doctests that run
with pytest, verified with 19 passing tests
- **Environment-Resilient Tests**: Implemented fallback patterns to ensure
tests pass in varied environments (CI, local development)
- **Real-World Use Cases**: Added practical examples showing how to apply
snapshots for:
* Testing tmux automations with before/after comparison
* Session state backup and restoration
* Configuration comparison between windows/sessions
* Content monitoring and change detection
* Saving and restoring window arrangements
- **Best Practices Section**: Included guidance on effective snapshot usage,
addressing memory concerns, and optimization tips
- **API Overview**: Added summary of snapshot module structure and
available methods
- **User-Friendly Format**: Included import statements in each section for
copy-paste friendliness and added "Tip" sections for additional context
The README now serves multiple purposes: code verification via tests,
educational resource for new users, and comprehensive reference for
experienced developers. All doctests are confirmed working with1 parent d91a8e4 commit 674bae9Copy full SHA for 674bae9
File tree
Expand file treeCollapse file tree
1 file changed
+809
-188
lines changedFilter options
- src/libtmux/snapshot
Expand file treeCollapse file tree
1 file changed
+809
-188
lines changed
0 commit comments