Skip to content

Conversation

@httpdss
Copy link
Owner

@httpdss httpdss commented Oct 27, 2025

This pull request updates the versioning approach for the struct Python package and refines the GitHub Actions workflow for publishing to PyPI. The most important changes are the adoption of dynamic version retrieval, a version bump, and workflow simplification.

Versioning Improvements

  • Updated the struct_module/__init__.py to dynamically retrieve the package version using importlib.metadata, falling back to "unknown" if the package is not installed. This replaces the previous hardcoded version string.
  • Changed the MCP server initialization in struct_module/mcp_server.py to use the dynamically retrieved __version__ instead of a hardcoded value.

Release Workflow Simplification

  • Removed the update-version job from .github/workflows/publish-pypi.yml, which previously updated the version in pyproject.toml on release events. The workflow now relies solely on manual dispatch and no longer automatically bumps the version on release. [1] [2]

Version Bump

  • Updated the package version in pyproject.toml from 1.0.0 to 2.8.1 to reflect the new release.

@httpdss httpdss requested a review from Copilot October 27, 2025 14:12
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 bumps the project version from 1.0.0 to 2.8.0 and streamlines the CI/CD workflow by removing automated version management logic. The changes consolidate version control to manual updates and remove the GitHub Actions job that previously automated version bumps on release events.

Key changes:

  • Version bumped from 1.0.0 to 2.8.0 across the codebase
  • Removed __version__ variable from the package's __init__.py
  • Simplified the PyPI publishing workflow to only support manual dispatch

Reviewed Changes

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

File Description
pyproject.toml Updated project version from 1.0.0 to 2.8.0
struct_module/mcp_server.py Updated FastMCP server version parameter to 2.8.0
struct_module/init.py Removed __version__ variable assignment
.github/workflows/publish-pypi.yml Removed automatic release trigger and version update job

@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.85%. Comparing base (890bbe0) to head (125ad42).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #120      +/-   ##
==========================================
+ Coverage   68.70%   68.85%   +0.14%     
==========================================
  Files          20       20              
  Lines        1553     1554       +1     
  Branches      279      279              
==========================================
+ Hits         1067     1070       +3     
+ Misses        411      409       -2     
  Partials       75       75              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@httpdss httpdss changed the title Bump version to 2.8.0 Bump version to 2.8.1 Oct 27, 2025
@httpdss httpdss added the patch label Oct 27, 2025
@httpdss httpdss requested a review from Copilot October 27, 2025 14: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

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

from importlib.metadata import version, PackageNotFoundError

try:
__version__ = version(__name__)
Copy link

Copilot AI Oct 27, 2025

Choose a reason for hiding this comment

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

The version(__name__) call will fail because __name__ resolves to 'struct_module', but the package name in pyproject.toml is 'struct'. Change version(__name__) to version('struct') to match the package name.

Suggested change
__version__ = version(__name__)
__version__ = version('struct')

Copilot uses AI. Check for mistakes.
[project]
name = "struct"
version = "1.0.0"
version = "2.8.1"
Copy link

Copilot AI Oct 27, 2025

Choose a reason for hiding this comment

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

The PR title mentions version 2.8.1, but the description states the version was updated to 2.8.0. The pyproject.toml correctly shows 2.8.1, which matches the PR title. Consider updating the PR description to reflect the accurate version number (2.8.1) to avoid confusion.

Copilot uses AI. Check for mistakes.
@httpdss httpdss merged commit 70173c5 into main Oct 27, 2025
5 checks passed
@httpdss httpdss deleted the bump-version-280 branch October 27, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants