Skip to content

Commit cfd0b32

Browse files
committed
fix ci docker img name
1 parent 0ad5be3 commit cfd0b32

File tree

6 files changed

+66
-21
lines changed

6 files changed

+66
-21
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ jobs:
100100
source venv/bin/activate
101101
pytest -m integration -v
102102
103-
docker:
104-
name: Build and Push Docker Image
103+
docker-deploy:
104+
name: Build and Push Deployment Image
105105
runs-on: ubuntu-latest
106106
needs: [lint, actionlint, test]
107107
if: github.event_name == 'push' && github.ref == 'refs/heads/master' || github.event_name == 'release'
@@ -111,6 +111,8 @@ jobs:
111111
steps:
112112
- name: Checkout code
113113
uses: actions/checkout@v4
114+
with:
115+
submodules: recursive
114116

115117
- name: Install Podman
116118
run: |
@@ -125,16 +127,14 @@ jobs:
125127
id: slug
126128
run: echo "SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)" >> "$GITHUB_OUTPUT"
127129

128-
- name: Build and push container image
130+
- name: Build and push deployment image
129131
run: |
130-
# Build the image
131132
GITHUB_REPOSITORY="$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')"
132-
podman build -t "ghcr.io/${GITHUB_REPOSITORY}/vtk-mcp:latest" \
133+
podman build -f deploy.Dockerfile \
134+
-t "ghcr.io/${GITHUB_REPOSITORY}/vtk-mcp:latest" \
133135
-t "ghcr.io/${GITHUB_REPOSITORY}/vtk-mcp:${{ github.sha }}" \
134136
-t "ghcr.io/${GITHUB_REPOSITORY}/vtk-mcp:${{ steps.slug.outputs.SHORT_SHA }}" \
135137
.
136-
137-
# Push all tags
138138
podman push "ghcr.io/${GITHUB_REPOSITORY}/vtk-mcp:latest"
139139
podman push "ghcr.io/${GITHUB_REPOSITORY}/vtk-mcp:${{ github.sha }}"
140140
podman push "ghcr.io/${GITHUB_REPOSITORY}/vtk-mcp:${{ steps.slug.outputs.SHORT_SHA }}"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ wheels/
2525
*.egg
2626
MANIFEST
2727

28+
# Auto-generated version file
29+
src/vtk_mcp_server/_version.py
30+
2831
# PyInstaller
2932
*.manifest
3033
*.spec

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,5 +196,33 @@ pytest -k "test_name" # Run tests matching pattern
196196
- `tests/test_stdio_integration.py` - Full integration tests with stdio transport
197197
- `tests/conftest.py` - Shared test fixtures and configuration
198198

199+
## Release Process
200+
201+
The package version is automatically determined from git tags using `hatch-vcs`.
202+
203+
### Creating a Release
204+
205+
```bash
206+
# 1. Ensure all changes are committed
207+
git status
208+
209+
# 2. Create and push a new tag
210+
git tag -a v0.2.0 -m "Release v0.2.0"
211+
git push origin v0.2.0
212+
213+
# 3. Build the package
214+
pip install build hatch-vcs twine
215+
python -m build
216+
217+
# 4. Check the package
218+
twine check dist/*
219+
220+
# 5. Upload to PyPI (or TestPyPI first)
221+
twine upload dist/*
222+
# For TestPyPI: twine upload --repository testpypi dist/*
223+
```
224+
225+
The version will be automatically set based on the git tag.
226+
199227
## Authors
200228
- Vicente Bolea @ Kitware

deploy.Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
2626
RUN apt update && \
2727
apt install --no-install-recommends --no-install-suggests -y \
2828
libgl1-mesa-dev \
29-
libxrender-dev/stable && \
29+
libxrender-dev/stable \
30+
git && \
3031
rm -rf /var/lib/apt/lists/*
3132

3233
WORKDIR /app
@@ -40,9 +41,6 @@ COPY --from=embeddings /app/db /app/db
4041
# Install Python dependencies (including RAG dependencies)
4142
RUN pip install --upgrade pip && \
4243
pip install --verbose . && \
43-
pip install -r rag-components/requirements.txt
44-
45-
EXPOSE 8000
4644

4745
# Start server with database path configured
4846
CMD ["vtk-mcp-server", "--transport", "http", "--host", "0.0.0.0", "--port", "8000", "--database-path", "/app/db/vtk-examples"]

pyproject.toml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
1-
[build-system]
2-
requires = ["hatchling"]
3-
build-backend = "hatchling.build"
4-
51
[project]
62
name = "vtk-mcp-server"
7-
version = "0.1.0"
3+
dynamic = ["version"]
84
description = "MCP server for VTK class documentation"
95
authors = [{name = "Vicente Adolfo Bolea Sanchez", email = "[email protected]"}]
106
license = {text = "MIT"}
117
readme = "README.md"
128
requires-python = ">=3.10"
9+
keywords = ["vtk", "mcp", "model-context-protocol", "documentation", "visualization"]
1310
classifiers = [
1411
"Development Status :: 4 - Beta",
1512
"Intended Audience :: Developers",
1613
"License :: OSI Approved :: MIT License",
1714
"Programming Language :: Python :: 3",
15+
"Programming Language :: Python :: 3.10",
16+
"Programming Language :: Python :: 3.11",
17+
"Programming Language :: Python :: 3.12",
1818
"Topic :: Software Development :: Libraries :: Python Modules",
19+
"Topic :: Scientific/Engineering :: Visualization",
1920
]
2021
dependencies = [
2122
"fastmcp>=2.0.0",
2223
"beautifulsoup4>=4.12.0",
24+
"importlib_resources>=5.0.0",
2325
"requests>=2.31.0",
2426
"lxml>=4.9.0",
2527
"click>=8.0.0",
28+
"chromadb==0.6.3",
29+
"sentence-transformers==3.4.1",
2630
"vtk",
2731
]
2832

@@ -39,11 +43,18 @@ test = [
3943
"httpx>=0.24.0",
4044
]
4145

42-
[tool.hatch.build.targets.wheel]
43-
packages = ["src/vtk_mcp_server"]
46+
[project.urls]
47+
Homepage = "https://github.com/kitware/vtk-mcp"
48+
Documentation = "https://github.com/kitware/vtk-mcp/blob/master/README.md"
49+
Repository = "https://github.com/kitware/vtk-mcp"
50+
Issues = "https://github.com/kitware/vtk-mcp/issues"
51+
52+
[build-system]
53+
requires = ["setuptools>=61.0", "setuptools-scm>=8.0"]
54+
build-backend = "setuptools.build_meta"
4455

45-
[tool.hatch.build.targets.sdist]
46-
include = ["/src", "/README.md"]
56+
[tool.setuptools_scm]
57+
fallback_version = "0.1.0"
4758

4859
[tool.pytest.ini_options]
4960
testpaths = ["tests"]

src/vtk_mcp_server/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
__version__ = "0.1.0"
1+
from importlib.metadata import PackageNotFoundError, version
2+
3+
try:
4+
__version__ = version("vtk-mcp")
5+
except PackageNotFoundError:
6+
__version__ = "unknown"

0 commit comments

Comments
 (0)