Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove panel from PoC #2

Open
pmeier opened this issue Apr 25, 2024 · 1 comment
Open

remove panel from PoC #2

pmeier opened this issue Apr 25, 2024 · 1 comment

Comments

@pmeier
Copy link
Collaborator

pmeier commented Apr 25, 2024

We currently have a few instances of panel in the PoC

  • bokeh-fastapi/test.py

    Lines 187 to 192 in 23aa48d

    def _eval_panel(obj, doc: Document):
    if isinstance(obj, (FunctionType, MethodType)):
    obj = obj()
    with set_curdoc(doc):
    return as_panel(obj).server_doc(doc)

    which is called by

    bokeh-fastapi/test.py

    Lines 202 to 204 in 23aa48d

    elif not isinstance(app, Application):
    handler = FunctionHandler(partial(_eval_panel, app))
    app = Application(handler)

  • bokeh-fastapi/test.py

    Lines 91 to 98 in 23aa48d

    page = server_html_page_for_session(
    session,
    resources=self.resources(),
    title=session.document.title,
    template=session.document.template,
    template_variables=session.document.template_variables
    )
    return HTMLResponse(page)

We need to get rid of these and either

  1. refactor the code to no longer need this
  2. find the equivalent in bokeh
  3. vendor the code
@philippjfr
Copy link
Collaborator

My plan would be to simple skip that branch and let Panel construct the applications before calling into bokeh-fastapi.

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

No branches or pull requests

2 participants