Skip to content

Commit 68086fd

Browse files
authored
Merge branch 'main' into add-narwhals-integration-method
2 parents 731fd2c + 81a4192 commit 68086fd

File tree

5 files changed

+16
-36
lines changed

5 files changed

+16
-36
lines changed

docs/_quartodoc-core.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ quartodoc:
99
renderer:
1010
style: _renderer.py
1111
show_signature_annotations: false
12+
table_style: description-list
1213
sections:
1314
- title: Page containers
1415
desc: Create a user interface page container.
@@ -357,3 +358,4 @@ quartodoc:
357358
contents:
358359
- name: experimental.ui.card_image
359360
dynamic: false
361+

docs/_quartodoc-express.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ quartodoc:
99
renderer:
1010
style: _renderer.py
1111
show_signature_annotations: false
12+
table_style: description-list
1213
sections:
1314
- title: Input components
1415
desc: Gather user input.

docs/_renderer.py

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
from griffe import (
1313
Alias,
1414
DocstringAttribute,
15-
DocstringParameter,
16-
DocstringSectionParameters,
1715
DocstringSectionText,
1816
Expr,
1917
ExprName,
@@ -22,8 +20,8 @@
2220
)
2321
from plum import dispatch
2422
from quartodoc import MdRenderer
25-
from quartodoc.pandoc.blocks import DefinitionList
2623
from quartodoc.renderers.base import convert_rst_link_to_md, sanitize
24+
from quartodoc.renderers.md_renderer import ParamRow
2725

2826
# from quartodoc.ast import preview
2927

@@ -101,12 +99,12 @@ def render_annotation(self, el: str):
10199
# TODO-future; Can be removed once we use quartodoc 0.3.5
102100
# Related: https://github.com/machow/quartodoc/pull/205
103101
@dispatch
104-
def render(self, el: DocstringAttribute):
105-
row = [
106-
sanitize(el.name),
107-
self.render_annotation(el.annotation),
108-
sanitize(el.description or "", allow_markdown=True),
109-
]
102+
def render(self, el: DocstringAttribute) -> ParamRow:
103+
row = ParamRow(
104+
el.name,
105+
el.description or "",
106+
annotation=self.render_annotation(el.annotation),
107+
)
110108
return row
111109

112110
@dispatch
@@ -170,28 +168,6 @@ def summarize(self, obj: Union[Object, Alias]) -> str:
170168

171169
return ""
172170

173-
# Consolidate the parameter type info into a single column
174-
@dispatch
175-
def render(self, el: DocstringParameter):
176-
param = f'<span class="parameter-name">{el.name}</span>'
177-
annotation = self.render_annotation(el.annotation)
178-
if annotation:
179-
param = f'{param}<span class="parameter-annotation-sep">:</span> <span class="parameter-annotation">{annotation}</span>'
180-
if el.default:
181-
param = f'{param} <span class="parameter-default-sep">=</span> <span class="parameter-default">{el.default}</span>'
182-
183-
# Wrap everything in a code block to allow for links
184-
param = "<code>" + param + "</code>"
185-
186-
return (param, el.description)
187-
188-
@dispatch
189-
def render(self, el: DocstringSectionParameters):
190-
rows = list(map(self.render, el.value))
191-
# rows is a list of tuples of (<parameter>, <description>)
192-
193-
return str(DefinitionList(rows))
194-
195171
@dispatch
196172
def signature(self, el: Function, source: Optional[Alias] = None):
197173
if el.name == "__call__":
@@ -279,7 +255,7 @@ def read_file(file: str | Path, root_dir: str | Path | None = None) -> FileConte
279255

280256

281257
def check_if_missing_expected_example(el, converted):
282-
if re.search(r"(^|\n)#{2,6} Examples\n", converted):
258+
if re.search(r"(^|\n)#{2,6} Examples", converted):
283259
# Manually added examples are fine
284260
return
285261

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@ doc = [
120120
"tabulate",
121121
"shinylive",
122122
"pydantic>=2.7.4",
123-
"quartodoc>=0.7.6",
124-
"griffe>=1.1.1",
123+
# "quartodoc>=0.8.0",
124+
"quartodoc@git+https://github.com/machow/quartodoc@main",
125+
"griffe>=1.3.2",
125126
]
126127

127128
[project.urls]

shiny/render/_data_frame.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,9 +850,9 @@ async def update_cell_value(
850850
----------
851851
value
852852
The new value to set the cell to.
853-
row_index
853+
row
854854
The row index of the cell to update.
855-
column_index
855+
column
856856
The column index of the cell to update.
857857
"""
858858
# TODO-barret; Test these assertions

0 commit comments

Comments
 (0)