Skip to content

Version dev#3365

Merged
winglian merged 3 commits into
mainfrom
version-dev
Jan 21, 2026
Merged

Version dev#3365
winglian merged 3 commits into
mainfrom
version-dev

Conversation

@winglian

@winglian winglian commented Jan 20, 2026

Copy link
Copy Markdown
Collaborator

Description

Motivation and Context

How has this been tested?

AI Usage Disclaimer

Screenshots (if appropriate)

Types of changes

Social Handles (Optional)

Summary by CodeRabbit

  • Chores
    • Refactored package version management infrastructure. Version is now centrally tracked in a dedicated VERSION file instead of being hardcoded across multiple configuration files. Build system and CI/CD workflows updated to read version from this unified source.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

The PR refactors package version management by moving the version string from src/axolotl/__init__.py to a new VERSION file, updating the build system configuration to read version dynamically, and modifying the CI workflow to populate the VERSION file during releases.

Changes

Cohort / File(s) Summary
Version file and build configuration
VERSION, pyproject.toml, setup.py
Created new VERSION file with content 0.14.0.dev0; added [tool.setuptools.dynamic] section to pyproject.toml to source version from file; refactored get_package_version() in setup.py to read from VERSION file instead of parsing __init__.py with AST.
CI/CD workflow
.github/workflows/pypi.yml
Updated workflow step to write package version to VERSION file (echoing tag name minus leading 'v') instead of in-place modifying setup.py.
Package metadata cleanup
src/axolotl/__init__.py
Removed __version__ module attribute previously set to 0.13.1.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Version dev' is vague and generic, using non-descriptive terms that don't clearly convey what changed in the changeset. Use a more descriptive title that specifies the main change, such as 'Switch to VERSION file for dynamic version management' or 'Migrate version management to VERSION file'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/pypi.yml (1)

47-49: Deprecated set-output syntax.

The ::set-output command has been deprecated by GitHub Actions. Consider using the new environment file syntax instead.

Suggested fix
       - name: Extract tag name
         id: tag
-        run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3)
+        run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
🤖 Fix all issues with AI agents
In @.github/workflows/pypi.yml:
- Around line 51-53: The "Update version in VERSION file" step currently uses
echo "${{ steps.tag.outputs.TAG_NAME }}" | sed -e's/v//g' > VERSION which
removes all 'v' characters; change the sed expression to only strip a leading
'v' (e.g., use a pattern like s/^v//) so TAG_NAME (from
steps.tag.outputs.TAG_NAME) is written to VERSION without removing internal 'v'
characters.

Comment on lines +51 to +53
- name: Update version in VERSION file
run: |
sed -i -E 's/version="([0-9.]+)",/version="${{ steps.tag.outputs.TAG_NAME }}",/g' setup.py
echo "${{ steps.tag.outputs.TAG_NAME }}" | sed -e's/v//g' > VERSION

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

The sed pattern may incorrectly strip 'v' from anywhere in the version string.

Using sed -e's/v//g' removes all occurrences of 'v', not just the leading one. If a tag like v1.0.0-preview is used, this would produce 1.0.0-preiew.

Suggested fix to strip only the leading 'v'
       - name: Update version in VERSION file
         run: |
-          echo "${{ steps.tag.outputs.TAG_NAME }}" | sed -e's/v//g' > VERSION
+          echo "${{ steps.tag.outputs.TAG_NAME }}" | sed 's/^v//' > VERSION
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Update version in VERSION file
run: |
sed -i -E 's/version="([0-9.]+)",/version="${{ steps.tag.outputs.TAG_NAME }}",/g' setup.py
echo "${{ steps.tag.outputs.TAG_NAME }}" | sed -e's/v//g' > VERSION
- name: Update version in VERSION file
run: |
echo "${{ steps.tag.outputs.TAG_NAME }}" | sed 's/^v//' > VERSION
🤖 Prompt for AI Agents
In @.github/workflows/pypi.yml around lines 51 - 53, The "Update version in
VERSION file" step currently uses echo "${{ steps.tag.outputs.TAG_NAME }}" | sed
-e's/v//g' > VERSION which removes all 'v' characters; change the sed expression
to only strip a leading 'v' (e.g., use a pattern like s/^v//) so TAG_NAME (from
steps.tag.outputs.TAG_NAME) is written to VERSION without removing internal 'v'
characters.

@codecov

codecov Bot commented Jan 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/axolotl/__init__.py 60.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@winglian winglian merged commit 8ab9d9e into main Jan 21, 2026
19 checks passed
@winglian winglian deleted the version-dev branch January 21, 2026 03:58
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.

1 participant