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

Streamlit comp updates #42

Merged
merged 8 commits into from
Jan 18, 2024
Merged

Streamlit comp updates #42

merged 8 commits into from
Jan 18, 2024

Conversation

gshotwell
Copy link
Contributor

@gshotwell gshotwell commented Dec 4, 2023

This updates the streamlit-comparisson article to use shiny express.

TODO:

  • [] Update to use Garrick's code comparison pattern

@cpsievert
Copy link
Contributor

cpsievert commented Dec 4, 2023

Any idea why there doesn't seem to be a deployment preview available?

(Doesn't seem like the express example will work since shinylive doesn't have the dev version of shiny?)

docs/helpers.py Outdated Show resolved Hide resolved
docs/helpers.py Outdated
Comment on lines 28 to 40
def include_shiny_folder(
path: str,
file_name: str = "app.py",
exclusions: List[str] = [],
components: str = "editor, viewer",
viewer_height: str = "800",
extra_object: Any = "",
) -> None:
print(
_include_shiny_folder(
path, file_name, exclusions, components, viewer_height, extra_object
)
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like this should get removed (and if you want to print() for local debugging, just print(block) at the end of the function)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh this is designed to include a single shinylive app in a block. So you might want to use an app in tabs, but maybe also refer to just one version of the file in a standalone app without tabs. I added some doc strings to clarify that.

@gshotwell
Copy link
Contributor Author

I think we need to build the dev version of shinylive, which Winston was going to work on. We definitely should have that for the whole transition branch so we can look for bugs.

@jcheng5 jcheng5 mentioned this pull request Jan 11, 2024
55 tasks
@cpsievert
Copy link
Contributor

cpsievert commented Jan 15, 2024

@gshotwell I just realized the docs/helpers.py here has some overlap with what @gadenbuie is proposing in #66.

Maybe it would make sense to use the reuse infrastructure in #66 here as well? I think this article will also need some updates to reflect recent changes in Express, like from shiny.express import layout -> from shiny.express import ui

@cpsievert
Copy link
Contributor

@gshotwell just a heads up, I made some fixes and updates in e3bca01.

@gshotwell
Copy link
Contributor Author

@cpsievert your changes look good, I pushed a couple of fixes to avoid duplicate "Since," sentences. I think the best thing to do is merge #66, then I'll refactor this to use that pattern.

Copy link
Contributor

@gadenbuie gadenbuie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

helpers.py looks great! I made a few suggestions to take advantage of the patterns in #66.

Also worth considering that we can use py-shinylive to create shinylive URLs or to manage the shinylive bundles as needed. There are semi-internal helpers that we could build on (as the need arises). See posit-dev/py-shinylive#20

docs/helpers.py Outdated Show resolved Hide resolved
docs/helpers.py Outdated Show resolved Hide resolved
docs/helpers.py Outdated Show resolved Hide resolved
docs/helpers.py Outdated Show resolved Hide resolved
@gshotwell gshotwell changed the base branch from shiny-express-transition to rc-express January 18, 2024 19:13
@gshotwell gshotwell merged commit 7c8cf1d into rc-express Jan 18, 2024
@gshotwell gshotwell deleted the streamlit-comp-updates branch January 18, 2024 19:45
schloerke added a commit that referenced this pull request Jan 22, 2024
* rc-express: (85 commits)
  sort imports
  define Sequence
  Streamlit comp updates (#42)
  chore: quarto add shafayetShafee/line-highlight
  tweak line highlight styles
  Get .app-preview and other styles into whole site
  Make `shiny-mode-tab` and `shinylive` links in code block site-wide features
  update shinylive links
  use `@render.display`
  init tooltip on shinylive edit link
  use javascript to add the shinylive link
  default viewerHeight shouldn't include px
  quarto doesn't play well with fading tabsets
  update shinylive links
  migration/qmd update script
  tweak action-link preview app
  stacked preview/code
  Start 'rc-express' branch with latest py-shiny
  bump py-shiny version
  expressify components/outputs/verbatim-text
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants