Skip to content

docs: restructure plugin docs with multi-file layout and seed reader type#302

Open
johnnygreco wants to merge 7 commits intomainfrom
johnny/docs/plugins-new-structure-and-seed-type
Open

docs: restructure plugin docs with multi-file layout and seed reader type#302
johnnygreco wants to merge 7 commits intomainfrom
johnny/docs/plugins-new-structure-and-seed-type

Conversation

@johnnygreco
Copy link
Contributor

📋 Summary

Restructures the plugin documentation to recommend a multi-file layout (config.py, impl.py, plugin.py) and documents seed reader plugins as a second supported plugin type.

🔄 Changes

🔧 Changed

  • Plugin example (docs/plugins/example.md): Refactored from a single-file plugin layout to a multi-file structure with separate config.py, impl.py, and plugin.py files. Updated terminology ("Task Class" → "Implementation Class"), expanded the config class example with get_column_emoji(), required_columns, and side_effect_columns, and removed the redundant "Complete plugin code" section.
  • Plugin overview (docs/plugins/overview.md): Updated to list both column generator and seed reader plugin types, and revised the "Implement the Plugin Components" section to describe the recommended multi-file structure.

✨ Added

  • Validating Your Plugin section — documents assert_valid_plugin testing utility
  • Multiple Plugins in One Package section — explains how to register multiple plugins via entry points, with a link to tests_e2e/ as a reference

🤖 Generated with AI

…type

- Update plugin overview to document both column generator and seed
  reader plugin types
- Restructure example plugin to use separate config.py, impl.py, and
  plugin.py files instead of a single-file approach
- Add sections for plugin validation and multiple plugins per package
- Document required config class methods (get_column_emoji,
  required_columns, side_effect_columns)
Expand explanation to mention circular dependency prevention
as a key reason for separating config, impl, and plugin modules.
@johnnygreco johnnygreco requested a review from a team as a code owner February 5, 2026 23:32
@greptile-apps
Copy link

greptile-apps bot commented Feb 5, 2026

Greptile Overview

Greptile Summary

This PR restructures the plugin documentation to recommend a multi-file layout and adds seed reader plugins as a second supported plugin type.

Key Documentation Updates:

  • Multi-file structure: Recommends separating plugins into config.py, impl.py, and plugin.py files for better organization, testability, and to avoid circular dependencies
  • Terminology update: Changed "Task Class" to "Implementation Class" for clarity
  • Expanded config examples: Added get_column_emoji(), required_columns, and side_effect_columns properties to config class examples
  • Seed reader support: Documents seed reader plugins alongside column generator plugins, with references to SeedSource and SeedReader base classes
  • New sections: Added "Validating Your Plugin" (using assert_valid_plugin) and "Multiple Plugins in One Package" sections

The documentation changes are accurate and align with the actual plugin implementation in tests_e2e/. The multi-file structure matches the test plugin layout, and all referenced classes (ColumnGeneratorFullColumn, SeedReader, SeedSource, etc.) exist in the codebase.

Confidence Score: 5/5

  • This PR is safe to merge with no risks - it only updates documentation files
  • The PR exclusively modifies documentation files (.md) with no code changes. All documentation updates accurately reflect the actual codebase implementation, verified against test plugins in tests_e2e/. The recommended multi-file structure, class names, and methods all match the real implementations.
  • No files require special attention

Important Files Changed

Filename Overview
docs/plugins/example.md Restructured plugin documentation from single-file to multi-file layout (config.py, impl.py, plugin.py). Updated terminology, expanded config examples with get_column_emoji(), required_columns, side_effect_columns. Added sections for plugin validation and multiple plugins per package.
docs/plugins/overview.md Updated to document both column generator and seed reader plugin types. Revised plugin component descriptions to recommend multi-file structure and updated base classes.

Sequence Diagram

sequenceDiagram
    participant Dev as Plugin Developer
    participant Doc as Documentation
    participant Pkg as Plugin Package
    participant DD as DataDesigner

    Note over Dev,DD: Plugin Development Workflow (New Multi-File Structure)
    
    Dev->>Doc: Read restructured plugin docs
    Doc-->>Dev: Shows multi-file layout recommendation
    
    Dev->>Pkg: Create config.py
    Note over Pkg: Defines SingleColumnConfig/SeedSource<br/>with discriminator field
    
    Dev->>Pkg: Create impl.py
    Note over Pkg: Implements ColumnGenerator or SeedReader
    
    Dev->>Pkg: Create plugin.py
    Note over Pkg: Instantiates Plugin object<br/>connecting config and impl
    
    Dev->>Pkg: Define pyproject.toml entry point
    Note over Pkg: Registers under data_designer.plugins
    
    Dev->>DD: Install plugin (uv pip install -e .)
    DD->>Pkg: Discover plugin via entry point
    Pkg-->>DD: Load Plugin instance
    
    Dev->>DD: Use plugin in config builder
    Note over DD: Plugin works like built-in types
    
    Dev->>DD: Validate with assert_valid_plugin()
    DD-->>Dev: Confirms correct structure
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@johnnygreco johnnygreco requested a review from kirit93 February 5, 2026 23:56
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.

1 participant