-
Notifications
You must be signed in to change notification settings - Fork 26
Add support for shiny mode magic comment #549
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
Conversation
The linting test is failing because in Python 3.7, the I could work around this by importing from |
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
rsconnect-python hasn't removed Python 3.7 support, but Connect has removed it so it's probably time. |
I made #556 for that. |
pass | ||
|
||
|
||
def find_magic_comment_mode(content: str) -> Literal["core", "express"] | None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be worth adding a test for this function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added tests for Shiny Express app detection in general in cc3766e.
@wch - if you pull in master, you should see CI pass. |
Intent
This PR adds support for shiny mode magic comments which are generated by interactive Quarto dashboards that use Shiny for Python. This change allows users to create Quarto dashboards that have
from shiny.express import ...
instead offrom shiny ...
; previously those apps would not run.See the following for more information:
shiny
toshiny.express
quarto-dev/quarto-web#1049Type of Change
Approach
This copies over code from the py-shiny repository, from this file:
https://github.com/posit-dev/py-shiny/blob/2b66c898cb9d0fc827e587b11a839e270b2e814f/shiny/express/_is_express.py
Directions for Reviewers
Checklist