Skip to content

Commit 1ca6917

Browse files
committed
Merge branch 'main' into drop_fn_session_param
* main: (24 commits) Use dynamic version of py-shiny for deploy tests (#970) Add underscores to hide some imports (#978) Add rsconnect json files(shinyapps.io tests) and folium tests (#928) Express' `value_box()` no longer includes named positional args (#966) Include `tooltip()` and `popover()` in express (#949) Remove extra call to run_express() Call `tagify()` early to intercept `AttributeErrors` (#941) Don't pass sidebar twice to navbar_page Update changelog Update changelog Switch from `requests` to `urllib` (#940) Bump version to 0.6.1.1 Fix docstring for page_opts Fix API doc sections for Express Smarter, lazier, and more complete page default/api for express (#893) Change `express.layout` to `express.ui` (#904) Remove `@output` from examples (#790) feat: Allow for `App` `server=` to take `input` only (#920) Add fixes for type stub generation (#828) Move quarto express docs to bottom ...
2 parents 6e03710 + 6ed505b commit 1ca6917

File tree

101 files changed

+2685
-1273
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+2685
-1273
lines changed

.github/workflows/pytest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
with:
120120
python-version: ${{ matrix.python-version }}
121121

122-
- name: Run example app tests
122+
- name: Run tests for deploys
123123
env:
124124
DEPLOY_CONNECT_SERVER_URL: "https://rsc.radixu.com/"
125125
DEPLOY_CONNECT_SERVER_API_KEY: "${{ secrets.DEPLOY_CONNECT_SERVER_API_KEY }}"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,4 @@ docs/source/reference/
113113

114114
# Developer scratch area
115115
_dev/
116+
tests/playwright/deploys/apps/*/requirements.txt

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
## [UNRELEASED]
1010

11+
12+
13+
## [0.6.1.1] - 2023-12-22
14+
15+
### Bug fixes
16+
17+
* Fixed #935: `shiny create` required the `requests` package, but it was not listed as a dependency. It now uses `urllib` instead, which is part of the Python standard library. (#940)
18+
19+
20+
## [0.6.1] - 2023-12-18
21+
1122
### New features
1223

1324
* `shiny create` now allows you to select from a list of template apps.
1425
* `shiny create` provides templates which help you build your own custom JavaScript components.
1526
* Closed #814: The functions `reactive.Calc` and `reactive.Effect` have been changed to have lowercase names: `reactive.calc`, and `reactive.effect`. The old capitalized names are now aliases to the new lowercase names, so existing code will continue to work. Similarly, the class `reactive.Value` has a new alias, `reactive.value`, but in this case, since the original was a class, it keeps the original capitalized name as the primary name. The examples have not been changed yet, but will be changed in a future release. (#822)
1627
* Added `ui.layout_columns()` for creating responsive column-forward layouts based on Bootstrap's 12-column CSS Grid. (#856)
28+
* Added support for Shiny Express apps, which has a simpler, easier-to-use API than the existing API (Shiny Core). Please note that this API is still experimental and may change. (#767)
1729

1830
### Bug fixes
1931

@@ -34,7 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3446
### New features
3547
* `shiny run` now takes `reload-includes` and `reload-excludes` to allow you to define which files trigger a reload (#780).
3648
* `shiny.run` now passes keyword arguments to `uvicorn.run` (#780).
37-
* The `@output` decorator is no longer required for rendering functions; `@render.xxx` decorators now register themselves automatically. You can still use `@output` explicitly if you need to set specific output options (#747).
49+
* The `@output` decorator is no longer required for rendering functions; `@render.xxx` decorators now register themselves automatically. You can still use `@output` explicitly if you need to set specific output options (#747, #790).
3850
* Added support for integration with Quarto (#746).
3951
* Added `shiny.render.renderer_components` decorator to help create new output renderers (#621).
4052
* Added `shiny.experimental.ui.popover()`, `update_popover()`, and `toggle_popover()` for easy creation (and server-side updating) of [Bootstrap popovers](https://getbootstrap.com/docs/5.3/components/popovers/). Popovers are similar to tooltips, but are more persistent, and should primarily be used with button-like UI elements (e.g. `input_action_button()` or icons) (#680).

docs/_quartodoc.yml

Lines changed: 44 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,6 @@ quartodoc:
99
style: _renderer.py
1010
show_signature_annotations: false
1111
sections:
12-
- title: Shiny Express
13-
desc: Functions for Shiny Express applications
14-
contents:
15-
- express.layout.set_page
16-
- express.layout.p
17-
- express.layout.div
18-
- express.layout.span
19-
- express.layout.pre
20-
- express.layout.sidebar
21-
- express.layout.layout_columns
22-
- express.layout.layout_column_wrap
23-
- express.layout.column
24-
- express.layout.row
25-
- express.layout.card
26-
- express.layout.accordion
27-
- express.layout.accordion_panel
28-
- express.layout.navset
29-
- express.layout.navset_card
30-
- express.layout.nav_panel
31-
- express.layout.page_fluid
32-
- express.layout.page_fixed
33-
- express.layout.page_fillable
34-
- express.layout.page_sidebar
3512
- title: Page containers
3613
desc: Create a user interface page container.
3714
contents:
@@ -42,6 +19,8 @@ quartodoc:
4219
- ui.page_fluid
4320
- ui.page_fixed
4421
- ui.page_bootstrap
22+
- ui.page_auto
23+
- ui.page_output
4524
- title: UI Layouts
4625
desc: Control the layout of multiple UI components.
4726
contents:
@@ -303,6 +282,48 @@ quartodoc:
303282
- types.SilentException
304283
- types.SilentCancelOutputException
305284
- types.SafeException
285+
- title: Shiny Express
286+
desc: Functions for Shiny Express applications
287+
contents:
288+
- kind: page
289+
path: ContextManagerComponents
290+
summary:
291+
name: "Context manager components"
292+
desc: ""
293+
flatten: true
294+
contents:
295+
- express.ui.sidebar
296+
- express.ui.layout_sidebar
297+
- express.ui.layout_column_wrap
298+
- express.ui.layout_columns
299+
- express.ui.card
300+
- express.ui.accordion
301+
- express.ui.accordion_panel
302+
- express.ui.nav_panel
303+
- express.ui.nav_control
304+
- express.ui.nav_menu
305+
- express.ui.navset_bar
306+
- express.ui.navset_card_pill
307+
- express.ui.navset_card_tab
308+
- express.ui.navset_card_underline
309+
- express.ui.navset_hidden
310+
- express.ui.navset_pill
311+
- express.ui.navset_pill_list
312+
- express.ui.navset_tab
313+
- express.ui.navset_underline
314+
- express.ui.value_box
315+
- express.ui.panel_well
316+
- express.ui.panel_conditional
317+
- express.ui.panel_fixed
318+
- express.ui.panel_absolute
319+
- kind: page
320+
path: PageFunctions
321+
summary:
322+
name: "Page functions"
323+
desc: ""
324+
flatten: true
325+
contents:
326+
- express.ui.page_opts
306327
- title: Deprecated
307328
desc: ""
308329
contents:

examples/annotation-export/app.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ def _():
6262
df = df.loc[:, ["date", "temp_c", "annotation"]]
6363
annotated_data.set(df)
6464

65-
@output
6665
@render.plot
6766
def time_series():
6867
fig, ax = plt.subplots()
@@ -76,7 +75,6 @@ def time_series():
7675
out.tick_params(axis="x", rotation=30)
7776
return out.get_figure()
7877

79-
@output
8078
@render.ui
8179
def annotator():
8280
if input.time_series_brush() is not None:
@@ -104,7 +102,6 @@ def annotator():
104102
)
105103
return out
106104

107-
@output
108105
@render.data_frame
109106
def annotations():
110107
df = annotated_data().copy()

examples/duckdb/query.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ def query_output_ui(remove_id, qry="SELECT * from weather LIMIT 10"):
4444
def query_output_server(
4545
input, output, session, con: duckdb.DuckDBPyConnection, remove_id
4646
):
47-
@output
4847
@render.data_frame
4948
def results():
5049
# In order to avoid the query re-running with each keystroke we

examples/express/accordion_app.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import matplotlib.pyplot as plt
22
import numpy as np
33

4-
from shiny import render, ui
5-
from shiny.express import input, layout
4+
from shiny import render
5+
from shiny.express import input, ui
66

7-
with layout.accordion(open=["Panel 1", "Panel 2"]):
8-
with layout.accordion_panel("Panel 1"):
7+
with ui.accordion(open=["Panel 1", "Panel 2"]):
8+
with ui.accordion_panel("Panel 1"):
99
ui.input_slider("n", "N", 1, 100, 50)
1010

11-
with layout.accordion_panel("Panel 2"):
11+
with ui.accordion_panel("Panel 2"):
1212

1313
@render.text
1414
def txt():

examples/express/basic_app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from shiny import render, ui
2-
from shiny.express import input
1+
from shiny import render
2+
from shiny.express import input, ui
33

44
ui.input_slider("n", "N", 1, 100, 50)
55

examples/express/column_wrap_app.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
import matplotlib.pyplot as plt
22
import numpy as np
33

4-
from shiny import render, ui
5-
from shiny.express import input, layout
4+
from shiny import render
5+
from shiny.express import input, ui
66

7-
with layout.layout_column_wrap(width=1 / 2):
8-
with layout.card():
7+
with ui.layout_column_wrap(width=1 / 2):
8+
with ui.card():
99
ui.input_slider("n", "N", 1, 100, 50)
1010

11-
with layout.card():
11+
with ui.card():
1212

1313
@render.plot
1414
def histogram():
1515
np.random.seed(19680801)
1616
x = 100 + 15 * np.random.randn(437)
1717
plt.hist(x, input.n(), density=True)
1818

19-
with layout.card():
19+
with ui.card():
2020

2121
@render.plot
2222
def histogram2():

examples/express/nav_app.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
import matplotlib.pyplot as plt
22
import numpy as np
33

4-
from shiny import render, ui
5-
from shiny.express import input, layout
4+
from shiny import render
5+
from shiny.express import input, ui
66

7-
with layout.layout_column_wrap(width=1 / 2):
8-
with layout.navset():
9-
with layout.nav_panel(title="One"):
7+
with ui.layout_column_wrap(width=1 / 2):
8+
with ui.navset_underline():
9+
with ui.nav_panel(title="One"):
1010
ui.input_slider("n", "N", 1, 100, 50)
1111

12-
with layout.nav_panel(title="Two"):
12+
with ui.nav_panel(title="Two"):
1313

1414
@render.plot
1515
def histogram():
1616
np.random.seed(19680801)
1717
x = 100 + 15 * np.random.randn(437)
1818
plt.hist(x, input.n(), density=True)
1919

20-
with layout.navset_card():
21-
with layout.nav_panel(title="One"):
20+
with ui.navset_card_underline():
21+
with ui.nav_panel(title="One"):
2222
ui.input_slider("n2", "N", 1, 100, 50)
2323

24-
with layout.nav_panel(title="Two"):
24+
with ui.nav_panel(title="Two"):
2525

2626
@render.plot
2727
def histogram2():

0 commit comments

Comments
 (0)