posit-dev / py-shiny

Shiny for Python
https://shiny.posit.co/py/
MIT License
1.2k stars 69 forks source link

layout_columns example app in docs page is missing a file #1568

Closed karangattu closed 1 month ago

karangattu commented 1 month ago

The example app on shiny live on this page is missing the model_plots.py file. Hence trying to run the shiny app on shinylive throws this error

    from model_plots import (
ModuleNotFoundError: No module named 'model_plots'

Bug was discovered by Fred Guth and pointed out on Discord.

gadenbuie commented 1 month ago

This supporting file should have been included by the @add_example() decorator. Here's the relevant code lines

https://github.com/posit-dev/py-shiny/blob/dc0b2943b998d59216f6239d6a41d4fa8d754700/shiny/_docstring.py#L155-L171

I wonder if there are other cases of missing support files in our docs?

gadenbuie commented 1 month ago

Here's another example in the docs for ui.value_box() that should include icons.py.

gadenbuie commented 1 month ago

Oddly, we don't have this problem in the dev docs, so the problem might be in py-shiny-site after all.

gadenbuie commented 1 month ago

I wonder if there is a possibility that os.path.isfile(abs_f) might not be True for a supporting file on the GHA runner for some odd, esoteric reason?