Skip to content

Commit dcb5f87

Browse files
committed
Add GitHub issue templates and update CLAUDE.md
Issue templates (.github/ISSUE_TEMPLATE/): - feature.yml: Overview, Problem, Proposal (checklist), Evidence, Scope/Non-goals, Benchmark/Performance, Breaking changes, Related issues - bug.yml: Overview, Reproduction (C# syntax), Expected, Actual, Workaround, Root cause, Related issues - config.yml: blank issues allowed CLAUDE.md updates: - GitHub Issues section: added Feature/Enhancement and Bug Report format specifications matching the issue templates - Test Categories section: documents [TestCategory("OpenBugs")] and [TestCategory("WindowsOnly")] convention and CI filter mapping - CI Pipeline section: pointer to build-and-release.yml
1 parent 1d8d79f commit dcb5f87

File tree

4 files changed

+155
-1
lines changed

4 files changed

+155
-1
lines changed

.claude/CLAUDE.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,29 @@ switch (nd.typecode)
307307
```
308308

309309
## GitHub Issues
310-
Create issues on `SciSharp/NumSharp` via `gh issue create` when the user requests it. `GH_TOKEN` is available in the environment.
310+
311+
Create issues on `SciSharp/NumSharp` via `gh issue create`. `GH_TOKEN` is available via the `env-tokens` skill.
312+
313+
### Feature / Enhancement
314+
315+
- **Overview**: 1-2 sentence summary of what and why
316+
- **Problem**: What's broken or missing, why it matters
317+
- **Proposal**: What to change, with a task checklist (`- [ ]`)
318+
- **Evidence**: Data, benchmarks, or references supporting the proposal
319+
- **Scope / Non-goals**: What this issue does NOT cover (prevent scope creep)
320+
- **Benchmark / Performance** (if applicable): Before/after numbers, methodology, what to measure
321+
- **Breaking changes** table (if any): Change | Impact | Migration
322+
- **Related issues**: Link dependencies
323+
324+
### Bug Report
325+
326+
- **Overview**: 1-2 sentence summary of the bug and its impact
327+
- **Reproduction**: Minimal code to trigger the bug
328+
- **Expected**: Correct behavior (include NumPy output as source of truth)
329+
- **Actual**: What NumSharp does instead (error message, wrong output, crash)
330+
- **Workaround** (if any): How users can avoid the bug today
331+
- **Root cause** (if known): File, line, why it happens
332+
- **Related issues**: Link duplicates or upstream causes
311333

312334
## Build & Test
313335

@@ -316,6 +338,23 @@ dotnet build -v q --nologo "-clp:NoSummary;ErrorsOnly" -p:WarningLevel=0
316338
dotnet test -v q --nologo "-clp:ErrorsOnly" test/NumSharp.UnitTest/NumSharp.UnitTest.csproj
317339
```
318340

341+
## Test Categories
342+
343+
Tests are filtered by `[TestCategory]` attributes. Adding new bug reproductions or platform-specific tests only requires the right attribute — no CI workflow changes.
344+
345+
| Category | Purpose | CI filter |
346+
|----------|---------|-----------|
347+
| `OpenBugs` | Known-failing bug reproductions. Remove category when fixed. | `TestCategory!=OpenBugs` (all platforms) |
348+
| `WindowsOnly` | Requires GDI+/System.Drawing.Common | `TestCategory!=WindowsOnly` (Linux/macOS) |
349+
350+
Apply at class level (`[TestClass][TestCategory("OpenBugs")]`) or individual method level (`[TestMethod][TestCategory("OpenBugs")]`).
351+
352+
**OpenBugs files**: `OpenBugs.cs` (broadcast bugs), `OpenBugs.Bitmap.cs` (bitmap bugs). When a bug is fixed, the test starts passing — remove the `OpenBugs` category and move to a permanent test class.
353+
354+
## CI Pipeline
355+
356+
`.github/workflows/build-and-release.yml` — test on 3 OSes (Windows/Ubuntu/macOS), build NuGet on tag push, create GitHub Release, publish to nuget.org.
357+
319358
## Scripting with `dotnet run` (.NET 10 file-based apps)
320359

321360
### Accessing Internal Members

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Bug Report
2+
description: Report a bug or incorrect behavior
3+
labels: ["bug"]
4+
body:
5+
- type: textarea
6+
id: overview
7+
attributes:
8+
label: Overview
9+
description: 1-2 sentence summary of the bug and its impact.
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: reproduction
15+
attributes:
16+
label: Reproduction
17+
description: Minimal code to trigger the bug.
18+
render: csharp
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
id: expected
24+
attributes:
25+
label: Expected
26+
description: Correct behavior. Include NumPy output as source of truth where applicable.
27+
validations:
28+
required: true
29+
30+
- type: textarea
31+
id: actual
32+
attributes:
33+
label: Actual
34+
description: What NumSharp does instead (error message, wrong output, crash).
35+
validations:
36+
required: true
37+
38+
- type: textarea
39+
id: workaround
40+
attributes:
41+
label: Workaround
42+
description: How users can avoid the bug today (if any).
43+
44+
- type: textarea
45+
id: root-cause
46+
attributes:
47+
label: Root cause
48+
description: File, line, why it happens (if known).
49+
50+
- type: textarea
51+
id: related
52+
attributes:
53+
label: Related issues
54+
description: Link duplicates or upstream causes.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: true

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Feature / Enhancement
2+
description: Propose a new feature or improvement
3+
labels: ["enhancement"]
4+
body:
5+
- type: textarea
6+
id: overview
7+
attributes:
8+
label: Overview
9+
description: 1-2 sentence summary of what and why.
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: problem
15+
attributes:
16+
label: Problem
17+
description: What's broken or missing, and why it matters.
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: proposal
23+
attributes:
24+
label: Proposal
25+
description: What to change. Use a task checklist (`- [ ]`) for individual steps.
26+
placeholder: |
27+
- [ ] Step 1
28+
- [ ] Step 2
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: evidence
34+
attributes:
35+
label: Evidence
36+
description: Data, benchmarks, references, or NumPy behavior supporting the proposal.
37+
38+
- type: textarea
39+
id: scope
40+
attributes:
41+
label: Scope / Non-goals
42+
description: What this issue does NOT cover (prevent scope creep).
43+
44+
- type: textarea
45+
id: benchmark
46+
attributes:
47+
label: Benchmark / Performance
48+
description: Before/after numbers, methodology, what to measure (if applicable).
49+
50+
- type: textarea
51+
id: breaking-changes
52+
attributes:
53+
label: Breaking changes
54+
description: Use a table if needed (Change | Impact | Migration).
55+
56+
- type: textarea
57+
id: related
58+
attributes:
59+
label: Related issues
60+
description: Link dependencies or related issues.

0 commit comments

Comments
 (0)