feat: cli rename (ms → ms-hub), download fixes, ci gates, and mcp deploy ux - #47
Merged
Conversation
…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.
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ms/modelscope→ms-hub/modelscope-hub— both this package andmodelscopedeclared the same script names, colliding on installation (e.g. FreeBSD pkg, Nix envs). The umbrellamodelscopepackage keeps owningms/modelscopeand delegates to this library; standalone users should switch toms-hub. Fixes Modelscope conflicts with ots dependency Modelscope-hub: they both install /usr/local/bin/modelscope-3.12 modelscope#1752msdisappears after upgrading from 0.1.8 alongsidemodelscope, run:pip install --force-reinstall --no-deps modelscopeFeatures
ms-hub mcp deployprints the operational URL (endpoint, transport, expiration, auth) after deployment; new--auth-checkand repeatable--env KEY=VALUEoptions;--transport-typevalidatessse/streamable_httpFixes
progress_callbacksthrough theHubApi.download_repofacade so custom download-progress callbacks work end-to-end (previously raisedTypeErroron real calls){base}/{type}s/{owner}/{name}and{base}/hub/...layouts in priority order, with clean fallback to the new layoutrevisionpropagation in the download pathdeploy_mcp_serverdrops explicitNonepayload values before applying the default transportEnhancements
TypeAlias, statically resolvableStrEnumshim, publicSubParsersprotocol)CI
citestworkflow: 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; addedpre-commitconfig