Skip to content

Add support for Tesseracts with complex-valued inputs #2

@jacanchaplais

Description

@jacanchaplais

Summary

  • Add detection of primitive Python complex types in the InputSchema to parse.py:_simplify_schema()
  • Modify render_fields() macro in templates/template.j2 to catch the complex input type, and render a pair of numerical inputs, taking real and imaginary components of the complex number
  • Ensure that this is correctly formatted in the Tesseract inputs of the generated app

Why is this needed?

Adds missing compatibility for the Python primitive complex type.

Usage example

tesseract-streamlit "http://localhost:39597" app.py

Where http://localhost:39597 has a complex attribute in its InputSchema, and app.py has a grouped pair of numerical inputs for real and imaginary components of the corresponding complex number.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions