Conversation
There was a problem hiding this comment.
Pull request overview
This PR cleans up a small Python utility repo by replacing several interactive/demo scripts with importable functions/classes, then adding basic project scaffolding around them (tests, packaging metadata, docs, and GitHub automation).
Changes:
- Refactors legacy scripts into reusable modules (
roman_to_int,find_max,number_to_words,Dice,build_sigma,emojify_text) and removes older typo-named files. - Adds a basic pytest suite plus packaging/config files (
pyproject.toml,requirements.txt, pre-commit, CI, release workflow). - Adds repository documentation and community files (README, changelog, contributing docs, templates, CODEOWNERS, license).
Reviewed changes
Copilot reviewed 24 out of 26 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_basic.py |
Adds smoke tests for the newly refactored utilities. |
symbol_to_emoji.py |
Introduces a reusable emoji-mapping module. |
simble_to_emojy.py |
Removes the old typo-named interactive emoji script. |
sigma.py |
Replaces print-based logic with a testable helper function. |
roll_dise.py |
Removes the old typo-named dice script. |
roll_dice.py |
Adds a class-based dice utility. |
requirements.txt |
Adds pytest as a test dependency. |
README.md |
Rewrites the project overview and setup instructions. |
pyproject.toml |
Adds package metadata and pytest configuration. |
numbr to ch.py |
Removes the old number-to-words script variant. |
number_to_words.py |
Adds a reusable digit-to-words helper. |
max_number.py |
Converts the old print-based max finder into a function. |
LICENSE |
Adds an MIT license file. |
from_roman_to_english.py |
Refactors Roman numeral conversion into a callable function. |
CONTRIBUTING.md |
Adds contributor guidance and local test steps. |
CODE_OF_CONDUCT.md |
Adds a basic code of conduct reference. |
CHANGELOG.md |
Starts a changelog for the cleanup work. |
.pre-commit-config.yaml |
Adds formatting/linting hooks. |
.gitignore |
Adds standard Python and editor ignore rules. |
.github/workflows/release.yml |
Adds tag-triggered release automation. |
.github/workflows/python-ci.yml |
Adds multi-version Python test CI. |
.github/pull_request_template.md |
Adds a PR template. |
.github/ISSUE_TEMPLATE/feature_request.md |
Adds a feature request template. |
.github/ISSUE_TEMPLATE/bug_report.md |
Adds a bug report template. |
.github/dependabot.yml |
Enables weekly pip dependency checks. |
.github/CODEOWNERS |
Adds repository ownership metadata. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
|
|
||
| def emojify(tokens: list[str]) -> str: |
| """Simple six-sided dice roller.""" | ||
|
|
||
| def roll(self, count: int = 2) -> tuple[int, ...]: | ||
| """Roll `count` six-sided dice and return a tuple of results.""" |
Comment on lines
+11
to
+12
| if not numbers: | ||
| raise ValueError("numbers must not be empty") |
| readme = "README.md" | ||
| requires-python = ">=3.8" | ||
| license = { text = "MIT" } | ||
| authors = [ { name = "Your Name", email = "you@example.com" } ] |
| @@ -0,0 +1,2 @@ | |||
| # CODEOWNERS: set the repository owners who should be requested for review | |||
| * @YOUR_GITHUB_USERNAME | |||
| @@ -0,0 +1,21 @@ | |||
| MIT License | |||
|
|
|||
| Copyright (c) 2026 Your Name | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor scripts, add tests, CI, and docs.