docs: update usage messages to follow Wolfram Language documentation style - #21
Conversation
Code Review: Documentation ImprovementsThank you for this thorough documentation update! This PR significantly improves the quality and consistency of the usage messages across the codebase. Here's my detailed review: ✅ Strengths1. Excellent Adherence to Wolfram Language Conventions
2. Significant Quality Improvements
3. Improved Contextual Information
4. Strong Test Coverage
📝 Minor Suggestions1. Consistency in Multi-line FormatSome multi-line usage messages could benefit from slightly more consistent formatting. For example: SetComponents::usage = "SetComponents[varlist] sets component values for all tensors in varlist using default options.
SetComponents[{opts}, varlist] allows customization via ChartName, IndependentIndexForEachVar, WithoutGridPointIndex, UseTilePointIndex.";Consider whether the option names should be in a separate line or grouped more readably, though the current format is acceptable and follows Wolfram conventions. 2. Parameter Naming ConsistencyIn a few places, parameter names in the usage message don't match the actual function signature:
3. Typo in Function Name (Pre-existing)There's a typo in the function name itself: 🎯 Code Quality Assessment
✅ RecommendationAPPROVE - This is a high-quality documentation improvement that:
The changes make the codebase more maintainable and user-friendly. Great work on maintaining consistency across 100+ usage messages! 📚 Additional ContextThe changes align well with the project's architecture as described in CLAUDE.md:
Thank you for taking the time to improve the documentation quality across the entire codebase! |
…style
Update 100+ function usage messages across 8 source files to follow
official Wolfram Language documentation conventions:
- Use present tense verbs ("returns", "sets", "enables")
- Multi-line format for functions with multiple signatures
- Full descriptions for option symbols explaining their purpose
- Fix incorrect descriptions (e.g., GetPrintHeaderMacro was incorrectly
documented as "date" instead of "header guard macros")
- Add missing usage message for GetUpwindCoefficients
- Rename TensorComponet -> TensorComponent (fix typo)
Files updated:
- src/Basic.wl (27 functions)
- src/Component.wl (15 functions)
- src/Varlist.wl (3 functions)
- src/ParseMode.wl (25 functions)
- src/Interface.wl (22 functions)
- src/Writefile.wl (4 functions)
- src/Derivation.wl (1 function)
- src/stencils/FiniteDifferenceStencils.wl (3 functions)
cac4645 to
4f0102b
Compare
Code Review for PR #21: Documentation Style UpdateThis PR makes excellent improvements to documentation quality across the codebase. Here's my detailed review: ✅ Strengths1. Consistent Documentation Style
2. Improved Clarity
3. Critical Bug Fix
4. Test Coverage
📋 Minor Observations1. Consistency Opportunities
Consider making them structurally parallel, e.g., "returns the output file name used in code generation" OR keep them both minimal. 2. Parameter Naming
However, this is a minor style preference and the current approach is valid. 3. Option Documentation Format
This is very professional and matches Wolfram's documentation style. 🔍 Code Quality Assessment
📊 Impact AnalysisFiles changed: 9 files
Net changes: +122/-120 lines (nearly neutral, just improving existing docs) ✅ RecommendationAPPROVE - This PR significantly improves code documentation quality and fixes an actual bug (typo in function name). The changes are:
Great work on this documentation refresh! The codebase will be much more maintainable with these clearer usage messages. |
Summary
GetPrintHeaderMacrowas incorrectly documented as "date" instead of "header guard macros")GetUpwindCoefficientsin FiniteDifferenceStencils.wlTest plan
./test/run_tests.sh)