Skip to content

Website example apps that contain extra files are not processing the extra files #1136

@schloerke

Description

@schloerke

Ex: https://shiny.posit.co/py/api/core/ui.include_js.html app throws an error as the JS file is not in the shinylive-python chunk.

I see that there use to be code that would add the files to the shinylive chunk within quartodoc. https://github.com/posit-dev/py-shiny/pull/1029/files#diff-0f7f4e5de0ea458c581fb3281fc73413684085b64b2e6939e7782a382d9b1bfaL89-L93

I see the logic was relocated to

def write_example(self, app_files: list[str]) -> str:
app_file = app_files.pop(0)
app = ShinyliveApp.from_local(app_file, app_files, language="py")

and https://github.com/posit-dev/py-shinylive/blob/d0696727c1fd35b374489d072a1cbf4120879cb6/shinylive/_url.py#L289

I believe the example writer is not receiving the files and the root cause is located here: https://github.com/posit-dev/py-shiny/blob/17370fdfc8f2c58070af418d05fdc6f6240c8112/shiny/_docstring.py#L155C18-L155C28 . It would possibly be fixed by using something like https://github.com/posit-dev/py-shiny-site/blob/d75ffa4105c7fa111d73d2a4ed685ec232b76a0f/_renderer.py#L76


Independently, I believe https://github.com/posit-dev/py-shiny-site/blob/d75ffa4105c7fa111d73d2a4ed685ec232b76a0f/_renderer.py should be removed. I can't see how it is being used and would like to reduce possible confusion.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions