CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-azure-cognitiveservices-search-nspkg

Microsoft Azure Cognitive Services Search Namespace Package for Python 2/3 compatibility

64

1.25x

Quality

Pending

Does it follow best practices?

Impact

64%

1.25x

Average score across 6 eval scenarios

Overview
Eval results
Files

rubric.jsonevals/scenario-3/

{
  "context": "Evaluates whether the solution prepares the Azure Cognitive Services Search namespace correctly using the azure-cognitiveservices-search-nspkg dependency on Python 2 while staying no-op on Python 3. Also checks that the helper APIs remain idempotent and report namespace availability using the package rather than manual path hacks.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Py2 import",
      "description": "`prepare_namespace` imports and triggers the `azure.cognitiveservices.search.nspkg` namespace package on Python 2, returning `True` after ensuring imports under the search namespace succeed without raising `ImportError`.",
      "max_score": 35
    },
    {
      "name": "Py3 skip",
      "description": "On Python 3+, `prepare_namespace` avoids importing `azure.cognitiveservices.search.nspkg`, returns `False`, and relies on native namespace behavior without masking missing package errors with generic catches.",
      "max_score": 20
    },
    {
      "name": "Dependency use",
      "description": "Uses the `azure-cognitiveservices-search-nspkg` dependency (not manual sys.path hacking) to extend the search namespace for Python 2, ensuring any child search client packages can register under `azure.cognitiveservices.search`.",
      "max_score": 20
    },
    {
      "name": "Availability check",
      "description": "`namespace_available` attempts an import under `azure.cognitiveservices.search` (e.g., via importlib) and returns a boolean without propagating exceptions, reflecting the current namespace readiness.",
      "max_score": 15
    },
    {
      "name": "Idempotent prep",
      "description": "Repeated calls to `prepare_namespace` avoid duplicating namespace path entries and preserve the initial return value across invocations.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-azure-cognitiveservices-search-nspkg

tile.json