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..9cd5e701 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,37 @@ +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 + 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. + 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 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..61daf0ab --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,22 @@ +Thanks for contributing to MVTB! + +## Summary + + + +## 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:`, `:returns:`; type hints in the signature cover types now, `:type:`/`:rtype:` are rarely needed) + +> **Automated bot comments to expect:** Codacy will comment with style/coverage findings — most of it is pre-existing backlog (see `tech-debt.md`), not something your PR introduced, so don't be alarmed. If this PR adds or bumps a dependency, Dependabot may separately comment flagging a known vulnerability — if so, use a newer patched version if one exists, or just note it in this PR and a maintainer will decide; you don't need to solve it yourself. + + +