Improved all attribute docs#1174
Conversation
There was a problem hiding this comment.
Pull request overview
This PR standardizes and expands documentation for a set of under-documented NUnit attributes by introducing a consistent template (constructors/properties/notes/see-also), and by moving/adding working code examples into the snippets project. It also adds internal .claude guidance (skill + plan) to systematize further documentation improvements.
Changes:
- Reworked multiple attribute docs pages into a consistent, more structured format (constructor/properties/applies-to/notes/see-also).
- Added new NUnit snippet example files for the updated attributes and wired docs pages to snippet regions.
- Added a
.claudeskill and a docs improvement plan to guide future attribute documentation work.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/snippets/Snippets.NUnit/Attributes/SingleThreadedAttributeExamples.cs | Adds snippet coverage for SingleThreadedAttribute. |
| docs/snippets/Snippets.NUnit/Attributes/SetUICultureAttributeExamples.cs | Adds snippet coverage for SetUICultureAttribute (fixture/method/combined usage). |
| docs/snippets/Snippets.NUnit/Attributes/SetCultureAttributeExamples.cs | Adds snippet coverage for SetCultureAttribute (fixture/method/combined usage). |
| docs/snippets/Snippets.NUnit/Attributes/RepeatAttributeExample.cs | Updates the repeat snippet’s explicit reason text. |
| docs/snippets/Snippets.NUnit/Attributes/PropertyAttributeExamples.cs | Adds snippet coverage for PropertyAttribute, including custom derived attribute usage. |
| docs/snippets/Snippets.NUnit/Attributes/OrderAttributeExamples.cs | Adds snippet coverage for OrderAttribute (methods/fixtures/gaps pattern). |
| docs/snippets/Snippets.NUnit/Attributes/MaxTimeAttributeExamples.cs | Adds snippet coverage for MaxTimeAttribute (basic + precedence example). |
| docs/snippets/Snippets.NUnit/Attributes/DatapointAttributeExamples.cs | Adds snippet coverage for Datapoint/DatapointSource patterns used by theories. |
| docs/snippets/Snippets.NUnit/Attributes/CultureAttributeExamples.cs | Adds snippet coverage for CultureAttribute (include/exclude/reason/fixture usage). |
| docs/articles/nunit/writing-tests/attributes/singlethreaded.md | Rewrites doc page into structured template and links new snippet. |
| docs/articles/nunit/writing-tests/attributes/setuiculture.md | Rewrites doc page into structured template and links new snippets. |
| docs/articles/nunit/writing-tests/attributes/setculture.md | Rewrites doc page into structured template and links new snippets. |
| docs/articles/nunit/writing-tests/attributes/retry.md | Rewrites doc page into structured template and clarifies RetryExceptions. |
| docs/articles/nunit/writing-tests/attributes/repeat.md | Rewrites doc page into structured template and updates notes/links. |
| docs/articles/nunit/writing-tests/attributes/property.md | Rewrites doc page into structured template and links new snippets. |
| docs/articles/nunit/writing-tests/attributes/order.md | Rewrites doc page into structured template and links new snippets. |
| docs/articles/nunit/writing-tests/attributes/maxtime.md | Rewrites doc page into structured template and links new snippets. |
| docs/articles/nunit/writing-tests/attributes/datapointsource.md | Rewrites doc page into structured template and links new snippet region. |
| docs/articles/nunit/writing-tests/attributes/datapoint.md | Rewrites doc page into structured template and links new snippet regions. |
| docs/articles/nunit/writing-tests/attributes/culture.md | Rewrites doc page into structured template and links new snippets. |
| .claude/skills/attribute-documentation/skill.md | Adds a reusable internal template/workflow for attribute docs updates. |
| .claude/plans/docs-improvement-plan.md | Adds a tracking plan for attribute documentation improvements. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…oise, but it crashed a build
|
@SeanKilleen Can you have a new look? I know there are a lot of files and changes, but just a quick check please :-) I'll buy you dinner next time we meet ! |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 147 out of 147 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@OsirisTerje I'll take a look soon as I'm able, probably in a few hours. Pretty sure I owe you dinner for doing all the heavy work! :) |
Co-authored-by: Sean Killeen <SeanKilleen@gmail.com>
Co-authored-by: Sean Killeen <SeanKilleen@gmail.com>
…nto updateattributedocs
|
The plan for improvement, now done: NUnit Attribute Documentation Improvement PlanOverviewThis plan outlines the work needed to improve the documentation for NUnit attributes located in Template StructureEach attribute documentation file should follow this structure:
Priority List - Top 10 Attributes Needing Updates1. SingleThreaded (Score: 9/10 - Critical)
2. SetCulture (Score: 8.5/10)
3. SetUICulture (Score: 8.5/10)
4. Culture (Score: 8/10)
5. Property (Score: 7.5/10)
6. Datapoint (Score: 7/10)
7. DatapointSource (Score: 7/10)
8. MaxTime (Score: 6.5/10)
9. Order (Score: 6.5/10)
10. Repeat (Score: 6.5/10)
Additional Attributes Needing Work (Ranks 11-15)11. Random (Score: 6/10)
12. NonTestAssembly (Score: 5.5/10)
13. LevelOfParallelism (Score: 5/10)
14. Apartment (Score: 5/10)
15. TestOf (Score: 5/10)
Documentation Quality Summary
Key Documentation Gaps Across All Attributes
Reference: Completed TemplateSee
Progress Tracking
|
|
@SeanKilleen Any further comments, or can I merge it ? |
|
@OsirisTerje give me a little time. You asked for review at 11pm last night my time and I'm in the middle of a workday now. Will review when I can |
|
Sorry @SeanKilleen . I am not expecting you at all to react immediately. I know we are on different time zones. 😃 |
I have changed the docs to a more common format, with clear documentation of ctors and properties. And also moved all examples to the snippets folder, and where none where present, created examples.
I have also added a claude skill for attribute documentation, and a plan for this and further work.
Based on the skill, a series of new examples have been added when there are more actual usage patterns that was described earlier, and in some cases the structure have also been improved, and since AI is good with language, the documents now looks better - to me at least......
I have used both Claude and Cursor to work with the documentation, small parts at a time. I have asked them to look at the source code and ensure we have all properties and usage the code allow in the documentation. In some cases I have also had it look at the unit tests we have to gather information on usage.
I also had to change all document path links (we should not use those) into xref links and then adding uid's in every file that was referenced.