CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-superset-ui--generator-superset

Yeoman generator that scaffolds Superset visualization plugins and packages with proper structure and boilerplate code

63

1.21x
Overview
Eval results
Files

task.mdevals/scenario-10/

Extension Manager

Build a simple extension manager utility that can load and validate Superset extensions from the filesystem.

Requirements

Your solution should implement the following functionality:

  1. Extension Discovery: Create a function that discovers all available extensions in the system by utilizing Superset's extension utilities.

  2. Extension Validation: Create a function that validates whether a given extension directory or .supx file contains a valid manifest. The validation should check for:

    • Presence of a manifest file
    • Required manifest fields (name, version)
    • Return appropriate success/error information
  3. Extension Information Display: Create a function that retrieves and displays information about loaded extensions, including their name, version, and type (if available).

  4. CLI Interface: Create a simple command-line tool with the following commands:

    • list - Lists all discovered extensions
    • validate <path> - Validates an extension at the given path
    • info <name> - Shows detailed information about a specific extension

Dependencies { .dependencies }

apache-superset { .dependency }

Provides business intelligence and data visualization capabilities, including an extension and plugin system.

Implementation

Create a Python file extension_manager.py that implements the requirements above.

Testing

Create a test file test_extension_manager.py that validates your implementation.

Test Case 1: Extension Discovery { .test-case @test }

Description: Test that the extension discovery function correctly identifies available extensions.

Input: Call the extension discovery function

Expected Output: Returns a list or dictionary of extensions (may be empty if no extensions are installed)

Test Case 2: Manifest Validation { .test-case @test }

Description: Test that the validation function can identify when required manifest fields are missing.

Input: Create a temporary directory with an invalid manifest.json (missing required fields)

Expected Output: Validation returns False or an error indicating the manifest is invalid

Test Case 3: Extension Information Retrieval { .test-case @test }

Description: Test that extension information can be retrieved for loaded extensions.

Input: Call the extension information function

Expected Output: Returns information about extensions (may be empty list if no extensions are installed, but should not raise an error)

Notes

  • Your solution should use Superset's built-in extension utilities rather than implementing extension loading from scratch
  • Handle cases where no extensions are installed gracefully
  • The CLI interface can use any Python CLI library (argparse, click, etc.)
  • Focus on clean integration with Superset's extension system

Install with Tessl CLI

npx tessl i tessl/npm-superset-ui--generator-superset

tile.json