posit-dev / posit-dev/shinylive

Export dependency resolution missing optional dependencies

Open
#21 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
251
Forks
25
Avg merge
19m
Merged PRs (30d)
2

Description

Have an app that uses pandas which has an optional dependency on Jinja2 for styling the tables.

When exporting this application, the jinja2 dependency is missed unless imported explicitly.

minimal reprex:

# explicit import of jinja2 required for shinylive 0.0.7?
# fails on viewing static site result of shinylive export
# if this import is commented out, fine if import is there
# import jinja2

import pandas as pd
from shiny import ui, App, render

app_ui = ui.page_fluid(
  ui.output_table("table")
)

def server(input, output, session):
  @output
  @render.table
  def table():
    df = pd.DataFrame({"a": [0,1], "b": [0,1]})
    return df
  
app = App(app_ui, server)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the minimal pandas and Shiny application with a shinylive export, comparing the result with and without the explicit jinja2 import. No source file or test is named in the issue; done means the exported static site works without that explicit import and the regression is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
pandas, python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.