Skip to content

Commit

Permalink
chore: Remove many broken quartodoc links (#1061)
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke committed Jan 25, 2024
1 parent 6023c66 commit b6907f7
Show file tree
Hide file tree
Showing 47 changed files with 540 additions and 507 deletions.
4 changes: 4 additions & 0 deletions docs/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,9 @@ filters:

interlinks:
sources:
PIL:
url: https://pillow.readthedocs.io/en/stable/
matplotlib:
url: https://matplotlib.org/stable/
python:
url: https://docs.python.org/3/
73 changes: 51 additions & 22 deletions docs/_quartodoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ quartodoc:
contents:
- ui.input_file
- ui.download_button
- ui.download_link
- title: Custom UI
desc: Lower-level UI functions for creating custom HTML/CSS/JS
contents:
Expand Down Expand Up @@ -164,27 +165,13 @@ quartodoc:
- render.image
- render.table
- render.text
- render.code
- render.ui
- render.express
- render.download
- render.data_frame
- render.DataGrid
- render.DataTable
- kind: page
path: Renderer
flatten: true
summary:
name: "Create output renderers"
desc: "Package author methods for creating new output renderers."
contents:
- render.renderer.Renderer
- name: render.renderer.Jsonifiable
dynamic: false
- name: render.renderer.ValueFn
dynamic: false
- name: render.renderer.AsyncValueFn
dynamic: false
- name: render.renderer.RendererT
dynamic: false
- title: Reactive programming
desc: ""
contents:
Expand Down Expand Up @@ -231,12 +218,47 @@ quartodoc:
- title: Developer facing tools
desc: ""
contents:
- session.get_current_session
- session.require_active_session
- session.session_context
- reactive.get_current_context
- name: input_handler.input_handlers
dynamic: true
- kind: page
path: Session
summary:
name: "Session"
desc: ""
flatten: true
contents:
- session.get_current_session
- session.require_active_session
- session.session_context
- reactive.get_current_context
- name: input_handler.input_handlers
dynamic: true
- kind: page
path: Renderer
flatten: true
summary:
name: "Create output renderers"
desc: "Package author methods for creating new output renderers."
contents:
- render.renderer.Renderer
- name: render.renderer.Jsonifiable
dynamic: false
- name: render.renderer.ValueFn
dynamic: false
- name: render.renderer.AsyncValueFn
dynamic: false
- name: render.renderer.RendererT
dynamic: false
- kind: page
path: Htmltools
flatten: true
package: null
summary:
name: "htmltools methods"
desc: ""
contents:
- name: htmltools.HTMLDependency
dynamic: false
- name: htmltools.css
dynamic: false
- title: Types
desc: ""
contents:
Expand All @@ -255,6 +277,7 @@ quartodoc:
- ui.Sidebar
- ui.CardItem
- ui.AccordionPanel
- reactive.Context
- name: ui.css.CssUnit
dynamic: false
- ui._input_slider.SliderValueArg
Expand All @@ -277,6 +300,12 @@ quartodoc:
dynamic: false
- name: htmltools.TagList
dynamic: false
- name: htmltools.TagFunction
dynamic: false
- name: htmltools.Tagifiable
dynamic: false
- name: htmltools.MetadataNode
dynamic: false
- kind: page
path: ExceptionTypes
summary:
Expand Down
4 changes: 2 additions & 2 deletions shiny/_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from ._utils import guess_mime_type, is_async_callable
from .html_dependencies import jquery_deps, require_deps, shiny_deps
from .http_staticfiles import FileResponse, StaticFiles
from .session import Inputs, Outputs, Session, session_context
from .session._session import Inputs, Outputs, Session, session_context

T = TypeVar("T")

Expand Down Expand Up @@ -319,7 +319,7 @@ async def stop(self) -> None:
See Also
--------
~shiny.Session.close
* :func:`~shiny.Session.close`
"""
# convert to list to avoid modifying the dict while iterating over it, which
# throws an error
Expand Down
2 changes: 1 addition & 1 deletion shiny/_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def run_app(
Tip
---
The ``shiny run`` command-line interface (which comes installed with Shiny) provides
the same functionality as :func:`~shiny.run_app`.
the same functionality as `shiny.run_app()`.
Examples
--------
Expand Down
8 changes: 4 additions & 4 deletions shiny/_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def req(*args: T, cancel_output: bool | Literal["progress"] = False) -> T | None
"""
Throw a silent exception for falsy values.
This is a convenient shorthand for throwing :func:`~shiny.types.SilentException` /
:func:`~shiny.types.SilentCancelOutputException` if any of the arguments are falsy.
This is a convenient shorthand for throwing :class:`~shiny.types.SilentException` /
:class:`~shiny.types.SilentCancelOutputException` if any of the arguments are falsy.
The term "falsy" generally indicates that a value is considered `False` when
encountered in a logical context. We use the term a little loosely here; our usage
Expand All @@ -42,8 +42,8 @@ def req(*args: T, cancel_output: bool | Literal["progress"] = False) -> T | None
*args
Any number of arguments to check.
cancel_output
If ``True``, throw :func:`~shiny.types.SilentCancelOutputException` instead of
:func:`~shiny.types.SilentException`.
If ``True``, throw :class:`~shiny.types.SilentCancelOutputException` instead of
:class:`~shiny.types.SilentException`.
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion shiny/experimental/ui/_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def card_title(
resolved :class:`~htmltools.Tag` object.
container
Method for the returned :class:`~htmltools.Tag` object. Defaults to
:func:`~shiny.ui.tags`.h5.
:func:`~shiny.ui.tags.h5`.
**kwargs
Additional HTML attributes for the returned :class:`~htmltools.Tag` object.
Expand Down
10 changes: 5 additions & 5 deletions shiny/experimental/ui/_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ def panel_main(
# Deprecated 2023-09-12
CssUnit = MainCssUnit
"""
Deprecated. Please use `shiny.ui.css_unit.CssUnit` instead.
Deprecated. Please use `shiny.ui.css.CssUnit` instead.
"""


Expand All @@ -612,12 +612,12 @@ def as_css_unit(value: CssUnit) -> str:
# Deprecated 2023-09-12
def as_css_unit(value: None | CssUnit) -> None | str:
"""
Deprecated. Please use :func:`~shiny.ui.css_unit.as_css_unit()` instead.
Deprecated. Please use :func:`~shiny.ui.css.as_css_unit()` instead.
"""
warn_deprecated(
"`shiny.experimental.ui.as_css_unit()` is deprecated. "
"This method will be removed in a future version, "
"please use `shiny.ui.css_unit.as_css_unit()` instead."
"please use `shiny.ui.css.as_css_unit()` instead."
)
return main_as_css_unit(value)

Expand All @@ -635,12 +635,12 @@ def as_css_padding(padding: None) -> None:
# Deprecated 2023-09-12
def as_css_padding(padding: CssUnit | list[CssUnit] | None) -> str | None:
"""
Deprecated. Please use :func:`~shiny.ui.css_unit.as_css_padding()` instead.
Deprecated. Please use :func:`~shiny.ui.css.as_css_padding()` instead.
"""
warn_deprecated(
"`shiny.experimental.ui.as_css_padding()` is deprecated. "
"This method will be removed in a future version, "
"please use `shiny.ui.css_unit.as_css_padding()` instead."
"please use `shiny.ui.css.as_css_padding()` instead."
)
return main_as_css_padding(padding)

Expand Down
4 changes: 2 additions & 2 deletions shiny/express/_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ def output_args(
"""
Sets default UI arguments for a Shiny rendering function.
Each Shiny render function (like :func:`~shiny.render.plot`) can display itself when
Each Shiny render function (like :class:`~shiny.render.plot`) can display itself when
declared within a Shiny inline-style application. In the case of
:func:`~shiny.render.plot`, the :func:`~shiny.ui.output_plot` function is called
:class:`~shiny.render.plot`, the :func:`~shiny.ui.output_plot` function is called
implicitly to display the plot. Use the `@ui_kwargs` decorator to specify arguments
to be passed to `output_plot` (or whatever the corresponding UI function is) when
the render function displays itself.
Expand Down
2 changes: 1 addition & 1 deletion shiny/express/_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def wrap_express_app(file: Path) -> App:
Returns
-------
:
A `shiny.App` object.
A :class:`shiny.App` object.
"""
try:
with session_context(cast(Session, MockSession())):
Expand Down
14 changes: 7 additions & 7 deletions shiny/express/ui/_cm_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def layout_sidebar(
This function wraps :func:`~shiny.ui.layout_sidebar`.
Create a sidebar layout component which can be dropped inside any Shiny UI page
method (e.g. :func:`~shiny.shiny.ui.page_fillable`) or :func:`~shiny.ui.card`
method (e.g. :func:`~shiny.ui.page_fillable`) or :func:`~shiny.ui.card`
context.
The first child needs to be of class :class:`~shiny.ui.Sidebar` object created by
Expand All @@ -159,10 +159,10 @@ def layout_sidebar(
----------
fillable
Whether or not the main content area should be wrapped in a fillable container.
See :func:`~shiny.ui.as_fillable_container` for details.
See :func:`~shiny.ui.fill.as_fillable_container` for details.
fill
Whether or not the sidebar layout should be wrapped in a fillable container. See
:func:`~shiny.ui.as_fill_item` for details.
:func:`~shiny.ui.fill.as_fill_item` for details.
bg,fg
A background or foreground color.
border
Expand Down Expand Up @@ -370,7 +370,7 @@ def layout_columns(
See Also
--------
* :func:`~shiny.express.layout.layout_column_wrap` for laying out elements into a
* :func:`~shiny.express.ui.layout_column_wrap` for laying out elements into a
uniform grid.
Reference
Expand Down Expand Up @@ -1250,7 +1250,7 @@ def panel_conditional(
Tip
---
A more powerful (but slower) way to conditionally show UI content is to use
:func:`~shiny.render.ui`.
:class:`~shiny.render.ui`.
"""
return RecallContextManager(
ui.panel_conditional,
Expand Down Expand Up @@ -1286,8 +1286,8 @@ def panel_fixed(
Arguments passed along to :func:`~shiny.ui.panel_absolute`.
See Also
-------
:func:`~shiny.ui.panel_absolute`
--------
* :func:`~shiny.ui.panel_absolute`
"""
return RecallContextManager(
ui.panel_fixed,
Expand Down
2 changes: 1 addition & 1 deletion shiny/input_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _process_value(self, type: str, value: Any, name: str, session: Session) ->
Add and/or remove input handlers of a given ``type``. Shiny uses these handlers to
pre-process input values from the client (after being deserialized) before passing them
to the ``input`` argument of an :func:`~shiny.App`'s ``server`` function.
to the ``input`` argument of an :class:`~shiny.App`'s ``server`` function.
The ``type`` is based on the ``getType()`` JavaScript method on the relevant Shiny
input binding. See `this article <https://shiny.posit.co/articles/js-custom-input.html>`_
Expand Down
21 changes: 11 additions & 10 deletions shiny/reactive/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def use_context(self, ctx: Context) -> typing.Generator[None, None, None]:
self._current_context.reset(old)

def current_context(self) -> Context:
"""Return the current Context object"""
"""Return the current `Context` object"""
ctx = self._current_context.get()
if ctx is None:
raise RuntimeError("No current reactive context")
Expand Down Expand Up @@ -224,7 +224,7 @@ def isolate() -> Generator[None, None, None]:
See Also
--------
~shiny.reactive.event
* :func:`~shiny.reactive.event`
"""
with _reactive_environment.isolate():
yield
Expand All @@ -237,7 +237,7 @@ def get_current_context() -> Context:
Returns
-------
:
A :class:`~Context`.
A `~shiny.reactive.Context` class.
Raises
------
Expand Down Expand Up @@ -282,7 +282,7 @@ def on_flushed(
See Also
--------
flush
* :func:`~shiny.reactive.flush`
"""

return _reactive_environment.on_flushed(func, once)
Expand Down Expand Up @@ -317,12 +317,13 @@ def invalidate_later(
Note
----
When called within a reactive function (i.e., :func:`~reactive.effect`, :func:`~reactive.calc`,
:func:`render.ui`, etc.), that reactive context is invalidated (and re-executes)
after the interval has passed. The re-execution will reset the invalidation flag, so
in a typical use case, the object will keep re-executing and waiting for the
specified interval. It's possible to stop this cycle by adding conditional logic
that prevents the ``invalidate_later`` from being run.
When called within a reactive function (i.e., :func:`~shiny.reactive.effect`,
:func:`~shiny.reactive.calc`, :class:`shiny.render.ui`, etc.), that reactive context
is invalidated (and re-executes) after the interval has passed. The re-execution
will reset the invalidation flag, so in a typical use case, the object will keep
re-executing and waiting for the specified interval. It's possible to stop this
cycle by adding conditional logic that prevents the ``invalidate_later`` from being
run.
"""

if isinstance(session, MISSING_TYPE):
Expand Down
Loading

0 comments on commit b6907f7

Please sign in to comment.