Skip to content

Implement suggestion to best practice on plugin code structure #17

Open
@anders-kiaer

Description

@anders-kiaer
  • ./plugin_name_snake_case

    • _layout.py (Dash layout + ID ownership)
    • _callbacks.py (Dash callbacks)
    • _prop_serialization.py ((De)Seralization of prop inputs)
    • _business_logic.py (query database/input for relevant data, and necessary ad-hoc calculations. Testable functions! No dash* import allowed)
    • _plugin.py ( class PluginNameCamelCase(WebvizPluginABC))
    • __init__.py (from .plugin import PluginNameCamelCase)
  • Add a couple of comments in each boilerplate/template file to explain purpose.

  • Add a link/reference to a webviz-subsurface plugin showing the split for a complex case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    Status

    Backlog 📝

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions