Skip to content

CI job to publish to PyPI#19

Merged
ejfine merged 20 commits intomainfrom
pypi-publish
May 2, 2025
Merged

CI job to publish to PyPI#19
ejfine merged 20 commits intomainfrom
pypi-publish

Conversation

@ejfine
Copy link
Contributor

@ejfine ejfine commented May 2, 2025

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

@ejfine ejfine requested a review from Copilot May 2, 2025 14:38
@ejfine ejfine self-assigned this May 2, 2025
Copy link

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 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
Copy link

Copilot AI May 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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

Copilot uses AI. Check for mistakes.
@ejfine ejfine merged commit f0c3746 into main May 2, 2025
8 checks passed
@ejfine ejfine deleted the pypi-publish branch May 2, 2025 14:42
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