Skip to content

Commit

Permalink
docs: add callout notes for some APIs changes and additions (#10551)
Browse files Browse the repository at this point in the history
Co-authored-by: Phillip Cloud <[email protected]>
  • Loading branch information
NickCrews and cpcloud authored Dec 26, 2024
1 parent 8b57356 commit 2e1aa79
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ibis/backends/duckdb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,15 @@ def do_connect(
) -> None:
"""Create an Ibis client connected to a DuckDB database.
::: {.callout-note title="Changed in version 10.0.0"}
Before, we had special handling if the user passed the `temp_directory`
parameter, setting a custom default, and creating intermediate
directories if necessary. Now, we do nothing, and just pass the value
directly to DuckDB. You may need to add
`Path(your_temp_dir).mkdir(exists_ok=True, parents=True)`
to your code to maintain the old behavior.
:::
Parameters
----------
database
Expand Down
3 changes: 3 additions & 0 deletions ibis/expr/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,9 @@ def cases(
Equivalent to a SQL `CASE` statement.
::: {.callout-note title="Added in version 10.0.0"}
:::
Parameters
----------
branch
Expand Down
10 changes: 10 additions & 0 deletions ibis/expr/types/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2064,6 +2064,10 @@ def topk(
Computes a Table containing the top `k` values by a certain metric
(defaults to count).
::: {.callout-note title="Changed in version 9.5.0"}
Added `name` parameter.
:::
Parameters
----------
k
Expand Down Expand Up @@ -2268,6 +2272,9 @@ def value_counts(self, *, name: str | None = None) -> ir.Table:
│ c │ 3 │
│ d │ 4 │
└────────┴───────┘
::: {.callout-note title="Added in version 9.5.0"}
:::
"""
colname = self.get_name()
if name is None:
Expand Down Expand Up @@ -2774,6 +2781,9 @@ def to_list(self, **kwargs) -> list:
>>> t = ibis.examples.penguins.fetch()
>>> t.bill_length_mm.to_list(limit=5)
[39.1, 39.5, 40.3, None, 36.7]
::: {.callout-note title="Added in version 10.0.0"}
:::
"""
return self.to_pyarrow(**kwargs).to_pylist()

Expand Down
4 changes: 4 additions & 0 deletions ibis/expr/types/relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -4688,6 +4688,10 @@ def window_by(
def value_counts(self, *, name: str | None = None) -> ir.Table:
"""Compute a frequency table of this table's values.
::: {.callout-note title="Changed in version 10.0.0"}
Added `name` parameter.
:::
Parameters
----------
name
Expand Down

0 comments on commit 2e1aa79

Please sign in to comment.