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

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

Open
schloerke opened this issue Feb 16, 2024 · 0 comments · Fixed by #1137 · May be fixed by posit-dev/py-shiny-site#109
Open

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

schloerke opened this issue Feb 16, 2024 · 0 comments · Fixed by #1137 · May be fixed by posit-dev/py-shiny-site#109
Assignees

Comments

@schloerke
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants