Skip to content

update the underlying logic for mmif describe command to use pydantic and auto-generating user documentation #366

@keighrim

Description

@keighrim

New Feature Summary

Currently, the (experimental) workflow description generation in workflow_helper.py manually constructs nested dictionaries, and the JSON structure is documented in the docstrings. This is error-prone and lacks strict schema validation. I'm proposing to update the relevant code to use pydantic models for the output structures for benefits like

  • Validation: Guarantees the output matches the defined schema.
  • Type Safety: Python type hints will be accurate and enforceable.
  • Automatic documentation: we can use pydantic's export feature and sphinx's plugin to auto-generate documentation directly from code so that the documentation never drifts and be outdated.

Related

No response

Alternatives

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✨NNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions