From d081f7e49ae1e1673b00c92e4bd174e3c2629efb Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Sun, 2 Aug 2026 21:40:23 +1000 Subject: [PATCH 1/7] docs: add PR and issue templates MVTB had no PR or issue templates at all. Adds a short PR template (Summary/Test plan checklist, no stale branch-workflow instructions) and two GitHub issue forms (bug report, feature request) with the minimum fields that would have actually sped up triage on past issues -- version, Python version, OS, expected/actual, minimal repro for bugs; just a problem statement required for features. config.yml disables blank issues now that Discussions is enabled, routing general questions there instead. Guinea pig for the same rollout across RTB/bdsim/spatialgeometry (swift once its own main-branch migration lands); see toolbox-maintainer skill for the full cross-repo policy. --- .github/ISSUE_TEMPLATE/bug_report.yml | 47 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 +++ .github/ISSUE_TEMPLATE/feature_request.yml | 23 +++++++++++ .github/pull_request_template.md | 12 ++++++ 4 files changed, 87 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/pull_request_template.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..56b3554d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,47 @@ +name: Bug report +description: Report unexpected behavior or a crash +title: "[Bug]: " +labels: ["bug"] +body: + - type: input + id: version + attributes: + label: MVTB version + description: Output of `pip show machinevision-toolbox-python` + placeholder: "e.g. 1.2.3" + validations: + required: true + - type: input + id: python-version + attributes: + label: Python version + placeholder: "e.g. 3.12.4" + validations: + required: true + - type: dropdown + id: os + attributes: + label: Operating system + options: [Linux, macOS, Windows, Other] + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected behavior + validations: + required: true + - type: textarea + id: actual + attributes: + label: Actual behavior + validations: + required: true + - type: textarea + id: repro + attributes: + label: Minimal reproducible example + description: A short, self-contained code snippet that reproduces the issue + render: python + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..17116dc3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Ask a question + url: https://github.com/petercorke/machinevision-toolbox-python/discussions + about: For general questions, ideas, and discussion — not a good fit for the two forms above. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 00000000..9ecd8ad8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,23 @@ +name: Feature request +description: Suggest a new feature or enhancement +title: "[Feature]: " +labels: ["enhancement"] +body: + - type: textarea + id: problem + attributes: + label: What problem are you trying to solve? + validations: + required: true + - type: textarea + id: proposal + attributes: + label: Proposed solution + validations: + required: false + - type: textarea + id: alternatives + attributes: + label: Alternatives considered + validations: + required: false diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..9c20071e --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,12 @@ +Thanks for contributing to MVTB! + +## Summary + + + +## Test plan + +- [ ] Tests pass locally (`pytest`) +- [ ] Added/updated tests for this change, if applicable + + From b25cd12efa6eae61a9ef2a6b05a78dbffca82cda Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Sun, 2 Aug 2026 21:47:13 +1000 Subject: [PATCH 2/7] docs: ask for a concrete function signature in feature requests --- .github/ISSUE_TEMPLATE/feature_request.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 9ecd8ad8..1535ef48 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -13,11 +13,22 @@ body: id: proposal attributes: label: Proposed solution + description: >- + What would the MVTB function/method look like? Include its + signature — parameter names and types, and the return + value(s) and type(s). + placeholder: | + def new_method(self, threshold: float, mode: Literal["a", "b"] = "a") -> NDArray: + ... validations: required: false - type: textarea id: alternatives attributes: label: Alternatives considered + description: >- + Any existing MVTB function that's close, a workaround you're + currently using, or another API shape you considered and why + it didn't fit. Leave blank if none. validations: required: false From 879f086dc0bcde61496c6f227d275dd19c47e53a Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Sun, 2 Aug 2026 21:47:59 +1000 Subject: [PATCH 3/7] docs: add example placeholder to Alternatives considered --- .github/ISSUE_TEMPLATE/feature_request.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 1535ef48..9cd5e701 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -30,5 +30,8 @@ body: Any existing MVTB function that's close, a workaround you're currently using, or another API shape you considered and why it didn't fit. Leave blank if none. + placeholder: | + e.g. "Currently chaining img.threshold(...) then manual masking — + works but takes 3 extra steps and doesn't handle the RGBA case." validations: required: false From f4db44b4b21a16514ea0f1de2bceb54d22b6d39c Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Sun, 2 Aug 2026 21:48:39 +1000 Subject: [PATCH 4/7] docs: flesh out PR template with a proper checklist --- .github/pull_request_template.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 9c20071e..fbe97787 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,9 +4,16 @@ Thanks for contributing to MVTB! -## Test plan +## Related issue + + +## Checklist + +- [ ] PR title follows [Conventional Commits](https://www.conventionalcommits.org/) (`type: description`) — checked automatically, see the "Check PR title" status - [ ] Tests pass locally (`pytest`) - [ ] Added/updated tests for this change, if applicable +- [ ] New/changed code is type-hinted with modern syntax (`X | Y`, `list[X]`, not `Union`/`Optional`/`List`) +- [ ] Docstrings updated (reST style: `:param:`, `:type:`, `:returns:`, `:rtype:`) From d68f605301aaa71795c5cab75acadb910ce6d398 Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Sun, 2 Aug 2026 21:58:14 +1000 Subject: [PATCH 5/7] docs: fix docstring convention note, add Codacy heads-up --- .github/pull_request_template.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index fbe97787..71ff117a 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -14,6 +14,10 @@ Thanks for contributing to MVTB! - [ ] Tests pass locally (`pytest`) - [ ] Added/updated tests for this change, if applicable - [ ] New/changed code is type-hinted with modern syntax (`X | Y`, `list[X]`, not `Union`/`Optional`/`List`) -- [ ] Docstrings updated (reST style: `:param:`, `:type:`, `:returns:`, `:rtype:`) +- [ ] Docstrings updated (reST style: `:param:`, `:returns:`; type hints in the signature cover types now, `:type:`/`:rtype:` are rarely needed) - + From acfedabfc285e11e4a505eb06b81c3bec74c0762 Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Sun, 2 Aug 2026 22:01:17 +1000 Subject: [PATCH 6/7] docs: forewarn contributors about Dependabot vulnerability comments --- .github/pull_request_template.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 71ff117a..61668920 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -20,4 +20,11 @@ Thanks for contributing to MVTB! Note: Codacy will automatically comment on this PR with style/coverage findings. Most of what it flags is pre-existing backlog (see tech-debt.md), not something -your PR introduced -- don't be alarmed by the summary, a maintainer will triage it. --> +your PR introduced -- don't be alarmed by the summary, a maintainer will triage it. + +Note: if this PR adds or bumps a dependency, Dependabot may separately comment +flagging a known vulnerability in that dependency. If it does: check whether a +newer, patched version is available and use that instead; if not, just say so +in this PR so a maintainer can decide how to proceed -- it's not something you +need to solve yourself. --> + From 4a4e943fab8e00af404713efb1f3501d1c94f1a3 Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Sun, 2 Aug 2026 22:01:48 +1000 Subject: [PATCH 7/7] fix: un-hide bot-comment notes from HTML comment block --- .github/pull_request_template.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 61668920..61daf0ab 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -16,15 +16,7 @@ Thanks for contributing to MVTB! - [ ] New/changed code is type-hinted with modern syntax (`X | Y`, `list[X]`, not `Union`/`Optional`/`List`) - [ ] Docstrings updated (reST style: `:param:`, `:returns:`; type hints in the signature cover types now, `:type:`/`:rtype:` are rarely needed) - +