Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jmdots/0.1.1 #3

Merged
merged 2 commits into from
Dec 17, 2024
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
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
install-method: ["uv", "uvx"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Install dependencies with uv
if: matrix.install-method == 'uv'
run: |
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"

- name: Install globally with uvx
if: matrix.install-method == 'uvx'
run: |
uvx install -e ".[dev]"

- name: Run checks and tests
run: |
ruff check .
ruff format . --check
mypy src/mcp_server_make
pytest tests
env:
PYTHONPATH: ${{ github.workspace }}/src

verify-uvx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Build package
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
uv pip install build
python -m build

- name: Test uvx installation
run: |
uvx install dist/*.whl
# Verify the tool runs
mcp-server-make --help
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
release:
types: [published]

permissions:
contents: read
id-token: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Install build dependencies
run: uv pip install build twine

- name: Build package
run: python -m build

- name: Test wheel with uvx
run: |
uvx install dist/*.whl
mcp-server-make --help

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
32 changes: 31 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ version = "0.1.0"
description = "MCP Server for GNU Make"
readme = "README.md"
requires-python = ">=3.12"
license = "MIT"
keywords = ["mcp", "make", "build", "llm", "claude"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Libraries :: Python Modules",
]

dependencies = [
"mcp>=1.1.2",
"pydantic>=2.10.0",
Expand All @@ -13,18 +27,34 @@ dependencies = [
name = "Joshua M. Dotson"
email = "contact@jmdots.com"

[project.urls]
Homepage = "https://github.com/modelcontextprotocol/mcp-server-make"
Documentation = "https://github.com/modelcontextprotocol/mcp-server-make#readme"
Repository = "https://github.com/modelcontextprotocol/mcp-server-make.git"
Changelog = "https://github.com/modelcontextprotocol/mcp-server-make/blob/main/CHANGELOG.md"

[project.scripts]
mcp-server-make = "mcp_server_make:main"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build]
include = [
"src/**/*.py",
"README.md",
"LICENSE",
]

[tool.hatch.build.targets.wheel]
packages = ["src/mcp_server_make"]

[project.optional-dependencies]
dev = [
"ruff>=0.1.13",
"mypy>=1.8.0",
"pytest>=7.4.4",
"pytest-cov>=4.1.0",
"pytest-asyncio>=0.23.3",
]
]
9 changes: 8 additions & 1 deletion src/mcp_server_make/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
"""MCP Server for GNU Make."""

import asyncio

from . import exceptions
from . import make
from . import security
from . import execution
from . import handlers
from .server import main
from .server import main as async_main

__version__ = "0.1.0"
__all__ = ["main", "exceptions", "make", "security", "execution", "handlers"]


def main():
"""CLI entrypoint that runs the async main function."""
asyncio.run(async_main())
Loading