Skip to content

Commit f36933c

Browse files
committed
chore: fix docs interlinks
1 parent 9a3f672 commit f36933c

27 files changed

+97
-124
lines changed

docs/_quarto.yml

+3-11
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,10 @@ quartodoc:
238238
desc: ""
239239
package: ibis
240240
contents:
241-
# # Column Selectors
241+
# Column Selectors
242242
- selectors
243243

244-
# # Schemas
245-
#
246-
# This module contains APIs for interacting with table schemas.
244+
# Schemas
247245
- expr.schema.Schema
248246

249247
# # Configuration Options
@@ -252,11 +250,5 @@ quartodoc:
252250
- config.SQL
253251
- config.ContextAdjustment
254252

255-
# # Data Types
256-
#
257-
# This module contains classes for handling the different logical types that
258-
# occur in databases.
259-
#
260-
# All data type constructors take a `nullable: bool` parameter whose default
261-
# value is [`True`][True].
253+
# Data types
262254
- expr.datatypes.core

docs/backends/impala.qmd

-3
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ render_methods(
107107
"truncate_table",
108108
"get_schema",
109109
"cache_table",
110-
"set_options",
111-
"set_compression_codec",
112110
)
113111
```
114112

@@ -128,7 +126,6 @@ render_methods(
128126
"partition_schema",
129127
"partitions",
130128
"refresh",
131-
"stats",
132129
"describe_formatted",
133130
)
134131
```

docs/concepts/internals.qmd

+6-11
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ The internals are designed to map the Ibis API to the backend.
2525
## Expressions
2626

