MCPcopy
hub / github.com/ModelEngine-Group/nexent / _split_repo_name

Function _split_repo_name

deploy/sql/migrations/generate_backfill_sql.py:54–64  ·  view source on GitHub ↗

Split a catalog's full model identifier into (model_repo, model_name). Must match backend/utils/model_name_utils.split_repo_name which splits on the LAST '/' (rsplit). For 'Pro/deepseek-ai/DeepSeek-V3.2' this yields repo='Pro/deepseek-ai', name='DeepSeek-V3.2'.

(full_id: str)

Source from the content-addressed store, hash-verified

52
53
54def _split_repo_name(full_id: str) -> tuple[str, str]:
55 """Split a catalog's full model identifier into (model_repo, model_name).
56
57 Must match backend/utils/model_name_utils.split_repo_name which splits
58 on the LAST '/' (rsplit). For 'Pro/deepseek-ai/DeepSeek-V3.2' this
59 yields repo='Pro/deepseek-ai', name='DeepSeek-V3.2'.
60 """
61 if "/" in full_id:
62 repo, name = full_id.rsplit("/", 1)
63 return repo, name
64 return "", full_id
65
66
67def _sql_repo_match(repo: str) -> str:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected