Skip to content

Commit 514a184

Browse files
Backport PR #3852 on branch 1.11.x (chore: use uv runable code sample for bug reports) (#3855)
Co-authored-by: Ilan Gold <[email protected]>
1 parent 7348d4d commit 514a184

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,26 @@ body:
3333
id: code
3434
attributes:
3535
label: Minimal code sample
36-
description: (that we can copy&paste without having any data)
36+
description: |
37+
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.
38+
39+
[uv run]: https://docs.astral.sh/uv/guides/scripts/#running-a-script-with-dependencies
40+
[inline script metadata]: https://packaging.python.org/en/latest/specifications/inline-script-metadata/#example
3741
render: python
42+
value: |
43+
```python
44+
# /// script
45+
# requires-python = ">=3.12"
46+
# dependencies = [
47+
# "scanpy@git+https://github.com/scverse/scanpy.git@main",
48+
# ]
49+
# ///
50+
#
51+
# This script automatically imports the development branch of scanpy to check for issues
52+
53+
import scanpy as sc
54+
# your reproducer code
55+
```
3856
validations:
3957
required: true
4058
- type: textarea

0 commit comments

Comments
 (0)