Skip to content

📝 docs(plugins): document toxfile.py inline plugins#3694

Merged
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:docs/plugin-provided-envs
Feb 15, 2026
Merged

📝 docs(plugins): document toxfile.py inline plugins#3694
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:docs/plugin-provided-envs

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

The plugin documentation had only auto-generated API references and a single trivial example showing tox_append_version_info. Users wanting to provide environments from plugins (#828) had no practical guidance on how to use toxfile.py with tox_extend_envs and MemoryLoader.

This adds an "Inline plugins via toxfile.py" section with three progressively complex examples: adding a CLI flag via tox_add_option, appending version info, and dynamically providing environments using tox_extend_envs paired with MemoryLoader. 📝 The last example shows the exact use case from #828 -- a shared lint environment backed by pre-commit that doesn't require any tox.ini entry.

All examples are fully type-annotated and the RST heading levels in the Migration section were adjusted to stay consistent with the new sub-heading structure.

Closes #828

The plugin docs had only auto-generated API references and a single
trivial example. Users asking how to provide environments from
plugins (issue tox-dev#828) had no practical guidance.

Add an "Inline plugins via toxfile.py" section with three examples:
adding a CLI flag, appending version info, and dynamically providing
environments using tox_extend_envs with MemoryLoader. The last one
addresses the original feature request for reusable env definitions
like shared linting configs.

Also fix RST heading levels in the Migration section that became
inconsistent with the new sub-heading style.

Closes tox-dev#828
@gaborbernat gaborbernat enabled auto-merge (squash) February 15, 2026 02:59
@gaborbernat gaborbernat merged commit 742c7bd into tox-dev:main Feb 15, 2026
28 checks passed
@gaborbernat gaborbernat deleted the docs/plugin-provided-envs branch February 18, 2026 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature requests - envs provided by plugins

1 participant