From 28cd058deed1bb654e6c3fcce86c4e294e2963af Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Thu, 5 Sep 2024 16:12:31 -0400 Subject: [PATCH] Update `shiny create` calls for Shiny v1.1.0 (#209) * fix: remove griffe version pin * chore: Update `shiny create` commands (requires shiny v1.1.0) * chore: Standardize and review `shiny create` uses * chore(templates): Update `shiny create` and links * chore(templates): `shiny create` are bash commands, not python code --- components/display-messages/chat/index.qmd | 18 +++++++------- docs/custom-components-pkg.qmd | 6 ++--- docs/install-create-run.qmd | 2 +- docs/overview.qmd | 2 +- docs/shinylive.qmd | 3 ++- requirements.txt | 2 +- templates/basic-app-plot/index.qmd | 18 +++++++------- templates/basic-navigation/index.qmd | 24 +++++++++---------- templates/basic-sidebar/index.qmd | 18 +++++++------- templates/dashboard-tips/index.qmd | 26 ++++++++++---------- templates/dashboard/index.qmd | 10 ++++---- templates/database-explorer/index.qmd | 19 +++++++-------- templates/map-distance/index.qmd | 26 ++++++++++---------- templates/model-scoring/index.qmd | 25 ++++++++++--------- templates/monitor-database/index.qmd | 23 +++++++++--------- templates/monitor-file/index.qmd | 20 +++++++--------- templates/monitor-folder/index.qmd | 24 +++++++++---------- templates/nba-dashboard/index.qmd | 22 ++++++++--------- templates/regularization/index.qmd | 16 ++++++------- templates/stock-app/index.qmd | 28 ++++++++++------------ templates/survey-wizard/index.qmd | 19 +++++++-------- templates/survey/index.qmd | 22 ++++++++--------- 22 files changed, 173 insertions(+), 200 deletions(-) diff --git a/components/display-messages/chat/index.qmd b/components/display-messages/chat/index.qmd index 92d594bb..f1426db1 100644 --- a/components/display-messages/chat/index.qmd +++ b/components/display-messages/chat/index.qmd @@ -63,43 +63,43 @@ Once you've choosen a provider, copy/paste the `shiny create` terminal command t ### LangChain with OpenAI ```bash -shiny create -g https://github.com/posit-dev/py-shiny/tree/main/examples/chat/hello-providers/langchain +shiny create --template chat-ai-langchain ``` ### OpenAI ```bash -shiny create -g https://github.com/posit-dev/py-shiny/tree/main/examples/chat/hello-providers/openai +shiny create --template chat-ai-openai ``` ### Anthropic ```bash -shiny create -g https://github.com/posit-dev/py-shiny/tree/main/examples/chat/hello-providers/anthropic +shiny create --template chat-ai-anthropic ``` ### Google ```bash -shiny create -g https://github.com/posit-dev/py-shiny/tree/main/examples/chat/hello-providers/gemini +shiny create --template chat-ai-gemini ``` ### Ollama ```bash -shiny create -g https://github.com/posit-dev/py-shiny/tree/main/examples/chat/hello-providers/ollama +shiny create --template chat-ai-ollama ``` ### OpenAI via Azure ```bash -shiny create -g https://github.com/posit-dev/py-shiny/tree/main/examples/chat/enterprise/azure-openai +shiny create --template chat-ai-azure-openai ``` ### Anthropic via AWS Bedrock ```bash -shiny create -g https://github.com/posit-dev/py-shiny/tree/main/examples/chat/enterprise/aws-bedrock-anthropic +shiny create --template chat-ai-anthropic-aws ``` ::: @@ -227,7 +227,7 @@ Remember that you can get a full working template in the [Generative AI quick st Also, for another more advanced example of dynamic system messages, check out this example: ```bash -shiny create -g https://github.com/posit-dev/py-shiny/tree/main/examples/chat/playground +shiny create --github posit-dev/py-shiny:examples/chat/playground ``` ## Message trimming @@ -300,7 +300,7 @@ A more compelling transform would be to allow the user to enter a URL to a websi For a concrete example, this template allows you to enter a URL to a website that contains a recipe, and then the assistant will extract the ingredients and instructions from that recipe in a structured format: ```bash -shiny create -g https://github.com/posit-dev/py-shiny/tree/main/examples/chat/RAG/recipes +shiny create --github posit-dev/py-shiny:examples/chat/RAG/recipes ``` ![](/images/chat-recipes.mp4){class="rounded shadow"} diff --git a/docs/custom-components-pkg.qmd b/docs/custom-components-pkg.qmd index ceaa1661..e188d17e 100644 --- a/docs/custom-components-pkg.qmd +++ b/docs/custom-components-pkg.qmd @@ -59,13 +59,13 @@ Your component may look very different, but at the end of the day it just needs ::: {.callout-tip} ## What about an output binding? -This article touches on building an input component. However, it's also possible to build output components. The process and project structure is very similar to inputs. Throughout this article look for the "What about an output binding?" tips for more information on how to build an output binding. You can generate an output template with `shiny create -t js-output`. +This article touches on building an input component. However, it's also possible to build output components. The process and project structure is very similar to inputs. Throughout this article look for the "What about an output binding?" tips for more information on how to build an output binding. You can generate an output template with `shiny create --template js-output`. ::: ## The quick version -If you just want to get up and running with the code, you can start with one of the available templates available with the `shiny create -t js-react` command and then run the commands provided after the template is created. You can also see the full list of JavaScript extension templates with `shiny create -t js-component`. +If you just want to get up and running with the code, you can start with one of the available templates available with the `shiny create --template js-react` command and then run the commands provided after the template is created. You can also see the full list of JavaScript extension templates with `shiny create --template js-component`. @@ -315,7 +315,7 @@ def output_color(id: str): ) ``` -Make sure you add these to your `__init__.py` file so they are exposed to users of your package. Again, there is an output binding template in the `Shiny create` menu that can get you up and running quickly. +Make sure you add these to your `__init__.py` file so they are exposed to users of your package. Again, there is an output binding template in the `shiny create` menu that can get you up and running quickly. ::: #### `__init__.py` diff --git a/docs/install-create-run.qmd b/docs/install-create-run.qmd index e647fda5..d29dbfdf 100644 --- a/docs/install-create-run.qmd +++ b/docs/install-create-run.qmd @@ -148,7 +148,7 @@ shiny create ::: callout-tip ### Copy/paste examples -If you find an example on this site that you want to run/edit locally, you can use `shiny create -t basic-app -m express` to get a basic app template, and then copy/paste the code from the example into the template. +If you find an example on this site that you want to run/edit locally, you can use `shiny create --template basic-app -m express` to get a basic app template, and then copy/paste the code from the example into the template. ::: diff --git a/docs/overview.qmd b/docs/overview.qmd index fc3d1cdb..d8da967d 100644 --- a/docs/overview.qmd +++ b/docs/overview.qmd @@ -523,7 +523,7 @@ For a more in-depth look at reactivity, check out the [reactivity article](react Once you've [installed](install-create-run.qmd) Shiny, the `shiny create` CLI command provides access to a collection of useful starter templates. This command walks you through a series of prompts to help you get started quickly with a helpful example. One great option is the dashboard template, which can be created with: ```bash -shiny create -t dashboard +shiny create --template dashboard ``` ![The resulting dashboard generated by the dashboard template](assets/dashboard-template.png){class="img-shadow"} diff --git a/docs/shinylive.qmd b/docs/shinylive.qmd index 224a04b0..2a291e6c 100644 --- a/docs/shinylive.qmd +++ b/docs/shinylive.qmd @@ -157,9 +157,10 @@ pip install shinylive Next, create a directory with a Shiny application. We'll use the `shiny create` command to create a basic application in a directory called `myapp/`. ```bash -shiny create myapp +shiny create --dir myapp ``` +Pick a Shiny app template to create in the `myapp` directory. Next, create the distribution with shinylive: ```bash diff --git a/requirements.txt b/requirements.txt index 3eae7c16..fd5dcfc6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,4 @@ plotly shinywidgets ipyleaflet==0.17.4 favicons -griffe<1.0.0 # FIXME remove after posit-dev/py-shiny#1636 +griffe diff --git a/templates/basic-app-plot/index.qmd b/templates/basic-app-plot/index.qmd index b2ccdb51..30162176 100644 --- a/templates/basic-app-plot/index.qmd +++ b/templates/basic-app-plot/index.qmd @@ -12,14 +12,12 @@ sourceurl: https://github.com/posit-dev/py-shiny-templates/tree/main/basic-ap ::: {.panel-tabset .shiny-mode-tabset group="shiny-app-mode"} ## Express -``` python -shiny create -m express \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/basic-app-plot +``` bash +shiny create --template basic-app-plot --mode express --github posit-dev/py-shiny-templates ``` ## Core -``` python -shiny create -m core \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/basic-app-plot +``` bash +shiny create --template basic-app-plot --mode core --github posit-dev/py-shiny-templates ``` ::: @@ -32,14 +30,14 @@ A basic example of changing a histogram based on a select input control. ::: {.g-col-6} **Components:** -* [Select input](/components/inputs/select-single) -* [Plot output](/components/outputs/plot-seaborn) +* [Select input](/components/inputs/select-single/index.qmd) +* [Plot output](/components/outputs/plot-seaborn/index.qmd) ::: ::: {.g-col-6} -**Packages:** +**Packages:** -* `seaborn` +* `seaborn` ::: :::: diff --git a/templates/basic-navigation/index.qmd b/templates/basic-navigation/index.qmd index 17ff404a..69ee72c0 100644 --- a/templates/basic-navigation/index.qmd +++ b/templates/basic-navigation/index.qmd @@ -12,14 +12,12 @@ sourceurl: https://github.com/posit-dev/py-shiny-templates/tree/main/basic-na ::: {.panel-tabset .shiny-mode-tabset group="shiny-app-mode"} ## Express -``` python -shiny create -m express \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/basic-navigation +``` bash +shiny create --template basic-navigation --mode express --github posit-dev/py-shiny-templates ``` ## Core -``` python -shiny create -m core \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/basic-navigation +``` bash +shiny create --template basic-navigation --mode core --github posit-dev/py-shiny-templates ``` ::: @@ -33,18 +31,18 @@ On both card panels is a select input to choose the plot/data to display. ::: {.g-col-6 .g-col-sm-4} **Components:** - - [Select input](/components/inputs/select-single) - - [Plot output](/components/outputs/plot-seaborn) - - [Data grid output](/components/outputs/data-grid) + - [Select input](/components/inputs/select-single/index.qmd) + - [Plot output](/components/outputs/plot-seaborn/index.qmd) + - [Data grid output](/components/outputs/data-grid/index.qmd) ::: ::: {.g-col-6 .g-col-sm-4} -**Layouts:** +**Layouts:** - - [Navbars](https://shiny.posit.co/py/layouts/navbars) - - [Tabs](https://shiny.posit.co/py/layouts/tabs) + - [Navbars](/layouts/navbars/index.qmd) + - [Tabs](/layouts/tabs/index.qmd) ::: ::: {.g-col-6 .g-col-sm-4} -**Packages:** +**Packages:** - `pandas` - `seaborn` diff --git a/templates/basic-sidebar/index.qmd b/templates/basic-sidebar/index.qmd index a38edeb3..7486793d 100644 --- a/templates/basic-sidebar/index.qmd +++ b/templates/basic-sidebar/index.qmd @@ -12,14 +12,12 @@ sourceurl: https://github.com/posit-dev/py-shiny-templates/tree/main/basic-si ::: {.panel-tabset .shiny-mode-tabset group="shiny-app-mode"} ## Express -``` python -shiny create -m express \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/basic-sidebar +``` bash +shiny create --template basic-sidebar --mode express --github posit-dev/py-shiny-templates ``` ## Core -``` python -shiny create -m core \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/basic-sidebar +``` bash +shiny create --template basic-sidebar --mode core --github posit-dev/py-shiny-templates ``` ::: @@ -34,15 +32,15 @@ Place numerous input controls in a sidebar and use them to control a plot in the ::: {.g-col-6 .g-col-sm-4} **Components:** -* [Select input](/components/inputs/select-single) -* [Switch input](/components/inputs/switch) -* [Plot output](/components/outputs/plot-seaborn) +* [Select input](/components/inputs/select-single/index.qmd) +* [Switch input](/components/inputs/switch/index.qmd) +* [Plot output](/components/outputs/plot-seaborn/index.qmd) ::: ::: {.g-col-6 .g-col-sm-4} **Layouts:** -* [Sidebar](https://shiny.posit.co/py/layouts/sidebars) +* [Sidebar](/layouts/sidebars/index.qmd) ::: ::: {.g-col-6 .g-col-sm-4} diff --git a/templates/dashboard-tips/index.qmd b/templates/dashboard-tips/index.qmd index 86d6ca3c..ddaef78a 100644 --- a/templates/dashboard-tips/index.qmd +++ b/templates/dashboard-tips/index.qmd @@ -11,14 +11,12 @@ sourceurl: https://github.com/posit-dev/py-shiny-templates/tree/main/dashboar ::: {.panel-tabset .shiny-mode-tabset group="shiny-app-mode"} ## Express -``` python -shiny create -m express \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/dashboard-tips +``` bash +shiny create --template dashboard-tips --mode express --github posit-dev/py-shiny-templates ``` ## Core -``` python -shiny create -m core \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/dashboard-tips +``` bash +shiny create --template dashboard-tips --mode core --github posit-dev/py-shiny-templates ``` ::: @@ -34,13 +32,13 @@ Another notable difference is the use of `plotly` for interactive plots. ::: {.g-col-6 .g-col-sm-4} **Components:** -* [Slider input](/components/inputs/slider) -* [Checkbox group input](/components/inputs/checkbox-group) -* [Action button](/components/inputs/action-button) -* [Popover](https://shiny.posit.co/py/api/core/ui.popover.html) -* [Value box](/components/outputs/value-box) -* [Plotly output](/components/outputs/plot-plotly) -* [Data grid output](/components/outputs/data-grid) +* [Slider input](/components/inputs/slider/index.qmd) +* [Checkbox group input](/components/inputs/checkbox-group/index.qmd) +* [Action button](/components/inputs/action-button/index.qmd) +* [Popover](/api/core/ui.popover.qmd) +* [Value box](/components/outputs/value-box/index.qmd) +* [Plotly output](/components/outputs/plot-plotly/index.qmd) +* [Data grid output](/components/outputs/data-grid/index.qmd) ::: ::: {.g-col-6 .g-col-sm-4} @@ -59,4 +57,4 @@ Another notable difference is the use of `plotly` for interactive plots. * `plotly` * `shinywidgets` ::: -:::: \ No newline at end of file +:::: diff --git a/templates/dashboard/index.qmd b/templates/dashboard/index.qmd index 6d102c40..69a3de1d 100644 --- a/templates/dashboard/index.qmd +++ b/templates/dashboard/index.qmd @@ -10,14 +10,12 @@ sourceurl: https://github.com/posit-dev/py-shiny-templates/tree/main/dashboar ::: {.panel-tabset .shiny-mode-tabset group="shiny-app-mode"} ## Express -``` python -shiny create -m express \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/dashboard +``` bash +shiny create --template dashboard --mode express --github posit-dev/py-shiny-templates ``` ## Core -``` python -shiny create -m core \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/dashboard +``` bash +shiny create --template dashboard --mode core --github posit-dev/py-shiny-templates ``` ::: diff --git a/templates/database-explorer/index.qmd b/templates/database-explorer/index.qmd index 900aebc9..7df5afb7 100644 --- a/templates/database-explorer/index.qmd +++ b/templates/database-explorer/index.qmd @@ -10,9 +10,8 @@ sourceurl: https://github.com/posit-dev/py-shiny-templates/tree/main/database ::: {.panel-tabset .shiny-mode-tabset} ## Core -``` python -shiny create -m core \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/database-explorer +``` bash +shiny create --template database-explorer --mode core --github posit-dev/py-shiny-templates ``` ::: @@ -20,23 +19,23 @@ shiny create -m core \ Run queries on an SQL database and view the results in a data grid. This app demonstrates how to initialize, populate, and connect to an SQL database using the `duckdb` package. It also shows how to run SQL queries and display results in an interactive data grid. -Note also the use of Shiny [modules](/docs/modules.html) to encapsulate and reuse the logic behind each card. +Note also the use of Shiny [modules](/docs/modules.qmd) to encapsulate and reuse the logic behind each card. :::: {.grid .tags} ::: {.g-col-6 .g-col-sm-4} **Components:** -* [Action button](/components/inputs/action-button) -* [Text area input](/components/inputs/text-area) -* [Data grid output](/components/outputs/data-grid) +* [Action button](/components/inputs/action-button/index.qmd) +* [Text area input](/components/inputs/text-area/index.qmd) +* [Data grid output](/components/outputs/data-grid/index.qmd) ::: ::: {.g-col-6 .g-col-sm-4} **Layouts:** -* [Sidebar](/layouts/sidebars) -* [Grid layout](/layouts/arrange) +* [Sidebar](/layouts/sidebars/index.qmd) +* [Grid layout](/layouts/arrange/index.qmd) ::: ::: {.g-col-6 .g-col-sm-4} **Packages:** @@ -44,4 +43,4 @@ Note also the use of Shiny [modules](/docs/modules.html) to encapsulate and reus * `duckdb` * `pandas` ::: -:::: \ No newline at end of file +:::: diff --git a/templates/map-distance/index.qmd b/templates/map-distance/index.qmd index 1eae3f64..b93ad1cb 100644 --- a/templates/map-distance/index.qmd +++ b/templates/map-distance/index.qmd @@ -10,14 +10,12 @@ sourceurl: https://github.com/posit-dev/py-shiny-templates/tree/main/map-dist ::: {.panel-tabset .shiny-mode-tabset group="shiny-app-mode"} ## Express -``` python -shiny create -m express \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/map-distance +``` bash +shiny create --template map-distance --mode express --github posit-dev/py-shiny-templates ``` ## Core -``` python -shiny create -m core \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/map-distance +``` bash +shiny create --template map-distance --mode core --github posit-dev/py-shiny-templates ``` ::: @@ -25,7 +23,7 @@ shiny create -m core \ Run queries on an SQL database and view the results in a data grid. This app demonstrates how to initialize, populate, and connect to an SQL database using the `duckdb` package. It also shows how to run SQL queries and display results in an interactive data grid. -Note also the use of Shiny [modules](/docs/modules.html) to encapsulate and reuse the logic behind each card. +Note also the use of Shiny [modules](/docs/modules.qmd) to encapsulate and reuse the logic behind each card. :::: {.grid .tags} @@ -33,18 +31,18 @@ Note also the use of Shiny [modules](/docs/modules.html) to encapsulate and reus **Components:** -* [Select input](/components/inputs/selectize-single/) -* [Value box](/components/outputs/value-box) -* [Map](/components/outputs/map-ipyleaflet) +* [Select input](/components/inputs/selectize-single/index.qmd) +* [Value box](/components/outputs/value-box/index.qmd) +* [Map](/components/outputs/map-ipyleaflet/index.qmd) ::: ::: {.g-col-6 .g-col-sm-4} **Layouts:** -* [Sidebar](/layouts/sidebars) -* [Grid layout](/layouts/arrange) -* [Cards](/layouts/panels-cards/#content-divided-by-cards) +* [Sidebar](/layouts/sidebars/index.qmd) +* [Grid layout](/layouts/arrange/index.qmd) +* [Cards](/layouts/panels-cards/index.qmd#content-divided-by-cards) ::: ::: {.g-col-6 .g-col-sm-4} @@ -58,4 +56,4 @@ Note also the use of Shiny [modules](/docs/modules.html) to encapsulate and reus * `shinywidgets` ::: -:::: \ No newline at end of file +:::: diff --git a/templates/model-scoring/index.qmd b/templates/model-scoring/index.qmd index 490c1fdb..1ead124a 100644 --- a/templates/model-scoring/index.qmd +++ b/templates/model-scoring/index.qmd @@ -10,9 +10,8 @@ sourceurl: https://github.com/posit-dev/py-shiny-templates/tree/main/model-sc ::: {.panel-tabset .shiny-mode-tabset} ## Core -``` python -shiny create -m core \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/model-scoring +``` bash +shiny create --template model-scoring --mode core --github posit-dev/py-shiny-templates ``` ::: @@ -26,21 +25,21 @@ Shiny's reactive programming model makes it easy and performant to update those **Components:** -* [Select input](/components/inputs/selectize-single) -* [Value box](/components/outputs/value-box) -* [Plot output](/components/outputs/plot-matplotlib) -* [Data grid output](/components/outputs/data-grid) +* [Select input](/components/inputs/selectize-single/index.qmd) +* [Value box](/components/outputs/value-box/index.qmd) +* [Plot output](/components/outputs/plot-matplotlib/index.qmd) +* [Data grid output](/components/outputs/data-grid/index.qmd) ::: ::: {.g-col-6 .g-col-sm-4} **Layouts:** -* [Navbar](/layouts/navbars) -* [Sidebar](/layouts/sidebars) -* [Tabs](/layouts/tabs) -* [Grid layout](/layouts/arrange) -* [Cards](/layouts/panels-cards/#content-divided-by-cards) +* [Navbar](/layouts/navbarsindex.qmd) +* [Sidebar](/layouts/sidebarsindex.qmd) +* [Tabs](/layouts/tabsindex.qmd) +* [Grid layout](/layouts/arrangeindex.qmd) +* [Cards](/layouts/panels-cards/index.qmd#content-divided-by-cards) ::: ::: {.g-col-6 .g-col-sm-4} @@ -53,4 +52,4 @@ Shiny's reactive programming model makes it easy and performant to update those * `scikit-learn` ::: -:::: \ No newline at end of file +:::: diff --git a/templates/monitor-database/index.qmd b/templates/monitor-database/index.qmd index 00c7b293..4f5ed9fc 100644 --- a/templates/monitor-database/index.qmd +++ b/templates/monitor-database/index.qmd @@ -11,9 +11,8 @@ sourceurl: https://github.com/posit-dev/py-shiny-templates/tree/main/monitor- ::: {.panel-tabset .shiny-mode-tabset} ## Core -``` python -shiny create -m core \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/monitor-database +``` bash +shiny create --template monitor-database --mode core --github posit-dev/py-shiny-templates ``` ::: @@ -22,7 +21,7 @@ Efficiently monitor a database for updates and visualize the data in real-time. In this case, we're monitoring an SQLite database with simulated model accuracy data, but the core logic can easily adapt to other databases and use cases. Note also that this template has: -* A switch input to toggle the data update on and off (thanks to [reactive isolation](/docs/reactive-patterns.html#isolate-events), this is easy!). +* A switch input to toggle the data update on and off (thanks to [reactive isolation](/docs/reactive-patterns.qmd#isolate-events), this is easy!). * A dynamically updating plot and value box icons (when model accuracy gets above/below a certain threshold). * And this all happens without any layout shifts! @@ -32,19 +31,19 @@ Note also that this template has: **Components:** -* [Checkbox group input](/components/inputs/checkbox-group) -* [Switch input](/components/inputs/switch) -* [Value box](/components/outputs/value-box) -* [Plotly output](/components/outputs/plot-plotly) +* [Checkbox group input](/components/inputs/checkbox-group/index.qmd) +* [Switch input](/components/inputs/switch/index.qmd) +* [Value box](/components/outputs/value-box/index.qmd) +* [Plotly output](/components/outputs/plot-plotly/index.qmd) ::: ::: {.g-col-6 .g-col-sm-4} **Layouts:** -* [Sidebar](/layouts/sidebars) -* [Grid layout](/layouts/arrange) -* [Cards](/layouts/panels-cards/#content-divided-by-cards) +* [Sidebar](/layouts/sidebars/index.qmd) +* [Grid layout](/layouts/arrange/index.qmd) +* [Cards](/layouts/panels-cards/index.qmd#content-divided-by-cards) ::: ::: {.g-col-6 .g-col-sm-4} @@ -59,4 +58,4 @@ Note also that this template has: * `sqlite3` ::: -:::: \ No newline at end of file +:::: diff --git a/templates/monitor-file/index.qmd b/templates/monitor-file/index.qmd index 52eec8ac..edd9ea49 100644 --- a/templates/monitor-file/index.qmd +++ b/templates/monitor-file/index.qmd @@ -12,14 +12,12 @@ sourceurl: https://github.com/posit-dev/py-shiny-templates/tree/main/monitor- ::: {.panel-tabset .shiny-mode-tabset group="shiny-app-mode"} ## Express -``` python -shiny create -m express \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/monitor-file +``` bash +shiny create --template monitor-file --mode express --github posit-dev/py-shiny-templates ``` ## Core -``` python -shiny create -m core \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/monitor-file +``` bash +shiny create --template monitor-file --mode core --github posit-dev/py-shiny-templates ``` ::: @@ -34,16 +32,16 @@ Note also that this app shows the entire log in a data grid, and the most recent **Components:** -* [Value box](/components/outputs/value-box) -* [Data grid output](/components/outputs/data-grid) +* [Value box](/components/outputs/value-box/index.qmd) +* [Data grid output](/components/outputs/data-grid/index.qmd) ::: ::: {.g-col-6 .g-col-sm-4} **Layouts:** -* [Grid layout](/layouts/arrange) -* [Cards](/layouts/panels-cards/#content-divided-by-cards) +* [Grid layout](/layouts/arrange/index.qmd) +* [Cards](/layouts/panels-cards/index.qmd#content-divided-by-cards) ::: ::: {.g-col-6 .g-col-sm-4} @@ -54,4 +52,4 @@ Note also that this app shows the entire log in a data grid, and the most recent * `pandas` ::: -:::: \ No newline at end of file +:::: diff --git a/templates/monitor-folder/index.qmd b/templates/monitor-folder/index.qmd index 1816830e..9c9ca65d 100644 --- a/templates/monitor-folder/index.qmd +++ b/templates/monitor-folder/index.qmd @@ -12,14 +12,12 @@ sourceurl: https://github.com/posit-dev/py-shiny-templates/tree/main/monitor- ::: {.panel-tabset .shiny-mode-tabset group="shiny-app-mode"} ## Express -``` python -shiny create -m express \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/monitor-folder +``` bash +shiny create --template monitor-folder --mode express --github posit-dev/py-shiny-templates ``` ## Core -``` python -shiny create -m core \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/monitor-folder +``` bash +shiny create --template monitor-folder --mode core --github posit-dev/py-shiny-templates ``` ::: @@ -35,18 +33,18 @@ Additionally, when a file is selected in this table, the contents are displayed **Components:** -* [Data grid output](/components/outputs/data-grid) -* [Action button](/components/inputs/action-button) -* [Popover](https://shiny.posit.co/py/api/core/ui.popover.html) -* [Download link](https://shiny.posit.co/py/api/core/ui.download_link.html) +* [Data grid output](/components/outputs/data-grid/index.qmd) +* [Action button](/components/inputs/action-button/index.qmd) +* [Popover](/api/core/ui.popover.qmd) +* [Download link](/api/core/ui.download_link.qmd) ::: ::: {.g-col-6 .g-col-sm-4} **Layouts:** -* [Grid layout](/layouts/arrange) -* [Cards](/layouts/panels-cards/#content-divided-by-cards) +* [Grid layout](/layouts/arrange/index.qmd) +* [Cards](/layouts/panels-cards/index.qmd#content-divided-by-cards) ::: ::: {.g-col-6 .g-col-sm-4} @@ -58,4 +56,4 @@ Additionally, when a file is selected in this table, the contents are displayed * `watchfiles` ::: -:::: \ No newline at end of file +:::: diff --git a/templates/nba-dashboard/index.qmd b/templates/nba-dashboard/index.qmd index 6c0b2937..6176bafb 100644 --- a/templates/nba-dashboard/index.qmd +++ b/templates/nba-dashboard/index.qmd @@ -11,14 +11,12 @@ sourceurl: https://github.com/posit-dev/py-shiny-templates/tree/main/nba-dash ::: {.panel-tabset .shiny-mode-tabset group="shiny-app-mode"} ## Express -``` python -shiny create -m express \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/nba-dashboard +``` bash +shiny create --template nba-dashboard --mode express --github posit-dev/py-shiny-templates ``` ## Core -``` python -shiny create -m core \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/nba-dashboard +``` bash +shiny create --template nba-dashboard --mode core --github posit-dev/py-shiny-templates ``` ::: @@ -33,18 +31,18 @@ This provides a useful way to query player(s) based on a specific statistic, the **Components:** -* [Select input](/components/inputs/selectize-multiple/) -* [Slider input](/components/inputs/slider-range/) -* [Plotly](/components/outputs/plot-plotly/) +* [Select input](/components/inputs/selectize-multiple/index.qmd) +* [Slider input](/components/inputs/slider-range/index.qmd) +* [Plotly](/components/outputs/plot-plotly/index.qmd) ::: ::: {.g-col-6 .g-col-sm-4} **Layouts:** -* [Sidebar](/layouts/sidebars) -* [Grid layout](/layouts/arrange) -* [Cards](/layouts/panels-cards/#content-divided-by-cards) +* [Sidebar](/layouts/sidebars/index.qmd) +* [Grid layout](/layouts/arrange/index.qmd) +* [Cards](/layouts/panels-cards/index.qmd#content-divided-by-cards) ::: ::: {.g-col-6 .g-col-sm-4} diff --git a/templates/regularization/index.qmd b/templates/regularization/index.qmd index a3445eca..39e2e29c 100644 --- a/templates/regularization/index.qmd +++ b/templates/regularization/index.qmd @@ -12,14 +12,12 @@ sourceurl: https://github.com/posit-dev/py-shiny-templates/tree/main/regulari ::: {.panel-tabset .shiny-mode-tabset group="shiny-app-mode"} ## Express -``` python -shiny create -m express \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/regularization +``` bash +shiny create --template regularization --mode express --github posit-dev/py-shiny-templates ``` ## Core -``` python -shiny create -m core \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/regularization +``` bash +shiny create --template regularization --mode core --github posit-dev/py-shiny-templates ``` ::: @@ -34,8 +32,8 @@ The user can adjust the regularization strength to see it influence the model's **Components:** -* [Slider input](/components/inputs/slider-range) -* [Plot output](/components/outputs/plot-seaborn) +* [Slider input](/components/inputs/slider-range/index.qmd) +* [Plot output](/components/outputs/plot-seaborn/index.qmd) ::: ::: {.g-col-6} @@ -47,4 +45,4 @@ The user can adjust the regularization strength to see it influence the model's * `seaborn` ::: -:::: +:::: diff --git a/templates/stock-app/index.qmd b/templates/stock-app/index.qmd index b03e8e02..bad21672 100644 --- a/templates/stock-app/index.qmd +++ b/templates/stock-app/index.qmd @@ -10,14 +10,12 @@ sourceurl: https://github.com/posit-dev/py-shiny-templates/tree/main/stock-ap ::: {.panel-tabset .shiny-mode-tabset group="shiny-app-mode"} ## Express -``` python -shiny create -m express \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/stock-app +``` bash +shiny create --template stock-app --mode express --github posit-dev/py-shiny-templates ``` ## Core -``` python -shiny create -m core \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/stock-app +``` bash +shiny create --template stock-app --mode core --github posit-dev/py-shiny-templates ``` ::: @@ -33,20 +31,20 @@ Note that the icon for the stock price change is a green arrow pointing up if th **Components:** -* [Select input](/components/inputs/selectize-single/) -* [Date range input](/components/inputs/date-range/) -* [Value box](/components/outputs/value-box/) -* [Plotly](/components/outputs/plot-plotly) -* [Data grid output](/components/outputs/data-grid) +* [Select input](/components/inputs/selectize-single/index.qmd) +* [Date range input](/components/inputs/date-range/index.qmd) +* [Value box](/components/outputs/value-box/index.qmd) +* [Plotly](/components/outputs/plot-plotly/index.qmd) +* [Data grid output](/components/outputs/data-grid/index.qmd) ::: ::: {.g-col-6 .g-col-sm-4} **Layouts:** -* [Sidebar](/layouts/sidebars) -* [Grid layout](/layouts/arrange) -* [Cards](/layouts/panels-cards/#content-divided-by-cards) +* [Sidebar](/layouts/sidebars/index.qmd) +* [Grid layout](/layouts/arrange/index.qmd) +* [Cards](/layouts/panels-cards/index.qmd#content-divided-by-cards) ::: ::: {.g-col-6 .g-col-sm-4} @@ -61,4 +59,4 @@ Note that the icon for the stock price change is a green arrow pointing up if th * `yfinance` ::: -:::: \ No newline at end of file +:::: diff --git a/templates/survey-wizard/index.qmd b/templates/survey-wizard/index.qmd index e654915f..0b293531 100644 --- a/templates/survey-wizard/index.qmd +++ b/templates/survey-wizard/index.qmd @@ -12,15 +12,14 @@ sourceurl: https://github.com/posit-dev/py-shiny-templates/tree/main/survey-w ::: {.panel-tabset .shiny-mode-tabset} ## Core -``` python -shiny create -m core \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/survey-wizard +``` bash +shiny create --template survey-wizard --mode core --github posit-dev/py-shiny-templates ``` ::: A simple survey wizard that simply writes responses to a file and displays a confirmation message when submitted. -In this example, we use the `shiny_validate` package to validate the form inputs, and make clever use of [`navset_hidden()`](https://shiny.posit.co/py/api/core/ui.navset_hidden.html) to show/hide different steps of the form via action buttons. +In this example, we use the `shiny_validate` package to validate the form inputs, and make clever use of [`navset_hidden()`](/api/core/ui.navset_hidden.qmd) to show/hide different steps of the form via action buttons. :::: {.grid .tags} @@ -28,17 +27,17 @@ In this example, we use the `shiny_validate` package to validate the form inputs **Components:** -* [Text input](/components/inputs/select-single) -* [Numeric input](/components/inputs/numeric-input/) -* [Action button](/components/inputs/action-button) +* [Text input](/components/inputs/select-single/index.qmd) +* [Numeric input](/components/inputs/numeric-input/index.qmd) +* [Action button](/components/inputs/action-button/index.qmd) ::: ::: {.g-col-6 .g-col-sm-4} **Layouts:** -* [Cards](/layouts/panels-cards/#content-divided-by-cards) -* [Tabs](/layouts/tabs) +* [Cards](/layouts/panels-cards/index.qmd#content-divided-by-cards) +* [Tabs](/layouts/tabs/index.qmd) ::: ::: {.g-col-6 .g-col-sm-4} @@ -49,4 +48,4 @@ In this example, we use the `shiny_validate` package to validate the form inputs * `shiny_validate` ::: -:::: \ No newline at end of file +:::: diff --git a/templates/survey/index.qmd b/templates/survey/index.qmd index 1247b4a2..62110603 100644 --- a/templates/survey/index.qmd +++ b/templates/survey/index.qmd @@ -12,14 +12,12 @@ sourceurl: https://github.com/posit-dev/py-shiny-templates/tree/main/survey ::: {.panel-tabset .shiny-mode-tabset group="shiny-app-mode"} ## Express -``` python -shiny create -m express \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/survey +``` bash +shiny create --template survey --mode express --github posit-dev/py-shiny-templates ``` ## Core -``` python -shiny create -m core \ - -g https://github.com/posit-dev/py-shiny-templates/tree/main/survey +``` bash +shiny create --template survey --mode core --github posit-dev/py-shiny-templates ``` ::: @@ -33,17 +31,17 @@ In this example, we use the `shiny_validate` package to validate the form inputs **Components:** -* [Text input](/components/inputs/select-single) -* [Numeric input](/components/inputs/numeric-input/) -* [Select input](/components/inputs/select-single) -* [Radio buttons](/components/inputs/radio-buttons/) +* [Text input](/components/inputs/select-single/index.qmd) +* [Numeric input](/components/inputs/numeric-input/index.qmd) +* [Select input](/components/inputs/select-single/index.qmd) +* [Radio buttons](/components/inputs/radio-buttons/index.qmd) ::: ::: {.g-col-6 .g-col-sm-4} **Layouts:** -* [Cards](/layouts/panels-cards/#content-divided-by-cards) +* [Cards](/layouts/panels-cards/index.qmd#content-divided-by-cards) ::: ::: {.g-col-6 .g-col-sm-4} @@ -54,4 +52,4 @@ In this example, we use the `shiny_validate` package to validate the form inputs * `shiny_validate` ::: -:::: \ No newline at end of file +::::