<#810 Enhance docstrings with detailed parameter d...
# flyte-github
a
#810 Enhance docstrings with detailed parameter documentation Pull request opened by ppiegaze Summary • Enhance docstrings for 12 classes/protocols with detailed parameter documentation, format examples, and usage patterns • Content transferred from the unionai-docs user guide as part of an information architecture effort to keep procedural content in the user guide and reference content in the SDK source Classes enhanced | Class | File | Key additions | | ------------------ | ------------------------------ | ----------------------------------------------------------------------------------- | | Resources | _resources.py | CPU/memory/GPU/disk/shm format examples, Kubernetes unit conventions | | ReusePolicy | _reusable_environment.py | Capacity math, idle_ttl vs scaledown_ttl distinction, scaling semantics | | Trigger | _trigger.py | Grouped params (core, config, runtime overrides, metadata), predefined methods note | | Cron | _trigger.py | Cron expression quick-reference, common patterns, timezone notes | | FixedRate | _trigger.py | start_time behavior, interval examples | | Image | image.py | Fluent pattern overview, from /with method listing with descriptions | | TaskEnvironment | _task_environment.py | Three-level configuration model, per-param override level documentation | | Cache | _cache/cache.py | Three behavior modes explained, policy defaults | | CachePolicy | _cache/cache.py | Protocol docstring with custom implementation example | | FunctionBodyPolicy | _cache/policy_function_body.py | Default policy role, cache invalidation behavior | | AppEnvironment | app/_app_environment.py | App-specific params with accepted values and constraints | | Scaling | app/_types.py | Class docstring with common scaling patterns | Motivation The auto-generated API reference pages derive their content from these docstrings. Richer docstrings mean richer API docs, allowing the user guide to link to API reference instead of duplicating parameter documentation inline. A companion PR in unionai-docs (unionai/unionai-docs#854) trims the duplicated content. Test plan •
uv run python -c "import flyte; help(flyte.Resources)"
renders correctly • Regenerate API docs and verify enhanced content appears 🤖 Generated with Claude Code flyteorg/flyte-sdk