-
Notifications
You must be signed in to change notification settings - Fork 1
Create release 3.0.0 #92
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
Add code cov + update readme badges
doc preview workflow for pr to otter and main
Dynamic versioning
add work organization and retrospective to CONTRIBUTING.md
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.
Commenting
…into prettier-docs
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Enhance documentation
Expand and clarify development docs: add Conda, Codecov, Ruff, and quartodoc to tools; document gh-pages branch and CHANGELOG.md; note Copilot in code review. Reformat development workflow items to bullets, adjust CI/testing section (replace some specific coverage/benchmark entries with a generic Performance Tests item), and tidy repository/issue/pull request guidance. Remove an explicit Security subsection and make small editorial fixes for consistency.
Update CONTRIBUTING.md tools and workflows
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #92 +/- ##
=======================================
Coverage ? 97.67%
=======================================
Files ? 11
Lines ? 430
Branches ? 69
=======================================
Hits ? 420
Misses ? 6
Partials ? 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
Prepares the project for the 3.0.0 release by introducing dynamic versioning, improving CI/CD automation, and expanding project documentation and visibility.
Changes:
- Added Hatch VCS-based dynamic versioning and exposed package version via
__version__. - Introduced/updated GitHub Actions workflows for docs previews, code coverage uploads, and tag-based deployments.
- Expanded documentation (README, Quarto nav, CONTRIBUTING, CHANGELOG) and updated the built-in
minidictdataset.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/wordguess/result_to_pattern.py | Docstring formatting/clarity updates and inline comments. |
| src/wordguess/get_score.py | Docstring adjustments and added inline comments around scoring logic. |
| src/wordguess/get_result.py | Docstring clarification and “See Also” additions. |
| src/wordguess/get_n_guesses.py | Docstring cleanup to match NumPy style. |
| src/wordguess/_internals.py | Added new words to the built-in minidict. |
| src/wordguess/version.py | Added generated version module intended for dynamic versioning. |
| src/wordguess/init.py | Exposed __version__ at package import level. |
| pyproject.toml | Enabled dynamic versioning via hatch-vcs and configured version-file generation. |
| _quarto.yml | Added CHANGELOG to documentation project and navigation. |
| README.md | Added badges and expanded step-by-step usage example. |
| CONTRIBUTING.md | Added detailed development tooling/infrastructure guidance. |
| CHANGELOG.md | Added release notes section for 3.0.0. |
| .github/workflows/docs-preview.yml | New workflow to build and deploy PR docs previews to Netlify. |
| .github/workflows/deploy.yml | Updated publishing workflow triggers to run on version tags. |
| .github/workflows/build.yml | Updated test workflow to generate XML coverage and upload to Codecov. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ## Code of Conduct | ||
|
|
||
| Please not that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. |
Copilot
AI
Feb 3, 2026
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.
Typo: “Please not that” should be “Please note that”.
| Please not that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. | |
| Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. |
| | Package | [](https://test.pypi.org/project/wordguess/) [](https://test.pypi.org/project/wordguess/) | | ||
| | Meta | [](CODE_OF_CONDUCT.md) [](LICENSE) | ||
| |Testing |[](https://github.com/UBC-MDS/wordguess/actions/workflows/build.yml) [](https://codecov.io/github/UBC-MDS/wordguess) | |
Copilot
AI
Feb 3, 2026
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.
The Markdown table is malformed: the “Meta” row is missing the trailing |, which breaks table rendering in many viewers. Add the closing pipe (and keep column alignment consistent with the other rows).
| # file generated by setuptools-scm | ||
| # don't change, don't track in version control |
Copilot
AI
Feb 3, 2026
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.
This version file header says it was generated by setuptools-scm and “don’t track in version control”, but this repo is configured for Hatch (hatch-vcs) and the file is committed in this PR. Update the header to reflect the actual tool/process, or stop committing the generated file and adjust runtime version retrieval accordingly.
| # file generated by setuptools-scm | |
| # don't change, don't track in version control | |
| # Version information for the wordguess package. | |
| # This file is maintained by the packaging/release process; do not edit by hand. |
| __version__ = version = '1.0.0.post1.dev60' | ||
| __version_tuple__ = version_tuple = (1, 0, 0, 'post1', 'dev60') | ||
|
|
||
| __commit_id__ = commit_id = None |
Copilot
AI
Feb 3, 2026
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.
__version__ is hard-coded to 1.0.0.post1.dev60, which will drift from the actual VCS/tag version and contradicts the intended 3.0.0 release. For dynamic versioning, ensure this module is generated during build from VCS metadata (or compute version at runtime via package metadata) so the installed package reports the correct version.
| from wordguess.get_result import get_result | ||
| from wordguess.get_score import get_score | ||
| from wordguess.result_to_pattern import result_to_pattern | ||
| from .__version__ import __version__ No newline at end of file |
Copilot
AI
Feb 3, 2026
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.
Importing __version__ from a generated module can make import wordguess fail in contexts where the version file hasn’t been generated yet (e.g., source checkouts/editable installs if the file isn’t committed). Consider using importlib.metadata.version("wordguess") (with a safe fallback) or ensure the version module is always present in source distributions.
| from .__version__ import __version__ | |
| try: | |
| from importlib.metadata import PackageNotFoundError, version | |
| except ImportError: | |
| # Fallback for very old Python versions without importlib.metadata | |
| __version__ = "0.0.0" | |
| else: | |
| try: | |
| __version__ = version("wordguess") | |
| except PackageNotFoundError: | |
| __version__ = "0.0.0" |
| result : list | ||
| A list containing the list of result. The result is a string | ||
| with characters '0', '1', and '2' representing different guess outcomes. |
Copilot
AI
Feb 3, 2026
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.
The docstring type for result was broadened to list, but the function signature is result: list[str] and the implementation requires a list of strings. Align the docstring with the actual expected type (e.g., “list[str]” / “list of str”) and tighten the wording (“list of result strings”).
| result : list | |
| A list containing the list of result. The result is a string | |
| with characters '0', '1', and '2' representing different guess outcomes. | |
| result : list[str] | |
| A list of result strings. Each string contains | |
| characters '0', '1', and '2' representing different guess outcomes. |
| - name: Upload coverage reports to Codecov | ||
| uses: codecov/codecov-action@v5 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} No newline at end of file |
Copilot
AI
Feb 3, 2026
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.
The Codecov upload step unconditionally references secrets.CODECOV_TOKEN, which is unavailable on PRs from forks and can cause CI failures. Gate this step behind a condition (e.g., only run when the secret is present / when the PR is from the same repo), or use tokenless uploads if the repository is public and supported by your Codecov setup.
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write |
Copilot
AI
Feb 3, 2026
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.
This workflow runs on pull_request while granting write permissions (contents: write, deployments: write) and executing PR-controlled code (pip install -e .[docs], quartodoc build, quarto render). That combination is risky because a malicious change in the PR could abuse the write-scoped GITHUB_TOKEN. Reduce default permissions to read-only and/or gate the deployment steps so they only run for same-repo PRs (not forks), or move the deployment portion to a safer event/approach (e.g., restricted workflow_dispatch or a carefully-audited pull_request_target + artifact flow).
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| if: github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read |
| TYPE_CHECKING = False | ||
| if TYPE_CHECKING: | ||
| from typing import Tuple | ||
| from typing import Union | ||
|
|
||
| VERSION_TUPLE = Tuple[Union[int, str], ...] | ||
| COMMIT_ID = Union[str, None] | ||
| else: | ||
| VERSION_TUPLE = object | ||
| COMMIT_ID = object | ||
|
|
Copilot
AI
Feb 3, 2026
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.
This statement is unreachable.
| TYPE_CHECKING = False | |
| if TYPE_CHECKING: | |
| from typing import Tuple | |
| from typing import Union | |
| VERSION_TUPLE = Tuple[Union[int, str], ...] | |
| COMMIT_ID = Union[str, None] | |
| else: | |
| VERSION_TUPLE = object | |
| COMMIT_ID = object | |
| from typing import Tuple | |
| from typing import Union | |
| VERSION_TUPLE = Tuple[Union[int, str], ...] | |
| COMMIT_ID = Union[str, None] |
This pull request introduces several infrastructure improvements, documentation enhancements, and codebase updates to support better development practices, automated versioning, and improved project visibility. The most significant changes are the addition of dynamic versioning with Hatch, new GitHub Actions workflows for code coverage and documentation previews, expanded documentation and badges, and updates to the
minidictdataset.Infrastructure and Automation:
hatch-vcs, including configuration inpyproject.tomland a generatedsrc/wordguess/__version__.pyfile to automatically track and expose the package version. [1] [2] [3] [4] [5] [6]main, supporting semantic versioning and manual dispatch.Documentation and Project Visibility:
README.mdfor TestPyPI version, build status, code quality, and documentation status, and improved installation and usage examples with a step-by-step tutorial. [1] [2]CHANGELOG.mdto the documentation site and navigation, and recorded new features and improvements for version 3.0.0. [1] [2] [3]CONTRIBUTING.mdwith a detailed section on development tools, GitHub infrastructure, organizational practices, and scaling recommendations for larger projects.Code and Dataset Updates:
minidictdataset to improve game variety. [1] [2]get_n_guesses.pyfor clarity and consistency, including parameter and error documentation. [1] [2] [3]