Skip to content

Commit

Permalink
docs: add deferred, range, e, and pi to API reference (#9592)
Browse files Browse the repository at this point in the history
Co-authored-by: Gil Forsyth <gil@forsyth.dev>
Co-authored-by: Phillip Cloud <417981+cpcloud@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 15, 2024
1 parent 61ef0ed commit 43b116b
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 8 deletions.
40 changes: 34 additions & 6 deletions docs/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ interlinks:
sources:
python:
url: https://docs.python.org/3/
sqlalchemy:
url: https://docs.sqlalchemy.org/
arrow:
url: https://arrow.apache.org/docs/
pandas:
Expand Down Expand Up @@ -286,12 +284,19 @@ quartodoc:
name: Generic expressions
desc: Scalars and columns of any element type.
contents:
# types
- name: Value
package: ibis.expr.types.generic
- name: Column
package: ibis.expr.types.generic
- name: Deferred
package: ibis.common.deferred
- name: Scalar
package: ibis.expr.types.generic

# constants
- name: deferred
package: ibis.expr.api
- name: literal
dynamic: true
signature_name: full
Expand All @@ -301,27 +306,37 @@ quartodoc:
- name: "null"
dynamic: true
signature_name: full
- name: range
dynamic: true
signature_name: full
- name: coalesce
dynamic: true
signature_name: full

# comparisons
- name: least
dynamic: true
signature_name: full
- name: greatest
dynamic: true
signature_name: full
- name: asc
- name: ifelse
dynamic: true
signature_name: full
- name: desc
- name: case
dynamic: true
signature_name: full
- name: ifelse

# sorting
- name: asc
dynamic: true
signature_name: full
- name: case
- name: desc
dynamic: true
signature_name: full

# conversions
# TODO: add decompile here once the API is not experimental
- name: to_sql
dynamic: true
signature_name: full
Expand Down Expand Up @@ -356,6 +371,12 @@ quartodoc:
dynamic: true
signature_name: full

# constants
- name: e
package: ibis.expr.api
- name: pi
package: ibis.expr.api

- kind: page
path: expression-strings
package: ibis.expr.types.strings
Expand Down Expand Up @@ -642,6 +663,13 @@ quartodoc:
desc: "Scalar user-defined function APIs"
contents:
- scalar
- kind: page
path: aggregate-udfs
summary:
name: Aggregate UDFs (experimental)
desc: "Aggregate user-defined function APIs"
contents:
- agg

- title: Configuration
desc: "Ibis configuration"
Expand Down
4 changes: 2 additions & 2 deletions ibis/expr/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2094,8 +2094,8 @@ def range(start, stop, step) -> ir.ArrayValue:
Integer ranges are supported, as well as timestamp ranges.
::: {.callout-note}
`start` is inclucive and `stop` is exclusive, just like Python's builtin
[`range`](range).
`start` is inclusive and `stop` is exclusive, just like Python's builtin
[](`range`).
When `step` equals 0, however, this function will return an empty array.
Expand Down
7 changes: 7 additions & 0 deletions ibis/expr/operations/udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,13 @@ def pyarrow(

@public
class agg(_UDF):
"""Aggregate user-defined functions.
::: {.callout-note}
## The `agg` class itself is **not** a public API, its methods are.
:::
"""

__slots__ = ()

_base = AggUDF
Expand Down

0 comments on commit 43b116b

Please sign in to comment.