Skip to content

Commit 5cfb54e

Browse files
committed
Bump Version to 0.0.1
1 parent 5b1a78d commit 5cfb54e

File tree

5 files changed

+118
-111
lines changed

5 files changed

+118
-111
lines changed

.github/workflows/publish.yaml

Lines changed: 84 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,84 @@
1-
#name: Publish (PyPI)
2-
#
3-
#on:
4-
# release:
5-
# types: [published]
6-
# workflow_dispatch:
7-
#
8-
#jobs:
9-
# build-publish:
10-
# runs-on: ubuntu-latest
11-
# permissions:
12-
# id-token: write
13-
# contents: read
14-
# steps:
15-
# - uses: actions/checkout@v4
16-
# - uses: astral-sh/setup-uv@v5
17-
# with:
18-
# version: "latest"
19-
# python-version: "3.11"
20-
# - run: uv venv
21-
# - run: uv pip install -e .[dev]
22-
# - run: uv run pytest -q
23-
# - run: uv build
24-
# - name: Verify package
25-
# run: uv run --with twine twine check dist/*
26-
# - name: Publish to PyPI
27-
# uses: pypa/gh-action-pypi-publish@release/v1
28-
# with:
29-
# print-hash: true
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
push:
7+
tags:
8+
- "v*"
9+
workflow_dispatch: # Allow manual triggering
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
environment:
15+
name: pypi
16+
url: https://pypi.org/p/mcpstack_mimic
17+
permissions:
18+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
19+
contents: read
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Set up uv
25+
uses: astral-sh/setup-uv@v5
26+
with:
27+
version: "latest"
28+
python-version: "3.11"
29+
30+
- name: Resolve version
31+
id: get_version
32+
run: |
33+
set -euo pipefail
34+
if [[ "${GITHUB_REF:-}" == refs/tags/* ]]; then
35+
VERSION="${GITHUB_REF#refs/tags/}"
36+
VERSION="${VERSION#v}"
37+
FROM=tag
38+
else
39+
VERSION=$(python -c "import re,pathlib; p=pathlib.Path('src/mcpstack_mimic/__init__.py'); m=re.search(r'__version__\\s*=\\s*\"([^\"]+)\"', p.read_text()); print(m.group(1) if m else '')")
40+
FROM=init
41+
if [[ -z "$VERSION" ]]; then
42+
echo "::error ::Could not determine version from src/mcpstack_mimic/__init__.py"; exit 1
43+
fi
44+
fi
45+
echo "from=$FROM" >> "$GITHUB_OUTPUT"
46+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
47+
echo "Publishing version: $VERSION (source: $FROM)"
48+
49+
- name: Verify version consistency
50+
run: |
51+
set -euo pipefail
52+
INIT_VER=$(grep -Po '__version__\s*=\s*"\K[^"]+' src/mcpstack_mimic/__init__.py)
53+
echo "__init__ version: $INIT_VER"
54+
echo "resolved version: ${{ steps.get_version.outputs.version }}"
55+
if [[ "${GITHUB_REF:-}" == refs/tags/* ]]; then
56+
# If triggered by a tag/release, require that the tag matches the version in __init__.py
57+
if [[ "$INIT_VER" != "${{ steps.get_version.outputs.version }}" ]]; then
58+
echo "::error ::Version mismatch: tag ${{ steps.get_version.outputs.version }} != src/mcpstack_mimic/__init__.py $INIT_VER";
59+
exit 1
60+
fi
61+
fi
62+
63+
- name: Lock dependencies
64+
run: uv lock --locked
65+
66+
- name: Sync dependencies including dev
67+
run: uv sync --all-groups
68+
69+
- name: Run quick tests
70+
run: |
71+
uv add pytest==7.4.3
72+
uv add pytest-asyncio
73+
uv run pytest tests/ -v --tb=short
74+
75+
- name: Build package
76+
run: uv build
77+
78+
- name: Verify package
79+
run: uv run --with twine twine check dist/*
80+
81+
- name: Publish to PyPI
82+
uses: pypa/gh-action-pypi-publish@release/v1
83+
with:
84+
print-hash: true

README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,24 @@
2727
2828
## <a id="about-the-project"></a>💡 About The MCPStack MIMIC Tool
2929

30-
`MCPStack MIMIC` is an MCP tool that connects the **MIMIC-IV clinical database** (with either SQLite or BigQuery backends)
30+
`MCPStack MIMIC` is an MCP tool that connects the **MIMIC-IV clinical database** (with either SQLite or BigQuery backends)
3131
into your **MCPStack pipelines**.
3232

3333
In layman's terms:
34-
* MIMIC-IV is a large, de-identified database of ICU patient records, commonly used for healthcare research.
35-
* This tool makes that dataset accessible to an LLM in a controlled way.
34+
* MIMIC-IV is a large, de-identified database of ICU patient records, commonly used for healthcare research.
35+
* This tool makes that dataset accessible to an LLM in a controlled way.
3636
* It provides actions like *listing available tables*, *showing table structure with sample data*, and *running queries*; all exposed through MCP so your model can reason with healthcare data securely.
3737

3838
### What is MCPStack, in layman's terms?
3939

40-
The **Model Context Protocol (MCP)** standardises how tools talk to large language models.
41-
`MCPStack` is the orchestrator: it lets you **stack multiple MCP tools together** into a pipeline and then expose them
42-
inside an LLM environment (like Claude Desktop).
40+
The **Model Context Protocol (MCP)** standardises how tools talk to large language models.
41+
`MCPStack` is the orchestrator: it lets you **stack multiple MCP tools together** into a pipeline and then expose them
42+
inside an LLM environment (like Claude Desktop).
4343

4444
Think of it like **scikit-learn pipelines, but for LLMs**:
4545

46-
* In scikit-learn: you chain `preprocessors`, `transformers`, `estimators`.
47-
* In MCPStack: you chain MCP tools (like MIMIC, Jupyter Notebook MCP, etc).
46+
* In scikit-learn: you chain `preprocessors`, `transformers`, `estimators`.
47+
* In MCPStack: you chain MCP tools (like MIMIC, Jupyter Notebook MCP, etc).
4848

4949

5050
>[!IMPORTANT]
@@ -58,7 +58,7 @@ Think of it like **scikit-learn pipelines, but for LLMs**:
5858

5959
## Installation
6060

61-
You can install the MIMIC tool as a standalone package. Thanks to `pyproject.toml` entry points, MCPStack
61+
You can install the MIMIC tool as a standalone package. Thanks to `pyproject.toml` entry points, MCPStack
6262
will auto-discover it.
6363

6464
### PyPI Installation Via `UV`
@@ -75,10 +75,10 @@ pip install mcpstack-mimic
7575

7676
### Install pre-commit hooks (optional, for development)
7777

78-
```bash
78+
```bash
7979
uv run pre-commit install
8080
# or pip install pre-commit
81-
```
81+
```
8282

8383
### Run Unit Tests (optional, for development)
8484

@@ -183,7 +183,7 @@ pipeline = (
183183
backends=[
184184
SQLiteBackend("<path_to_your_mimic.db>") # SQLite backend with local MIMIC-IV database
185185
])
186-
# Here you can add as many as new `.with_tool(.)` of interest to play with.
186+
# Here you can add as many as new `.with_tool(.)` of interest to play with.
187187
).build(
188188
type="fastmcp",
189189
save_path="my_mimic_pipeline.json",
@@ -204,4 +204,3 @@ pipeline = (
204204
🔐 License
205205

206206
MIT — see **[LICENSE](LICENSE)**.
207-

pyproject.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "pdm.backend"
44

55
[project]
66
name = "mcpstack-mimic"
7-
version = "0.1.0"
7+
dynamic = ["version"]
88
description = "MIMIC-IV MCPStack tool (standalone package) with pluggable SQLite/BigQuery backends."
99
readme = "README.md"
1010
requires-python = ">=3.10"
@@ -33,7 +33,7 @@ dependencies = [
3333
"thefuzz>=0.22.1",
3434
"rich-pyfiglet>=0.1.4",
3535
"click==8.1.8",
36-
"mcpstack",
36+
"mcpstack>=0.0.2",
3737
]
3838

3939
[dependency-groups]
@@ -55,6 +55,10 @@ mimic = "mcpstack_mimic.tools.mimic.mimic:MIMIC"
5555
[project.entry-points."mcpstack.tool_clis"]
5656
mimic = "mcpstack_mimic.tools.mimic.cli:MimicCLI.get_app"
5757

58+
[tool.pdm.version]
59+
source = "file"
60+
path = "src/mcpstack_mimic/__init__.py"
61+
5862
[tool.ruff]
5963
line-length = 88
6064
target-version = "py310"
@@ -67,6 +71,3 @@ ignore = ["E501"]
6771
[tool.pytest.ini_options]
6872
testpaths = ["tests"]
6973
python_files = ["test_*.py"]
70-
71-
[tool.uv.sources]
72-
mcpstack = { path = "../MCPStack" }

src/mcpstack_mimic/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
__version__ = "0.0.1"
2+
__all__ = ["__version__"]

uv.lock

Lines changed: 14 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)