Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 19, 2025

  • Fix GitHub Actions workflow to checkout the correct ref when triggered by tag push
  • Update ci.yml checkout step to include ref: ${{ github.ref }} to ensure tags are checked out correctly
  • Add git reset after pre-commit step to clean up uncommitted formatting changes
  • Update CHANGELOG.md to document both fixes
Original prompt

This section details on the original issue you should resolve

<issue_title>Pypi version isn't clean</issue_title>
<issue_description>https://github.com/AccelerationConsortium/progressive-automations-python/actions/runs/19488059054/job/55774538681

Has a post dev0 at the end of the normal v0.1.* pattern. Should be able to just make a new release on GitHub UI to trigger the publish, without any post or dev appended</issue_description>

<agent_instructions>I've been creating new tags using the new release mechanism in the GitHub UI</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits November 19, 2025 03:05
Add explicit ref parameter to checkout step to ensure tags are checked
out correctly. This prevents setuptools_scm from generating .postX.devY
versions when creating releases via GitHub UI.

Co-authored-by: sgbaird <45469701+sgbaird@users.noreply.github.com>
Co-authored-by: sgbaird <45469701+sgbaird@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix PyPI versioning to remove post and dev tags Fix PyPI version suffixes when creating GitHub releases Nov 19, 2025
Copilot AI requested a review from sgbaird November 19, 2025 03:09
Copilot finished work on behalf of sgbaird November 19, 2025 03:09
@sgbaird
Copy link
Member

sgbaird commented Nov 19, 2025

@copilot Btw, it might have to do with me allowing things to continue, even if the linting checks don't pass. I.e., there are uncommitted files.

I.e., the prepare step being allowed to continue on error

Copy link
Contributor Author

Copilot AI commented Nov 19, 2025

@copilot Btw, it might have to do with me allowing things to continue, even if the linting checks don't pass. I.e., there are uncommitted files.

I.e., the prepare step being allowed to continue on er...

You're absolutely right! The pre-commit step with continue-on-error: true was leaving uncommitted formatting changes in the working directory. When setuptools_scm runs the build, it detects these uncommitted changes and treats the repo as "dirty", adding the .post1.dev0 suffix.

My fix of adding ref: ${{ github.ref }} ensures we checkout the correct tag, but doesn't address the dirty repo issue. The better solution is to run the build step in isolation from the pre-commit changes. I'll add git reset --hard HEAD after the pre-commit step to ensure the repository is clean before building.

This way, linting failures won't affect the version number, and we'll get clean releases like 0.1.3 when building from tags.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/AccelerationConsortium/progressive-automations-python/actions/jobs/55774450249/logs
    • Triggering command: curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI and others added 2 commits November 19, 2025 03:18
Pre-commit failures with continue-on-error leave uncommitted changes,
causing setuptools_scm to detect a dirty repo and add .postN.devM
suffixes. Reset the working directory after linting to ensure the
build runs on a clean repository state.

Co-authored-by: sgbaird <45469701+sgbaird@users.noreply.github.com>
Co-authored-by: sgbaird <45469701+sgbaird@users.noreply.github.com>
@sgbaird sgbaird marked this pull request as ready for review November 19, 2025 03:21
Copilot AI review requested due to automatic review settings November 19, 2025 03:21
Copilot finished work on behalf of sgbaird November 19, 2025 03:22
Copilot finished reviewing on behalf of sgbaird November 19, 2025 03:23
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 fixes PyPI version generation to produce clean semantic version numbers (e.g., 0.1.3) instead of versions with unwanted suffixes (e.g., 0.1.3.post1.dev0) when creating releases via the GitHub UI.

Key Changes:

  • Added git reset --hard HEAD after the pre-commit linting step to ensure a clean repository state before building packages
  • Explicitly specified ref: ${{ github.ref }} in the checkout action to ensure tags are checked out correctly

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/ci.yml Added git reset command to clean up linting changes before package build, ensuring setuptools_scm generates clean version numbers; explicitly specified checkout ref for tag handling
CHANGELOG.md Documented the fix for PyPI version suffixes, explaining both the checkout and git reset changes

@sgbaird sgbaird merged commit a8fb31b into main Nov 19, 2025
11 checks passed
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.

Pypi version isn't clean

2 participants