Skip to content

feat: cli rename (ms → ms-hub), download fixes, ci gates, and mcp deploy ux - #47

Merged
wangxingjun778 merged 16 commits into
mainfrom
feat/adap_sdk
Jul 31, 2026
Merged

feat: cli rename (ms → ms-hub), download fixes, ci gates, and mcp deploy ux#47
wangxingjun778 merged 16 commits into
mainfrom
feat/adap_sdk

Conversation

@wangxingjun778

@wangxingjun778 wangxingjun778 commented Jul 31, 2026

Copy link
Copy Markdown
Member

⚠️ Packaging (action may be required)

Features

  • ms-hub mcp deploy prints the operational URL (endpoint, transport, expiration, auth) after deployment; new --auth-check and repeatable --env KEY=VALUE options; --transport-type validates sse / streamable_http

Fixes

  • Forward progress_callbacks through the HubApi.download_repo facade so custom download-progress callbacks work end-to-end (previously raised TypeError on real calls)
  • Harden legacy (pre-1.38) cache auto-detection: probe both {base}/{type}s/{owner}/{name} and {base}/hub/... layouts in priority order, with clean fallback to the new layout
  • Correct revision propagation in the download path
  • Fix two stale unit tests failing in distro build sandboxes (NixOS, #46); deploy_mcp_server drops explicit None payload values before applying the default transport

Enhancements

  • Lint/type-check debt cleared to zero (ruff + mypy); targets aligned to the Python 3.10 floor; static-typing groundwork (TypeAlias, statically resolvable StrEnum shim, public SubParsers protocol)
  • Test suite verified timezone-independent and network-free in mock mode

CI

  • New citest workflow: mock-mode suite (no credentials/network, mirrors distro sandboxes) on Python 3.10/3.12/3.14 with ruff/mypy hard gates; PyPI publishing now requires a green test gate; added pre-commit config

…o facade

The compat snapshot_download wrapper forwards progress_callbacks to HubApi.download_repo, but the facade dropped the parameter and never passed it to DownloadManager.download_repo, so any real (non-mocked) call raised TypeError.

Restore full-chain propagation: HubApi.download_repo now accepts and forwards progress_callbacks to the DownloadManager delegate (DownloadManager already supports it); compat.snapshot_download accepts and forwards it. Add an integration-style test that mocks only the DownloadManager delegate so the real compat wrapper and HubApi facade both execute.
DownloadManager._find_legacy_repo_dir now probes both historical cache layouts in priority order: {base}/{type}s/{owner}/{name___} (MODELSCOPE_CACHE explicitly set) and {base}/hub/{type}s/{owner}/{name___} (default ~/.cache/modelscope/hub). It returns the first existing non-empty match, or None when the cache is clean so the caller falls back to the new layout. Adds network-free regression tests covering both layouts, multi-dot name encoding, clean cache, and empty legacy dir.
…oid conflict

modelscope and modelscope-hub both declared modelscope/ms console scripts, so installing both (modelscope depends on modelscope-hub) collided on the same binary (e.g. /usr/local/bin/modelscope-3.12 on FreeBSD pkg). Rename the hub entry points to modelscope-hub/ms-hub so the umbrella modelscope package keeps modelscope/ms while standalone modelscope-hub users get their own non-colliding CLI. Fixes modelscope/modelscope#1752.
Bring the News section up to date through v0.1.8 (v0.1.5-v0.1.8 expanded, v0.1.4 and older collapsed under a details block). Within each release, merge same-type entries (Feature/Fix) into a single bullet instead of listing them flat. CLI references use the new ms-hub command name.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@wangxingjun778 wangxingjun778 changed the title Feat/adap sdk CLI Rename (ms → ms-hub), Download Fixes, CI Gates & MCP Deploy UX Jul 31, 2026
@wangxingjun778 wangxingjun778 changed the title CLI Rename (ms → ms-hub), Download Fixes, CI Gates & MCP Deploy UX feat: cli rename (ms → ms-hub), download fixes, ci gates, and mcp deploy ux Jul 31, 2026
@wangxingjun778
wangxingjun778 merged commit 0545345 into main Jul 31, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modelscope conflicts with ots dependency Modelscope-hub: they both install /usr/local/bin/modelscope-3.12

1 participant