From c2202fd8e4a229596eb3871a9274d154a25a733b Mon Sep 17 00:00:00 2001 From: ramav87 Date: Fri, 3 Apr 2026 10:19:05 -0400 Subject: [PATCH 1/2] Add sidpy-mcp release packaging check --- .github/workflows/actions.yml | 26 ++++++++++++++++++++++++++ setup.py | 10 +++++----- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 03cf1dd1..2edfd252 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -95,4 +95,30 @@ jobs: run: | pip install wheel twine python setup.py sdist bdist_wheel + python - <<'PY' + import pathlib + import zipfile + + wheel_paths = sorted(pathlib.Path("dist").glob("*.whl")) + if not wheel_paths: + raise SystemExit("No wheel was built in dist/") + + wheel_path = wheel_paths[-1] + with zipfile.ZipFile(wheel_path) as archive: + entry_points = [ + name for name in archive.namelist() + if name.endswith("entry_points.txt") + ] + if not entry_points: + raise SystemExit(f"{wheel_path.name} is missing entry_points.txt") + + contents = archive.read(entry_points[0]).decode() + expected = "sidpy-mcp = sidpy.proc.mcp_server_beps:main" + if expected not in contents: + raise SystemExit( + f"{wheel_path.name} does not declare the sidpy-mcp console script" + ) + + print(f"Verified {wheel_path.name} includes sidpy-mcp") + PY twine upload --username "__token__" --password $PYPI_TOKEN_PASSWORD dist/* diff --git a/setup.py b/setup.py index eb9f885a..9abb9ffe 100644 --- a/setup.py +++ b/setup.py @@ -89,9 +89,9 @@ # To provide executable scripts, use entry points in preference to the # "scripts" keyword. Entry points provide cross-platform support and allow # pip to create the appropriate form of executable for the target platform. - # entry_points={ - # 'console_scripts': [ - # 'sample=sample:main', - # ], - # }, + entry_points={ + 'console_scripts': [ + 'sidpy-mcp=sidpy.proc.mcp_server_beps:main', + ], + }, ) From 05ef3901dea3fc7427c53f28caf72ad3c2165182 Mon Sep 17 00:00:00 2001 From: ramav87 Date: Fri, 3 Apr 2026 10:23:49 -0400 Subject: [PATCH 2/2] Add SciFiReaders test dependency --- setup.cfg | 1 + setup.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index f51a9163..b8516fc8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,3 +17,4 @@ test = pytest pytest-cov SciFiReaders + aicspylibczi diff --git a/setup.py b/setup.py index 9abb9ffe..e7af8401 100644 --- a/setup.py +++ b/setup.py @@ -71,7 +71,8 @@ include_package_data=True, # https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-dependencies extras_require={ - 'MPI': ["mpi4py"], 'test': ["pytest", "pytest-cov", "SciFiReaders"] + 'MPI': ["mpi4py"], + 'test': ["pytest", "pytest-cov", "SciFiReaders", "aicspylibczi"], }, # If there are data files included in your packages that need to be # installed, specify them here. If using Python 2.6 or less, then these