-
Notifications
You must be signed in to change notification settings - Fork 1
Enhance documentation #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Standardize and clean up docstrings, parameter typing, and error descriptions in get_n_guesses, get_result, get_score, and result_to_pattern. Added a See Also reference in get_result, clarified parameter/return blocks and raise messages, reformatted examples, and added inline sectioning comments in get_score (validation, score calculation, final computation, penalty). Changes are formatting and documentation-focused; no intended functional behavior changes.
Fix a malformed code fence and expand the README example into a clear, step-by-step usage guide. Changes show importing the package as an alias (wg), demonstrate wg.get_result with a simulated target, show how to get top guesses via wg.get_n_guesses (n=3), compute an overall score with wg.get_score, and convert a result to a human-readable pattern with wg.result_to_pattern. Also add explanatory comments to clarify the example flow.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## otter #90 +/- ##
=======================================
Coverage 97.67% 97.67%
=======================================
Files 11 11
Lines 430 430
Branches 69 69
=======================================
Hits 420 420
Misses 6 6
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request enhances the documentation and usability of the wordguess package through improved docstrings, expanded examples, and an updated word list. The changes focus on making the package more accessible to users while maintaining code quality.
Changes:
- Enhanced README with a comprehensive, step-by-step example demonstrating all four main functions (
get_result,get_n_guesses,get_score,result_to_pattern) - Standardized docstring formatting across multiple functions for consistency (optional parameter notation, multi-line formatting, and error condition grouping)
- Added three new words (
slope,apply,stare) to the internal dictionary to expand the playable word set
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Added comprehensive usage example demonstrating all four main functions with clear comments and step-by-step workflow |
| src/wordguess/result_to_pattern.py | Improved docstring formatting with better line breaks, standardized return type notation, and consistent Examples section header |
| src/wordguess/get_score.py | Updated parameter type notation and added inline comments for code sections (validation, calculation, penalty) |
| src/wordguess/get_result.py | Simplified return value description, standardized optional parameter notation, and added See Also section |
| src/wordguess/get_n_guesses.py | Standardized optional parameter notation and improved error condition formatting with semicolons |
| src/wordguess/_internals.py | Added three new valid words (slope, apply, stare) to the minidict word list |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/wordguess/get_n_guesses.py:17
- The word "positional" is incorrectly broken across two lines. This should be a single word on one line.
3. No conflicting positional assignments for letters marked as correct ('2').
4. The total number of distinct present letters (from '1' and '2') does not
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request enhances the usability and clarity of the
wordguesspackage by improving documentation, refining docstrings for consistency, and making minor updates to the internal word list. The most significant changes are grouped below:Documentation Improvements:
README.mdnow includes a comprehensive example demonstrating all four main functions (get_result,get_n_guesses,get_score,result_to_pattern), making it easier for users to get started and understand typical usage.Docstring and Code Clarity Updates:
Updated docstrings across multiple functions (
get_result,get_n_guesses,get_score,result_to_pattern) for consistent parameter formatting, clearer descriptions, and improved example sections. This includes standardizing optional parameter notation, clarifying the meaning of function arguments and return values, and grouping error conditions for better readability. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Added explicit input validation, score calculation, and penalty application comments to the
get_scorefunction, improving code readability and maintainability. [1] [2] [3]Word List Updates:
slope,apply,stare) to the internal dictionary in_internals.pyto expand the playable word set. [1] [2]