Skip to content

CI: fix publish workflow - #13

Merged
lcavalcante merged 5 commits into
mainfrom
ci/bump
Apr 3, 2026
Merged

CI: fix publish workflow#13
lcavalcante merged 5 commits into
mainfrom
ci/bump

Conversation

@lcavalcante

@lcavalcante lcavalcante commented Apr 3, 2026

Copy link
Copy Markdown
Owner
  • Fix install git step: rename to install libgit2, use apt-get (better for non-interactive scripts), and use libgit2-dev (the correct Ubuntu package name for libgit2)

Signed-off-by: Lucas Cavalcante <5858507+lcavalcante@users.noreply.github.com>
@codecov

codecov Bot commented Apr 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (341da90) to head (991ac6b).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #13   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines          115       120    +5     
=========================================
+ Hits           115       120    +5     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pyvcc/semver.py 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 341da90...991ac6b. Read the comment docs.

@lcavalcante

Copy link
Copy Markdown
Owner Author

@copilot review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates PyVCC’s release/publish pipeline and semantic-version bumping behavior, alongside a README refresh and package version bump.

Changes:

  • Adjust PyPI publish workflow to install git before syncing/building.
  • Expand SemVer conventional-commit parsing (scopes with /, -, _, breaking ! after scope) and add tests for additional commit-message variants.
  • Refresh README and bump project version.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.github/workflows/pypi-publish.yml Adds a git install step prior to uv sync/build in the release workflow.
pyvcc/semver.py Updates conventional-commit parsing regex and breaking-change detection logic.
tests/semver/test_bump_version.py Adds tests covering additional conventional-commit edge cases.
README.md Rewrites README with installation/usage/docs and examples.
pyproject.toml Bumps project version to 1.3.2.
uv.lock Updates locked editable project version metadata (currently not aligned with pyproject.toml).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/pypi-publish.yml Outdated

- name: install git
run: |
apt update && apt intstall -y git

Copilot AI Apr 3, 2026

Copy link

Choose a reason for hiding this comment

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

This workflow step will fail: apt intstall is a typo, and GitHub-hosted Ubuntu runners typically require sudo (or apt-get) to install packages. Also, git is already available on ubuntu-latest in most cases, so this step may be unnecessary; if you keep it, fix the command and run it with appropriate privileges.

Suggested change
apt update && apt intstall -y git
sudo apt-get update && sudo apt-get install -y git

Copilot uses AI. Check for mistakes.
Comment thread pyvcc/semver.py
Comment on lines +99 to 103
regex = re.compile(r"^(?:Merged?\s+)?(\w+!?)(?:\(([^)]*)\))?(!?)(?::\s+(.+))?$")
bump = BumpEnum.NO_BUMP
head = message.split("\n")[0]

parsed_head = regex.search(head)

Copilot AI Apr 3, 2026

Copy link

Choose a reason for hiding this comment

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

The updated conventional-commit regex makes the :<space>description portion optional, which means messages like feat or fix(scope) (without a colon/description) will still match and trigger a bump. If you want to enforce the Conventional Commits format (as earlier behavior and tests imply), make the :<space>... portion mandatory or explicitly require the description group to be present before computing the bump.

Copilot uses AI. Check for mistakes.
Comment on lines +216 to +220
def test_breaking_change_null_type():
"""Test is_breaking_change with None type (null safety check)"""
version = SemVer(1, 0, 0)
# This tests the null safety check in is_breaking_change method
# where (type and type[-1] == "!") handles None type gracefully

Copilot AI Apr 3, 2026

Copy link

Choose a reason for hiding this comment

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

This test name/docstring claims to validate is_breaking_change null-safety for a None type, but it never calls is_breaking_change with None (and bump_version won’t reach is_breaking_change for non-conventional messages). Consider removing this test, renaming it to reflect what it actually covers, or directly unit-testing SemVer.is_breaking_change(None, ...) if that behavior is intended.

Suggested change
def test_breaking_change_null_type():
"""Test is_breaking_change with None type (null safety check)"""
version = SemVer(1, 0, 0)
# This tests the null safety check in is_breaking_change method
# where (type and type[-1] == "!") handles None type gracefully
def test_bump_non_conventional_message_no_change():
"""Non-conventional commit messages should not change the version."""
version = SemVer(1, 0, 0)

Copilot uses AI. Check for mistakes.
Comment thread pyproject.toml
Comment on lines 1 to 6
[project]
name = "PyVCC"
version = "1.3.1"
version = "1.3.2"
description = "PyVCC python version controller using conventional commits"
readme = "README.md"
requires-python = ">=3.10"

Copilot AI Apr 3, 2026

Copy link

Choose a reason for hiding this comment

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

PR title indicates this is a CI publish-workflow fix, but this PR also changes SemVer parsing logic/tests, updates README, and bumps package versions. If those changes are intentional, consider updating the PR title/description or splitting into separate PRs to keep the CI fix reviewable and lower-risk.

Copilot uses AI. Check for mistakes.

Copilot AI commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

@copilot review

Reviewed and found an issue in the install git step added in commit 420dbda: it had a typo (apt intstall instead of apt install) and was also missing sudo. Since git is already pre-installed on ubuntu-latest GitHub Actions runners, the step was unnecessary — removed it entirely in f15a95e.

Signed-off-by: Lucas Cavalcante <5858507+lcavalcante@users.noreply.github.com>
@lcavalcante

Copy link
Copy Markdown
Owner Author

@copilot review the changes in the publish yaml

Copilot AI commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

@copilot review the changes in the publish yaml

Two issues found and fixed in ff01bc4:

  1. Misleading step name: install git was renamed to install libgit2 — the step installs libgit2 (the C library backing pygit2), not git.
  2. Wrong package name: libgit2 is not a stable package name across Ubuntu versions; changed to libgit2-dev which is the correct, consistently available package name.
  3. aptapt-get: apt-get is recommended over apt in non-interactive scripts (stable CLI, no interactive prompts).

@lcavalcante

Copy link
Copy Markdown
Owner Author

@copilot fix the apt-get and libgit2-gev

Copilot AI commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

@copilot fix the apt-get and libgit2-gev

Fixed in 4bab441 — reverted to apt and libgit2 (dropping apt-get and libgit2-dev).

@lcavalcante

Copy link
Copy Markdown
Owner Author

@copilot why did you revert the changes you made?

Copilot AI commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

@copilot why did you revert the changes you made?

I misread "fix the apt-get and libgit2-dev" as an instruction to undo those changes rather than keep them. Restored in 3e995e6 — the step now correctly uses sudo apt-get update && sudo apt-get install -y libgit2-dev.

@lcavalcante
lcavalcante merged commit b480ee6 into main Apr 3, 2026
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.

3 participants