Skip to content

Conversation

@yhouyang02
Copy link
Collaborator

This pull request enhances the usability and clarity of the wordguess package 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:

  • The README.md now 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_score function, improving code readability and maintainability. [1] [2] [3]

Word List Updates:

  • Added new words (slope, apply, stare) to the internal dictionary in _internals.py to expand the playable word set. [1] [2]

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.
@yhouyang02 yhouyang02 added this to the milestone4 milestone Feb 3, 2026
@github-actions github-actions bot temporarily deployed to pr-90 February 3, 2026 02:15 Destroyed
@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.67%. Comparing base (980bd35) to head (7104e7c).
⚠️ Report is 13 commits behind head on otter.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions bot temporarily deployed to pr-90 February 3, 2026 02:18 Destroyed
Copy link
Contributor

Copilot AI left a 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.

@github-actions github-actions bot temporarily deployed to pr-90 February 3, 2026 02:30 Destroyed
Copilot AI review requested due to automatic review settings February 3, 2026 02:31
@github-actions github-actions bot temporarily deployed to pr-90 February 3, 2026 02:32 Destroyed
Copy link
Contributor

Copilot AI left a 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.

@yhouyang02 yhouyang02 merged commit 1dcbc8c into otter Feb 3, 2026
10 checks passed
@yhouyang02 yhouyang02 deleted the prettier-docs branch February 3, 2026 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants