-
Notifications
You must be signed in to change notification settings - Fork 100
More realistic file import example #582
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
This PR includes your Snowflake credentials. That doesn't seem right... We appreciate this PR, but it's not clear to me that it is an improvement for the intended purpose of the app, which is just to illustrate how to use the file upload component. The old app just shows how to do file uploads, while the new one also adds some interactivity with checkboxes. The new version is in a sense a more realistic app, but in this case I don't think the changes are helpful for illustrating how the file upload component works. |
Apologies, I looked at this too quickly and didn't see the linked issue at the top, and the discussion in that issue. |
No problem, as for the snowflake credentials, it has been removed |
Great, thanks! Just a heads up: I'm working on some review comments now but I have a meeting so it'll be a couple hours before I'll be able to submit them. |
Thanks, I think I should've chimed in a bit more since I think I suggested this PR. The main things I find confusing about the current example are:
|
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 some comments which apply to both copies of the app. Thanks for your efforts!
shiny/examples/input_file/app.py
Outdated
app_ui = ui.page_fluid( | ||
ui.input_file("file", "File", accept=".csv"), | ||
ui.input_checkbox_group( | ||
"stats", "Summary Stats", choices=["Row Count", "Column Count", "Column Names"] |
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.
All of the checkboxes start unselected, so if someone uploads a file without toggling the checkboxes, they won't see any output. Please add selected=["Row Count", "Column Count", "Column Names"]
so that they will see the table by default.
Co-authored-by: Winston Chang <[email protected]>
Co-authored-by: Winston Chang <[email protected]>
Co-authored-by: Winston Chang <[email protected]>
Co-authored-by: Winston Chang <[email protected]>
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.
Looks good - I found that the two versions of app.py aren't quite the same so I'll get them in sync and merge.
Update: It looks like I'll have to merge and then fix in a separate commit.
* main: feat(Session): Make Session on_flush() and on_flushed() accept async functions (#693) Make data frame selection return row numbers, not pandas index value (#677) chore(api)!: Rename `ui.navset_pill_card` -> `ui.navset_card_pill` and `ui.navset_tab_card` -> `ui.navset_card_tab` (#681) Consolidate all testing into `tests/` folder (#683) Fix pyright error (#678) Make model score app work on Connect/Shinyapps.io (#657) Suppress type check for read_csv Synchonize input_file examples More realistic file import example (#582) Make flaky dataframe test have larger timeout (#675) Wrap bare value box value in `p` tag (#668)
Closes #567
Change the file import example to display summary stats of uploaded data, such as row count, column count and column names.