Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs - categorize deprecated functions #815

Merged
merged 1 commit into from
Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/explorer/data_frame.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,7 @@ defmodule Explorer.DataFrame do
def lazy(df), do: Shared.apply_impl(df, :lazy)

@deprecated "Use lazy/1 instead"
@doc type: :conversion
@doc type: :deprecated
def to_lazy(df), do: Shared.apply_impl(df, :lazy)

@doc """
Expand Down Expand Up @@ -3162,7 +3162,7 @@ defmodule Explorer.DataFrame do
end

@deprecated "Use sort_by/3 instead"
@doc type: :single
@doc type: :deprecated
defmacro arrange(df, query, opts \\ []) do
quote do
Explorer.DataFrame.sort_by(unquote(df), unquote(query), unquote(opts))
Expand Down Expand Up @@ -3288,7 +3288,7 @@ defmodule Explorer.DataFrame do
end

@deprecated "Use sort_with/3 instead"
@doc type: :single
@doc type: :deprecated
def arrange_with(df, fun, opts \\ []), do: sort_with(df, fun, opts)

@doc """
Expand Down
2 changes: 2 additions & 0 deletions lib/explorer/series.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5838,13 +5838,15 @@ defmodule Explorer.Series do
do: dtype_error("week_of_year/1", dtype, @date_or_datetime_dtypes)

@deprecated "Use cast(:date) instead"
@doc type: :deprecated
def to_date(%Series{dtype: dtype} = series) when K.in(dtype, @datetime_dtypes),
do: cast(series, :date)

def to_date(%Series{dtype: dtype}),
do: dtype_error("to_date/1", dtype, @datetime_dtypes)

@deprecated "Use cast(:time) instead"
@doc type: :deprecated
def to_time(%Series{dtype: dtype} = series) when K.in(dtype, @datetime_dtypes),
do: cast(series, :time)

Expand Down
3 changes: 2 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ defmodule Explorer.MixProject do
"Functions: Introspection": &(&1[:type] == :introspection),
"Functions: IO": &(&1[:type] == :io),
"Functions: Shape": &(&1[:type] == :shape),
"Functions: Window": &(&1[:type] == :window)
"Functions: Window": &(&1[:type] == :window),
"Functions: Deprecated": &(&1[:type] == :deprecated)
],
extras: ["notebooks/exploring_explorer.livemd", "CHANGELOG.md"],
skip_undefined_reference_warnings_on: ["CHANGELOG.md"]
Expand Down
Loading