Skip to content

Commit

Permalink
docs: add callout notes for some APIs changes and additions
Browse files Browse the repository at this point in the history
fixes #10535
  • Loading branch information
NickCrews committed Dec 3, 2024
1 parent 6cf461f commit e650032
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 @@ -384,6 +384,15 @@ def do_connect(
>>> import ibis
>>> ibis.duckdb.connect(threads=4, memory_limit="1GB") # doctest: +ELLIPSIS
<ibis.backends.duckdb.Backend object at 0x...>
::: {.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.
:::
"""
if not isinstance(database, Path) and not database.startswith(
("md:", "motherduck:", ":memory:")
Expand Down
3 changes: 3 additions & 0 deletions ibis/expr/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,9 @@ def cases(
│ divisible by 2 │
│ divisible by 2 │
└────────────────┘
::: {.callout-note title="Added in version 10.0.0"}
:::
"""
cases, results = zip(branch, *branches)
return ops.SearchedCase(cases=cases, results=results, default=else_).to_expr()
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 @@ -2122,6 +2122,10 @@ def topk(
│ J │ 5.01 │
│ H │ 4.13 │
└────────┴───────────┘
::: {.callout-note title="Changed in version 9.5.0"}
Added `name` parameter.
:::
"""
from ibis.expr.types.relations import bind

Expand Down Expand Up @@ -2279,6 +2283,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 @@ -2785,6 +2792,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 @@ -4720,6 +4720,10 @@ def value_counts(self, *, name: str | None = None) -> ir.Table:
│ 2009 │ Dream │ 44 │
│ 2009 │ Torgersen │ 16 │
└───────┴───────────┴───────────────────┘
::: {.callout-note title="Changed in version 10.0.0"}
Added `name` parameter.
:::
"""
columns = self.columns
if name is None:
Expand Down

0 comments on commit e650032

Please sign in to comment.