feat: fail CI if pyproject.toml still has placeholder strings - #59
Merged
Conversation
Adds a `placeholders` tox env that greps `pyproject.toml` for the template's placeholder strings (`placeholder-my-plugin`, `Your Name placeholder`, `placeholder@placeholder.com`) and fails if any are present. The check is wired into `test.yml` as a step gated by `github.repository != 'mloda-ai/mloda-plugin-template'` (and pinned to the 3.10 matrix leg so it runs once per workflow). This keeps the template repo's own CI green while scaffolded plugins fail until they update `pyproject.toml`. README "Setup Your Plugin" documents how to run the check locally and the template-repo exemption. `docs/github-repository-settings.md` notes that the check rides on the 3.10 matrix leg. Closes #47
The check now flags the description and the setuptools/pytest placeholder entries in addition to name and authors, so it matches every field the README setup walks the user through. Patterns use POSIX character classes ([.], [*]) instead of backslash escapes for portability across GNU and BSD grep.
TKaltofen
force-pushed
the
feat/placeholder-check
branch
from
May 25, 2026 14:42
aeee62b to
114af4e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[testenv:placeholders]intox.inithat grepspyproject.tomlfor the template placeholder strings and exits 1 if any are found. Usesskip_install = trueand an inline shell grep, so it does not pay the install cost or re-trigger setuptools on the placeholder name.name(placeholder-my-plugin),authorsname (Your Name placeholder),authorsemail (placeholder@placeholder.com),description(TEMPLATE PLACEHOLDER),tool.setuptools.packages.find.include("placeholder*"), andtool.pytest.ini_options.testpaths("placeholder"). Patterns use POSIX character classes ([.],[*]) for GNU/BSD grep portability..github/workflows/test.ymlas an additional step on the existingtestjob, gated bymatrix.python-version == '3.10' && github.repository != 'mloda-ai/mloda-plugin-template'. The template repo's own CI is green; scaffolded plugins inherit no exemption and fail until they updatepyproject.toml.tox -e placeholdersinREADME.md"Setup Your Plugin" with the template-repo exemption explicitly called out.docs/github-repository-settings.mdso a reader who reshapes the Python matrix knows the placeholder check rides on the3.10leg.The default
toxinvocation (envlistpython310) is unchanged, so the template repo's local and CI runs stay green. The new env runs only viatox -e placeholders.Closes #47
Test plan
tox -e placeholderson currentmainfails withexit 1, printing all five matchingpyproject.tomllines (name, description, authors, include, testpaths) and an instructional errorpyproject.toml.bak, then restored;git diff pyproject.tomlempty afterward)tox(matrixpython310) still passes after the changesif:expression syntax validated by GitHub Actions parser (Actions tab on the push for this branch)if:gate cannot be fully exercised pre-merge without pushing the workflow file to a non-mloda-ai/mloda-plugin-templatefork.