Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: publish-pypi

on:
release:
types: [published]
workflow_dispatch:
inputs:
upload:
Expand All @@ -11,38 +9,7 @@ on:
default: 'true'

jobs:
update-version:
runs-on: ubuntu-latest
permissions:
contents: write
if: github.event_name == 'release'

steps:
- uses: actions/checkout@v5
with:
ref: main

- name: Extract version from tag
id: version
run: |
VERSION=${{ github.event.release.tag_name }}
VERSION=${VERSION#v} # Remove 'v' prefix if present
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Update pyproject.toml
run: |
sed -i 's/version = "[^"]*"/version = "${{ steps.version.outputs.version }}"/' pyproject.toml

- name: Commit and push version update
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add pyproject.toml
git commit -m "chore: bump version to ${{ steps.version.outputs.version }}"
git push origin main

build:
needs: update-version
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[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.
description = "A structured data processing tool"
readme = "README.md"
license = {text = "MIT"}
Expand Down
8 changes: 6 additions & 2 deletions struct_module/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# Struct Module
__version__ = '1.0.0'
from importlib.metadata import version, PackageNotFoundError

try:
__version__ = version('struct')
except PackageNotFoundError:
__version__ = "unknown"
3 changes: 2 additions & 1 deletion struct_module/mcp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@

from struct_module.commands.generate import GenerateCommand
from struct_module.commands.validate import ValidateCommand
from struct_module import __version__


class StructMCPServer:
"""FastMCP-based MCP Server for struct tool operations."""

def __init__(self):
self.app = FastMCP("struct-mcp-server", version="1.0.0")
self.app = FastMCP("struct-mcp-server", version=__version__)
self.logger = logging.getLogger(__name__)
self._register_tools()

Expand Down
Loading