From 5df186035a124e521048e977d1880d67da3727c9 Mon Sep 17 00:00:00 2001 From: Phil Schaf Date: Wed, 11 Feb 2026 14:26:32 +0100 Subject: [PATCH 1/4] refactor: executable issues --- .github/ISSUE_TEMPLATE/bug-report.yml | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 352b7dd03..55931ef09 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -29,14 +29,28 @@ body: attributes: label: Report description: | - Describe the bug you encountered, and what you were trying to do. Please use [github markdown][] features for readability. + Describe the bug you encountered, and what you were trying to do. + Executable example 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. + Please use [github markdown][] features for readability. + + [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 [github markdown]: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax value: | Code: ```python + # /// script + # requires-python = ">=3.12" + # dependencies = [ + # "anndata@git+https://github.com/scverse/anndata.git", + # ] + # /// + import anndata + # your reproducer code ``` Traceback: @@ -57,15 +71,15 @@ body: click the “Copy as Markdown” button, then paste the results into the text box below. - ```python + ```pycon In[1]: import anndata, session_info2; session_info2.session_info(dependencies=True) ``` - Alternatively, run this in a console: + Alternatively, run this in your virtual environment: ```python - >>> import session_info2; print(session_info2.session_info(dependencies=True)._repr_mimebundle_()["text/markdown"]) + python -m session_info2 -f markdown ``` - render: python + render: markdown validations: required: true From ba20f76eaeba42fb1022d4470a8c259908dcbceb Mon Sep 17 00:00:00 2001 From: Phil Schaf Date: Wed, 11 Feb 2026 14:28:36 +0100 Subject: [PATCH 2/4] =?UTF-8?q?don=E2=80=99t=20use=20code=20box?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/bug-report.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 55931ef09..ba0cb9964 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -80,6 +80,5 @@ body: ```python python -m session_info2 -f markdown ``` - render: markdown validations: required: true From 8164688aef6498c84a5df85b5c47126b36d59c13 Mon Sep 17 00:00:00 2001 From: Phil Schaf Date: Wed, 11 Feb 2026 14:29:25 +0100 Subject: [PATCH 3/4] better --- .github/ISSUE_TEMPLATE/bug-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index ba0cb9964..c25c936ec 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -78,7 +78,7 @@ body: Alternatively, run this in your virtual environment: ```python - python -m session_info2 -f markdown + session-info2 -f markdown ``` validations: required: true From dbd37c7bf473bfd43923f0ecdf62b9d9a66181bf Mon Sep 17 00:00:00 2001 From: Phil Schaf Date: Wed, 11 Feb 2026 14:32:15 +0100 Subject: [PATCH 4/4] shell --- .github/ISSUE_TEMPLATE/bug-report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index c25c936ec..3dcbd6c84 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -77,8 +77,8 @@ body: Alternatively, run this in your virtual environment: - ```python - session-info2 -f markdown + ```shell + session-info2 -f markdown # do *not* use `uvx` for this ``` validations: required: true