Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
# "3.10" must be a string; otherwise it is interpreted as 3.1.
python-version: ["3.11", "3.10", "3.9", "3.8"]
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"]
os: [ubuntu-latest, windows-latest, macOS-latest]
fail-fast: false

Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
if: github.event_name != 'release'
strategy:
matrix:
python-version: ["3.11", "3.10", "3.9", "3.8"]
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"]
os: [ubuntu-latest]
fail-fast: false

Expand Down
2 changes: 1 addition & 1 deletion examples/cpuinfo/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
text-align: center;
}
"""
% f"{ncpu*4}em"
% f"{ncpu * 4}em"
),
ui.h3("CPU Usage %", class_="mt-2"),
ui.layout_sidebar(
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
project_urls =
Bug Tracker = https://github.com/posit-dev/py-shiny/issues
Documentation = https://shiny.posit.co/py/
Expand Down
2 changes: 1 addition & 1 deletion shiny/api-examples/download/app-core.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def download2():
yield buf.getvalue()

@render.download(
filename=lambda: f"新型-{date.today().isoformat()}-{np.random.randint(100,999)}.csv"
filename=lambda: f"新型-{date.today().isoformat()}-{np.random.randint(100, 999)}.csv"
)
async def download3():
await asyncio.sleep(0.25)
Expand Down
2 changes: 1 addition & 1 deletion shiny/api-examples/download/app-express.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def download2():

@render.download(
label="Download filename",
filename=lambda: f"新型-{date.today().isoformat()}-{np.random.randint(100,999)}.csv",
filename=lambda: f"新型-{date.today().isoformat()}-{np.random.randint(100, 999)}.csv",
)
async def download3():
await asyncio.sleep(0.25)
Expand Down
2 changes: 1 addition & 1 deletion shiny/api-examples/download_button/app-core.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

def server(input: Inputs, output: Outputs, session: Session):
@render.download(
filename=lambda: f"新型-{date.today().isoformat()}-{random.randint(100,999)}.csv"
filename=lambda: f"新型-{date.today().isoformat()}-{random.randint(100, 999)}.csv"
)
async def downloadData():
await asyncio.sleep(0.25)
Expand Down
2 changes: 1 addition & 1 deletion shiny/api-examples/download_button/app-express.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


@render.download(
filename=lambda: f"新型-{date.today().isoformat()}-{random.randint(100,999)}.csv"
filename=lambda: f"新型-{date.today().isoformat()}-{random.randint(100, 999)}.csv"
)
async def downloadData():
await asyncio.sleep(0.25)
Expand Down
2 changes: 1 addition & 1 deletion shiny/api-examples/download_link/app-core.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

def server(input: Inputs, output: Outputs, session: Session):
@render.download(
filename=lambda: f"新型-{date.today().isoformat()}-{random.randint(100,999)}.csv"
filename=lambda: f"新型-{date.today().isoformat()}-{random.randint(100, 999)}.csv"
)
async def downloadData():
await asyncio.sleep(0.25)
Expand Down
2 changes: 1 addition & 1 deletion shiny/api-examples/remove_accordion_panel/app-core.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _():
return

# Remove panel
ui.remove_accordion_panel("acc", f"Section { user_choices.pop() }")
ui.remove_accordion_panel("acc", f"Section {user_choices.pop()}")

label = "No more panels to remove!"
if len(user_choices) > 0:
Expand Down
2 changes: 1 addition & 1 deletion shiny/api-examples/remove_accordion_panel/app-express.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def _():
ui.notification_show("No more panels to remove!")
return

ui.remove_accordion_panel("acc", f"Section { user_choices.pop() }")
ui.remove_accordion_panel("acc", f"Section {user_choices.pop()}")

label = "No more panels to remove!"
if len(user_choices) > 0:
Expand Down
6 changes: 3 additions & 3 deletions shiny/quarto.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ def convert_code_cells_to_app_py(json_file: str | Path, app_file: str | Path) ->
from pathlib import Path
from shiny import App, Inputs, Outputs, Session, ui

{ "".join(global_code_cell_texts) }
{"".join(global_code_cell_texts)}


def server(input: Inputs, output: Outputs, session: Session) -> None:
{ "".join(session_code_cell_texts) }
{"".join(session_code_cell_texts)}

return None

Expand All @@ -87,7 +87,7 @@ def server(input: Inputs, output: Outputs, session: Session) -> None:
_static_assets = {{"/" + sa: Path(__file__).parent / sa for sa in _static_assets}}

app = App(
Path(__file__).parent / "{ data["html_file"] }",
Path(__file__).parent / "{data["html_file"]}",
server,
static_assets=_static_assets,
)
Expand Down