2727
The main user-facing component of Ibis is expressions. The base class of all
28-
expressions in Ibis is the [ibis.expr.types.Expr][] class.
28+
expressions in Ibis is the
29+
[`Expr`](../reference/expression-generic.qmd#ibis.expr.types.core.Expr) class.
2930

3031
Expressions provide the user facing API, most of which is defined in
3132
`ibis/expr/api.py`.
@@ -37,25 +38,19 @@ inputs to `ibis.expr.types.Node` subclasses. Upon construction of a `Node`
3738
subclass, Ibis performs validation of every input to the node based on the rule
3839
that was used to declare the input.
3940

40-
Rules are defined in `ibis.expr.rules`
41+
Rules are defined in `ibis.expr.rules`.
4142

42-
<!-- prettier-ignore-start -->
43-
### The [`Expr`][ibis.expr.types.Expr] class
44-
<!-- prettier-ignore-end -->
43+
### The [`Expr`](../reference/expression-generic.qmd#ibis.expr.types.core.Expr) class
4544

4645
Expressions are a thin but important abstraction over operations, containing
4746
only type information and shape information, i.e., whether they are tables,
4847
columns, or scalars.
4948

50-
<!-- prettier-ignore-start -->
5149
Examples of expression types include
52-
[`StringValue`][ibis.expr.types.StringValue] and
53-
[`Table`][ibis.expr.types.Table].
54-
<!-- prettier-ignore-end -->
50+
[`StringValue`](../reference/expression-strings.qmd#ibis.expr.types.strings.StringValue) and
51+
[`Table`](../reference/expression-tables.qmd#ibis.expr.types.relations.Table).
5552

56-
<!-- prettier-ignore-start -->
5753
### The `ibis.expr.types.Node` Class
58-
<!-- prettier-ignore-end -->
5954

6055
`Node` subclasses make up the core set of operations of Ibis. Each node
6156
corresponds to a particular operation.

docs/posts/_metadata.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# freeze computational output
44
# (see https://quarto.org/docs/projects/code-execution.html#freeze)
5-
freeze: true
5+
freeze: auto
66

77
# Enable banner style title blocks
88
title-block-banner: true
@@ -11,6 +11,5 @@ title-block-banner: true
1111
comments:
1212
giscus:
1313
repo: ibis-project/ibis
14-
theme: light
1514
category: Q&A
1615
reactions-enabled: false

ibis/backends/base/sql/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ def raw_sql(self, query: str):
132132
"""Execute a query string and return the cursor used for execution.
133133
134134
::: {.callout-tip}
135-
## Consider using [`.sql`][ibis.backends.base.sql.BaseSQLBackend.sql] instead
135+
## Consider using [`.sql`](#ibis.backends.base.sql.BaseSQLBackend.sql) instead
136136
137137
If your query is a SELECT statement, you should use the
138-
[`.sql`][ibis.backends.base.sql.BaseSQLBackend.sql] method to avoid
138+
[backend `.sql`](#ibis.backends.base.sql.BaseSQLBackend.sql) method to avoid
139139
having to release the cursor returned from this method manually.
140140
141141
::: {.callout-warning collapse="true"}

ibis/backends/duckdb/__init__.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -693,13 +693,15 @@ def list_tables(self, like=None, database=None):
693693
)
694694
return self._filter_with_like(tables + views + temp_views, like)
695695

696-
def read_postgres(self, uri, table_name: str | None = None, schema: str = "public"):
696+
def read_postgres(
697+
self, uri: str, table_name: str | None = None, schema: str = "public"
698+
) -> ir.Table:
697699
"""Register a table from a postgres instance into a DuckDB table.
698700
699701
Parameters
700702
----------
701703
uri
702-
The postgres URI in form 'postgres://user:password@host:port'
704+
A postgres URI of the form `postgres://user:password@host:port`
703705
table_name
704706
The table to read
705707
schema

ibis/backends/impala/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ def insert(
918918
"""Insert data into an existing table.
919919
920920
See
921-
[`ImpalaTable.insert`][ibis.backends.impala.client.ImpalaTable.insert]
921+
[`ImpalaTable.insert`](../backends/impala.qmd#ibis.backends.impala.client.ImpalaTable.insert)
922922
for parameters.
923923
924924
Examples

ibis/backends/pyspark/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def compute_stats(self, noscan: bool = False):
4848
4949
See Also
5050
--------
51-
[`ibis.backends.spark.Backend.compute_stats`][ibis.backends.spark.Backend.compute_stats]
51+
[`pyspark.Backend.compute_stats`](../backends/pyspark.qmd#ibis.backends.pyspark.Backend.compute_stats)
5252
"""
5353
return self._client.compute_stats(self._qualified_name, noscan=noscan)
5454

ibis/config.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class SQL(Config):
6262
----------
6363
default_limit : int | None
6464
Number of rows to be retrieved for a table expression without an
65-
explicit limit. [`None`][None] means no limit.
65+
explicit limit. [](`None`) means no limit.
6666
default_dialect : str
6767
Dialect to use for printing SQL when the backend cannot be determined.
6868
"""
@@ -138,7 +138,7 @@ class Options(Config):
138138
repr : Repr
139139
Options controlling expression printing.
140140
verbose : bool
141-
Run in verbose mode if [`True`][True]
141+
Run in verbose mode if [](`True`)
142142
verbose_log: Callable[[str], None] | None
143143
A callable to use when logging.
144144
graphviz_repr : bool

ibis/expr/api.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def schema(
236236
names: Iterable[str] | None = None,
237237
types: Iterable[str | dt.DataType] | None = None,
238238
) -> sch.Schema:
239-
"""Validate and return a [`Schema`][ibis.expr.schema.Schema] object.
239+
"""Validate and return a [`Schema`](./expr.schema.Schema.qmd#ibis.expr.schema.Schema) object.
240240
241241
Parameters
242242
----------
@@ -342,10 +342,10 @@ def memtable(
342342
Do not depend on the underlying storage type (e.g., pyarrow.Table), it's subject
343343
to change across non-major releases.
344344
columns
345-
Optional [`Iterable`][typing.Iterable] of [`str`][str] column names.
345+
Optional [](`typing.Iterable`) of [](`str`) column names.
346346
schema
347-
Optional [`Schema`][ibis.expr.schema.Schema]. The functions use `data`
348-
to infer a schema if not passed.
347+
Optional [`Schema`](./expr.schema.Schema.qmd#ibis.expr.schema.Schema).
348+
The functions use `data` to infer a schema if not passed.
349349
name
350350
Optional name of the table.
351351
@@ -586,7 +586,7 @@ def or_(*predicates: ir.BooleanValue) -> ir.BooleanValue:
586586
def random() -> ir.FloatingScalar:
587587
"""Return a random floating point number in the range [0.0, 1.0).
588588
589-
Similar to [`random.random`][random.random] in the Python standard library.
589+
Similar to [](`random.random`) in the Python standard library.
590590
591591
Returns
592592
-------

ibis/expr/datatypes/core.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def from_pyarrow(value, nullable=True):
8989
class DataType(Concrete, Coercible):
9090
"""Base class for all data types.
9191
92-
[`DataType`][ibis.expr.datatypes.DataType] instances are immutable.
92+
Instances are immutable.
9393
"""
9494

9595
nullable: bool = True
@@ -473,7 +473,7 @@ class Null(Primitive):
473473

474474
@public
475475
class Boolean(Primitive):
476-
"""[`True`][True] or [`False`][False] values."""
476+
"""[](`True`) or [](`False`) values."""
477477

478478
scalar = "BooleanScalar"
479479
column = "BooleanColumn"

ibis/expr/datatypes/parse.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def spaceless_string(*strings: str):
5454
def parse(
5555
text: str, default_decimal_parameters: tuple[int | None, int | None] = (None, None)
5656
) -> dt.DataType:
57-
"""Parse a type from a [`str`][str] `text`.
57+
"""Parse a type from a [](`str`) `text`.
5858
5959
The default `maxsize` parameter for caching is chosen to cache the most
6060
commonly used types--there are about 30--along with some capacity for less

ibis/expr/datatypes/value.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def infer(value: Any) -> dt.DataType:
3939
# which should trigger infer_map instead
4040
@infer.register(collections.OrderedDict)
4141
def infer_struct(value: Mapping[str, Any]) -> dt.Struct:
42-
"""Infer the [`Struct`][ibis.expr.datatypes.Struct] type of `value`."""
42+
"""Infer the [`Struct`](./expr.datatypes.core.qmd#ibis.expr.datatypes.Struct) type of `value`."""
4343
if not value:
4444
raise TypeError("Empty struct type not supported")
4545
fields = {name: infer(val) for name, val in value.items()}
@@ -48,7 +48,7 @@ def infer_struct(value: Mapping[str, Any]) -> dt.Struct:
4848

4949
@infer.register(collections.abc.Mapping)
5050
def infer_map(value: Mapping[Any, Any]) -> dt.Map:
51-
"""Infer the [`Map`][ibis.expr.datatypes.Map] type of `value`."""
51+
"""Infer the [`Map`](./expr.datatypes.core.qmd#ibis.expr.datatypes.Map) type of `value`."""
5252
if not value:
5353
return dt.Map(dt.null, dt.null)
5454
try:
@@ -62,7 +62,7 @@ def infer_map(value: Mapping[Any, Any]) -> dt.Map:
6262

6363
@infer.register((list, tuple, set, frozenset))
6464
def infer_list(values: Sequence[Any]) -> dt.Array:
65-
"""Infer the [`Array`][ibis.expr.datatypes.Array] type of `value`."""
65+
"""Infer the [`Array`](./expr.datatypes.core.qmd#ibis.expr.datatypes.Array) type of `value`."""
6666
if not values:
6767
return dt.Array(dt.null)
6868
return dt.Array(highest_precedence(map(infer, values)))
@@ -140,7 +140,7 @@ def infer_enum(_: enum.Enum) -> dt.String:
140140

141141
@infer.register(decimal.Decimal)
142142
def infer_decimal(value: decimal.Decimal) -> dt.Decimal:
143-
"""Infer the [`Decimal`][ibis.expr.datatypes.Decimal] type of `value`."""
143+
"""Infer the [`Decimal`](./expr.datatypes.core.qmd#ibis.expr.datatypes.Decimal) type of `value`."""
144144
return dt.decimal
145145

146146

ibis/expr/schema.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ class Schema(Concrete, Coercible, MapSet):
2020
"""An object for holding table schema information."""
2121

2222
fields: FrozenDict[str, dt.DataType]
23-
"""A mapping of [`str`][str] to [`DataType`][ibis.expr.datatypes.DataType] objects
24-
representing the type of each column."""
23+
"""A mapping of [](`str`) to
24+
[`DataType`](./expr.datatypes.core.qmd#ibis.expr.datatypes.DataType)
25+
objects representing the type of each column."""
2526

2627
def __repr__(self) -> str:
2728
space = 2 + max(map(len, self.names), default=0)

ibis/expr/types/arrays.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ def __getitem__(self, index: int | ir.IntegerValue | slice) -> ir.Value:
6464
Returns
6565
-------
6666
Value
67-
- If `index` is an [`int`][int] or
68-
[`IntegerValue`][ibis.expr.types.IntegerValue] then the return
69-
type is the element type of `self`.
70-
- If `index` is a [`slice`][slice] then the return type is the same
67+
- If `index` is an [](`int`) or
68+
[`IntegerValue`](./expression-numeric.qmd#ibis.expr.types.IntegerValue)
69+
then the return type is the element type of `self`.
70+
- If `index` is a [](`slice`) then the return type is the same
7171
type as the input.
7272
7373
Examples
@@ -351,7 +351,7 @@ def join(self, sep: str | ir.StringValue) -> ir.StringValue:
351351
352352
See Also
353353
--------
354-
[`StringValue.join`][ibis.expr.types.strings.StringValue.join]
354+
[`StringValue.join`](./expression-strings.qmd#ibis.expr.types.strings.StringValue.join)
355355
"""
356356
return ops.ArrayStringJoin(sep, self).to_expr()
357357

ibis/expr/types/core.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def visualize(
171171
label_edges
172172
Show operation input names as edge labels
173173
verbose
174-
Print the graphviz DOT code to stderr if [`True`][True]
174+
Print the graphviz DOT code to stderr if [](`True`)
175175
176176
Raises
177177
------
@@ -260,10 +260,10 @@ def _find_backend(self, *, use_default: bool = False) -> BaseBackend:
260260
Parameters
261261
----------
262262
use_default
263-
If [`True`][True] and the default backend isn't set, initialize the
263+
If [](`True`) and the default backend isn't set, initialize the
264264
default backend and use that. This should only be set to `True` for
265265
`.execute()`. For other contexts such as compilation, this option
266-
doesn't make sense so the default value is [`False`][False].
266+
doesn't make sense so the default value is [](`False`).
267267
268268
Returns
269269
-------
@@ -566,8 +566,7 @@ def _binop(op_class: type[ops.Binary], left: ir.Value, right: ir.Value) -> ir.Va
566566
Parameters
567567
----------
568568
op_class
569-
The [`Binary`][ibis.expr.operations.Binary] subclass for the
570-
operation
569+
The `ops.Binary` subclass for the operation
571570
left
572571
Left operand
573572
right

ibis/expr/types/generic.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ def to_pandas(self, **kwargs) -> pd.Series:
906906
Parameters
907907
----------
908908
kwargs
909-
Same as keyword arguments to [`execute`][ibis.expr.types.core.Expr.execute]
909+
Same as keyword arguments to [`execute`](#ibis.expr.types.core.Expr.execute)
910910
911911
Examples
912912
--------
@@ -1626,9 +1626,9 @@ def literal(value: Any, type: dt.DataType | str | None = None) -> Scalar:
16261626
Ibis supports literal construction of arrays using the following
16271627
functions:
16281628
1629-
1. [`ibis.array`][ibis.array]
1630-
1. [`ibis.struct`][ibis.struct]
1631-
1. [`ibis.map`][ibis.map]
1629+
1. [`ibis.array`](./expression-collections.qmd#ibis.array)
1630+
1. [`ibis.struct`](./expression-collections.qmd#ibis.struct)
1631+
1. [`ibis.map`](./expression-collections.qmd#ibis.map)
16321632
16331633
Constructing these types using `literal` will be deprecated in a future
16341634
release.
@@ -1639,7 +1639,7 @@ def literal(value: Any, type: dt.DataType | str | None = None) -> Scalar:
16391639
value
16401640
A Python value
16411641
type
1642-
An instance of [`DataType`][ibis.expr.datatypes.DataType] or a string
1642+
An instance of [`DataType`](./expr.datatypes.core.qmd#ibis.expr.datatypes.DataType) or a string
16431643
indicating the ibis type of `value`. This parameter can be used
16441644
in cases where ibis's type inference isn't sufficient for discovering
16451645
the type of `value`.

ibis/expr/types/groupby.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def select(self, *exprs, **kwexprs) -> ir.Table:
215215
216216
See Also
217217
--------
218-
[`GroupedTable.mutate`][ibis.expr.types.groupby.GroupedTable.mutate]
218+
[`GroupedTable.mutate`](#ibis.expr.types.groupby.GroupedTable.mutate)
219219
"""
220220
exprs = self._selectables(*exprs, **kwexprs)
221221
return self.table.select(exprs)
@@ -225,7 +225,7 @@ def _selectables(self, *exprs, **kwexprs):
225225
226226
See Also
227227
--------
228-
[`GroupedTable.mutate`][ibis.expr.types.groupby.GroupedTable.mutate]
228+
[`GroupedTable.mutate`](#ibis.expr.types.groupby.GroupedTable.mutate)
229229
"""
230230
table = self.table
231231
default_frame = self._get_window()

0 commit comments

Comments
 (0)