From 68f0c4954db279427ac38ef2242eb7a68ab81f89 Mon Sep 17 00:00:00 2001 From: Ilan Gold Date: Fri, 14 Nov 2025 21:33:04 +0100 Subject: [PATCH 1/3] feat: runnable bug reports --- .../.github/ISSUE_TEMPLATE/bug_report.yml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/{{cookiecutter.project_name}}/.github/ISSUE_TEMPLATE/bug_report.yml b/{{cookiecutter.project_name}}/.github/ISSUE_TEMPLATE/bug_report.yml index 3ca1ccbd..242928e3 100644 --- a/{{cookiecutter.project_name}}/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/{{cookiecutter.project_name}}/.github/ISSUE_TEMPLATE/bug_report.yml @@ -20,6 +20,31 @@ body: validations: required: true + - type: textarea + id: code + attributes: + label: Minimal code sample + description: | + Reproducible code sample. Must list dependencies in [inline script metadata][]. When put in a file named `issue.py` using [uv run][] i.e., `uv run issue.py`, should show the issue. + + [uv run]: https://docs.astral.sh/uv/guides/scripts/#running-a-script-with-dependencies + [inline script metadata]: https://packaging.python.org/en/latest/specifications/inline-script-metadata/#example + render: python + value: | + ```python + # /// script + # requires-python = ">=3.12" + # dependencies = [ + # "{{cookiecutter.package_name}}@git+https://github.com/scverse/{{cookiecutter.project_name}}.git@main", + # ] + # /// + # + # This script automatically imports the development branch of scanpy to check for issues + + import scanpy as sc + # your reproducer code + ``` + - type: textarea id: versions attributes: From 06c5e4e4b2794337c781e5c5101a3343839e2c82 Mon Sep 17 00:00:00 2001 From: Ilan Gold Date: Fri, 14 Nov 2025 21:36:15 +0100 Subject: [PATCH 2/3] fix: more custom names --- .../.github/ISSUE_TEMPLATE/bug_report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_name}}/.github/ISSUE_TEMPLATE/bug_report.yml b/{{cookiecutter.project_name}}/.github/ISSUE_TEMPLATE/bug_report.yml index 242928e3..782bed69 100644 --- a/{{cookiecutter.project_name}}/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/{{cookiecutter.project_name}}/.github/ISSUE_TEMPLATE/bug_report.yml @@ -39,9 +39,9 @@ body: # ] # /// # - # This script automatically imports the development branch of scanpy to check for issues + # This script automatically imports the development branch of {{cookiecutter.package_name}} to check for issues - import scanpy as sc + import {{cookiecutter.package_name}} # your reproducer code ``` From 46144578a3ca9df7da8fc54ecc719e4499a9c9af Mon Sep 17 00:00:00 2001 From: Ilan Gold Date: Fri, 14 Nov 2025 21:48:06 +0100 Subject: [PATCH 3/3] fix: trailing whitespace --- .../.github/ISSUE_TEMPLATE/bug_report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_name}}/.github/ISSUE_TEMPLATE/bug_report.yml b/{{cookiecutter.project_name}}/.github/ISSUE_TEMPLATE/bug_report.yml index 782bed69..ae7ecb2c 100644 --- a/{{cookiecutter.project_name}}/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/{{cookiecutter.project_name}}/.github/ISSUE_TEMPLATE/bug_report.yml @@ -26,7 +26,7 @@ body: label: Minimal code sample description: | Reproducible code sample. Must list dependencies in [inline script metadata][]. When put in a file named `issue.py` using [uv run][] i.e., `uv run issue.py`, should show the issue. - + [uv run]: https://docs.astral.sh/uv/guides/scripts/#running-a-script-with-dependencies [inline script metadata]: https://packaging.python.org/en/latest/specifications/inline-script-metadata/#example render: python @@ -40,7 +40,7 @@ body: # /// # # This script automatically imports the development branch of {{cookiecutter.package_name}} to check for issues - + import {{cookiecutter.package_name}} # your reproducer code ```