Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds continuous integration steps to publish the package to PyPI and updates associated configuration files. Key changes include updating typo-check configurations, adding a git tag publication script, and adjusting workflow context versions.
Reviewed Changes
Copilot reviewed 8 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| template/_typos.toml and _typos.toml | Update typo-checker configuration to ignore specific spellchecker annotations. |
| template/.github/workflows/hash_git_files.py and .github/workflows/hash_git_files.py | Enhance devcontainer hash line handling by adding a suffix to ignore spellchecker comments. |
| template/.github/workflows/git_tag.py | Add a reference to the git tag script in the CI workflows. |
| src/git_tag.py | Introduce a new script to extract the version from pyproject.toml and handle git tagging. |
| extensions/context.py | Add new context keys for PyPI publication and sleep functionality. |
| .copier-answers.yml | Bump the copier template commit version. |
Files not reviewed (3)
- .devcontainer/devcontainer.json: Language not supported
- template/.github/workflows/publish.yaml.jinja: Language not supported
- template/README.md.jinja: Language not supported
| stdout=subprocess.DEVNULL, | ||
| stderr=subprocess.DEVNULL, | ||
| ) | ||
| raise Exception(f"Error: tag '{tag}' exists on remote '{remote}'") # noqa: TRY002,TRY003 # not worth a custom exception |
There was a problem hiding this comment.
[nitpick] Consider using a custom exception for tag collision errors instead of a generic Exception to improve error clarity and allow for more specific handling.
Suggested change
| raise Exception(f"Error: tag '{tag}' exists on remote '{remote}'") # noqa: TRY002,TRY003 # not worth a custom exception | |
| raise TagCollisionError(f"Error: tag '{tag}' exists on remote '{remote}'") # noqa: TRY002,TRY003 |
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.
Why is this change necessary?
Need to publish to pypi
How does this change address the issue?
Adds CI steps to do that
What side effects does this change have?
Publishing to Code Artifact needs to be fixed
How is this change tested?
Downstream repo
Other