Skip to content

Commit

Permalink
docs: Remove warnings when building docs (#1631)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeaMariaLeon authored Dec 20, 2024
1 parent 35b1849 commit 7a19378
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 32 deletions.
12 changes: 6 additions & 6 deletions narwhals/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,15 @@ class DataFrame(BaseFrame[DataFrameT]):
- If the native object is a eager dataframe from one of the supported
backend (e.g. pandas.DataFrame, polars.DataFrame, pyarrow.Table),
you can use [`narwhals.from_native`](../narwhals/#narwhals.from_native):
you can use [`narwhals.from_native`][]:
```py
narwhals.from_native(native_dataframe)
narwhals.from_native(native_dataframe, eager_only=True)
```
- If the object is a dictionary of column names and generic sequences mapping
(e.g. `dict[str, list]`), you can create a DataFrame via
[`narwhals.from_dict`](../narwhals/#narwhals.from_dict):
[`narwhals.from_dict`][]:
```py
narwhals.from_dict(
data={"a": [1, 2, 3]},
Expand Down Expand Up @@ -1197,7 +1197,7 @@ def drop_nulls(self: Self, subset: str | list[str] | None = None) -> Self:
Notes:
pandas handles null values differently from Polars and PyArrow.
See [null_handling](../../pandas_like_concepts/null_handling)
See [null_handling](../pandas_like_concepts/null_handling.md)
for reference.
Examples:
Expand Down Expand Up @@ -2677,7 +2677,7 @@ def null_count(self: Self) -> Self:
Notes:
pandas handles null values differently from Polars and PyArrow.
See [null_handling](../../pandas_like_concepts/null_handling)
See [null_handling](../pandas_like_concepts/null_handling.md/)
for reference.
Examples:
Expand Down Expand Up @@ -3131,7 +3131,7 @@ class LazyFrame(BaseFrame[FrameT]):
!!! warning
This class is not meant to be instantiated directly - instead use
[`narwhals.from_native`](../narwhals/#narwhals.from_native) with a native
[`narwhals.from_native`][] with a native
object that is a lazy dataframe from one of the supported
backend (e.g. polars.LazyFrame, dask_expr._collection.DataFrame):
```py
Expand Down Expand Up @@ -3338,7 +3338,7 @@ def drop_nulls(self: Self, subset: str | list[str] | None = None) -> Self:
Notes:
pandas handles null values differently from Polars and PyArrow.
See [null_handling](../../pandas_like_concepts/null_handling)
See [null_handling](../pandas_like_concepts/null_handling.md/)
for reference.
Examples:
Expand Down
10 changes: 5 additions & 5 deletions narwhals/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,7 @@ def is_null(self) -> Self:
Notes:
pandas handles null values differently from Polars and PyArrow.
See [null_handling](../../pandas_like_concepts/null_handling)
See [null_handling](../pandas_like_concepts/null_handling.md/)
for reference.
Examples:
Expand Down Expand Up @@ -1985,7 +1985,7 @@ def fill_null(
Notes:
pandas handles null values differently from Polars and PyArrow.
See [null_handling](../../pandas_like_concepts/null_handling)
See [null_handling](../pandas_like_concepts/null_handling.md/)
for reference.
Examples:
Expand Down Expand Up @@ -2123,7 +2123,7 @@ def drop_nulls(self) -> Self:
Notes:
pandas handles null values differently from Polars and PyArrow.
See [null_handling](../../pandas_like_concepts/null_handling)
See [null_handling](../pandas_like_concepts/null_handling.md/)
for reference.
Examples:
Expand Down Expand Up @@ -2439,7 +2439,7 @@ def null_count(self) -> Self:
Notes:
pandas handles null values differently from Polars and PyArrow.
See [null_handling](../../pandas_like_concepts/null_handling)
See [null_handling](../pandas_like_concepts/null_handling.md/)
for reference.
Examples:
Expand Down Expand Up @@ -6089,7 +6089,7 @@ def nth(*indices: int | Sequence[int]) -> Expr:
Notes:
`nth` is not supported for Polars version<1.0.0. Please use
[`col`](../narwhals/#narwhals.col) instead.
[`narwhals.col`][] instead.
Arguments:
indices: One or more indices representing the columns to retrieve.
Expand Down
2 changes: 1 addition & 1 deletion narwhals/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def from_dict(
"""Instantiate DataFrame from dictionary.
Indexes (if present, for pandas-like backends) are aligned following
the [left-hand-rule](https://narwhals-dev.github.io/narwhals/pandas_like_concepts/pandas_index/).
the [left-hand-rule](../pandas_like_concepts/pandas_index.md/).
Notes:
For pandas-like dataframes, conversion to schema is applied after dataframe
Expand Down
12 changes: 6 additions & 6 deletions narwhals/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ class Series(Generic[IntoSeriesT]):
- If the native object is a series from one of the supported backend (e.g.
pandas.Series, polars.Series, pyarrow.ChunkedArray), you can use
[`narwhals.from_native`](../narwhals/#narwhals.from_native):
[`narwhals.from_native`][]:
```py
narwhals.from_native(native_series, allow_series=True)
narwhals.from_native(native_series, series_only=True)
```
- If the object is a generic sequence (e.g. a list or a tuple of values), you can
create a series via [`narwhals.new_series`](../narwhals/#narwhals.new_series):
create a series via [`narwhals.new_series`][]:
```py
narwhals.new_series(
name=name,
Expand Down Expand Up @@ -1282,7 +1282,7 @@ def drop_nulls(self) -> Self:
Notes:
pandas handles null values differently from Polars and PyArrow.
See [null_handling](../../pandas_like_concepts/null_handling)
See [null_handling](../pandas_like_concepts/null_handling.md/)
for reference.
Examples:
Expand Down Expand Up @@ -1892,7 +1892,7 @@ def is_null(self) -> Self:
Notes:
pandas handles null values differently from Polars and PyArrow.
See [null_handling](../../pandas_like_concepts/null_handling)
See [null_handling](../pandas_like_concepts/null_handling.md/)
for reference.
Examples:
Expand Down Expand Up @@ -1954,7 +1954,7 @@ def fill_null(
Notes:
pandas handles null values differently from Polars and PyArrow.
See [null_handling](../../pandas_like_concepts/null_handling)
See [null_handling](../pandas_like_concepts/null_handling.md/)
for reference.
Examples:
Expand Down Expand Up @@ -2459,7 +2459,7 @@ def null_count(self: Self) -> int:
Notes:
pandas handles null values differently from Polars and PyArrow.
See [null_handling](../../pandas_like_concepts/null_handling)
See [null_handling](../pandas_like_concepts/null_handling.md/)
for reference.
Examples:
Expand Down
20 changes: 10 additions & 10 deletions narwhals/stable/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ class DataFrame(NwDataFrame[IntoDataFrameT]):
- If the native object is a eager dataframe from one of the supported
backend (e.g. pandas.DataFrame, polars.DataFrame, pyarrow.Table),
you can use [`narwhals.from_native`](../narwhals/#narwhals.from_native):
you can use [`narwhals.from_native`][]:
```py
narwhals.from_native(native_dataframe)
narwhals.from_native(native_dataframe, eager_only=True)
```
- If the object is a dictionary of column names and generic sequences mapping
(e.g. `dict[str, list]`), you can create a DataFrame via
[`narwhals.from_dict`](../narwhals/#narwhals.from_dict):
[`narwhals.from_dict`][]:
```py
narwhals.from_dict(
data={"a": [1, 2, 3]},
Expand Down Expand Up @@ -384,7 +384,7 @@ class LazyFrame(NwLazyFrame[IntoFrameT]):
!!! warning
This class is not meant to be instantiated directly - instead use
[`narwhals.from_native`](../narwhals/#narwhals.from_native) with a native
[`narwhals.from_native`][] with a native
object that is a lazy dataframe from one of the supported
backend (e.g. polars.LazyFrame, dask_expr._collection.DataFrame):
```py
Expand Down Expand Up @@ -450,14 +450,14 @@ class Series(NwSeries[Any]):
- If the native object is a series from one of the supported backend (e.g.
pandas.Series, polars.Series, pyarrow.ChunkedArray), you can use
[`narwhals.from_native`](../narwhals/#narwhals.from_native):
[`narwhals.from_native`][]:
```py
narwhals.from_native(native_series, allow_series=True)
narwhals.from_native(native_series, series_only=True)
```
- If the object is a generic sequence (e.g. a list or a tuple of values), you can
create a series via [`narwhals.new_series`](../narwhals/#narwhals.new_series):
create a series via [`narwhals.new_series`][]:
```py
narwhals.new_series(
name=name,
Expand Down Expand Up @@ -2008,7 +2008,7 @@ def from_native(
**Deprecated** (v1.13.0):
Please use `pass_through` instead. Note that `strict` is still available
(and won't emit a deprecation warning) if you use `narwhals.stable.v1`,
see [perfect backwards compatibility policy](https://narwhals-dev.github.io/narwhals/backcompat/).
see [perfect backwards compatibility policy](../backcompat.md/).
pass_through: Determine what happens if the object can't be converted to Narwhals:
- `False` or `None` (default): raise an error
Expand Down Expand Up @@ -2106,7 +2106,7 @@ def to_native(
**Deprecated** (v1.13.0):
Please use `pass_through` instead. Note that `strict` is still available
(and won't emit a deprecation warning) if you use `narwhals.stable.v1`,
see [perfect backwards compatibility policy](https://narwhals-dev.github.io/narwhals/backcompat/).
see [perfect backwards compatibility policy](../backcompat.md/).
pass_through: Determine what happens if `narwhals_object` isn't a Narwhals class:
- `False` (default): raise an error
Expand Down Expand Up @@ -2159,7 +2159,7 @@ def narwhalify(
strict: **Deprecated** (v1.13.0):
Please use `pass_through` instead. Note that `strict` is still available
(and won't emit a deprecation warning) if you use `narwhals.stable.v1`,
see [perfect backwards compatibility policy](https://narwhals-dev.github.io/narwhals/backcompat/).
see [perfect backwards compatibility policy](../backcompat.md/).
Determine what happens if the object can't be converted to Narwhals:
Expand Down Expand Up @@ -2370,7 +2370,7 @@ def nth(*indices: int | Sequence[int]) -> Expr:
Notes:
`nth` is not supported for Polars version<1.0.0. Please use
[`col`](../narwhals/#narwhals.col) instead.
[`narwhals.col`][] instead.
Arguments:
indices: One or more indices representing the columns to retrieve.
Expand Down Expand Up @@ -3610,7 +3610,7 @@ def from_dict(
"""Instantiate DataFrame from dictionary.
Indexes (if present, for pandas-like backends) are aligned following
the [left-hand-rule](https://narwhals-dev.github.io/narwhals/pandas_like_concepts/pandas_index/).
the [left-hand-rule](../pandas_like_concepts/pandas_index.md/).
Notes:
For pandas-like dataframes, conversion to schema is applied after dataframe
Expand Down
6 changes: 3 additions & 3 deletions narwhals/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def to_native(
**Deprecated** (v1.13.0):
Please use `pass_through` instead. Note that `strict` is still available
(and won't emit a deprecation warning) if you use `narwhals.stable.v1`,
see [perfect backwards compatibility policy](https://narwhals-dev.github.io/narwhals/backcompat/).
see [perfect backwards compatibility policy](../backcompat.md/).
pass_through: Determine what happens if `narwhals_object` isn't a Narwhals class:
- `False` (default): raise an error
Expand Down Expand Up @@ -344,7 +344,7 @@ def from_native(
**Deprecated** (v1.13.0):
Please use `pass_through` instead. Note that `strict` is still available
(and won't emit a deprecation warning) if you use `narwhals.stable.v1`,
see [perfect backwards compatibility policy](https://narwhals-dev.github.io/narwhals/backcompat/).
see [perfect backwards compatibility policy](../backcompat.md/).
pass_through: Determine what happens if the object can't be converted to Narwhals:
- `False` or `None` (default): raise an error
Expand Down Expand Up @@ -847,7 +847,7 @@ def narwhalify(
strict: **Deprecated** (v1.13.0):
Please use `pass_through` instead. Note that `strict` is still available
(and won't emit a deprecation warning) if you use `narwhals.stable.v1`,
see [perfect backwards compatibility policy](https://narwhals-dev.github.io/narwhals/backcompat/).
see [perfect backwards compatibility policy](../backcompat.md/).
Determine what happens if the object can't be converted to Narwhals:
Expand Down
2 changes: 1 addition & 1 deletion narwhals/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ def validate_strict_and_pass_though(
msg = (
"`strict` in `from_native` is deprecated, please use `pass_through` instead.\n\n"
"Note: `strict` will remain available in `narwhals.stable.v1`.\n"
"See https://narwhals-dev.github.io/narwhals/backcompat/ for more information.\n"
"See [stable api](../backcompat.md/) for more information.\n"
)
issue_deprecation_warning(msg, _version="1.13.0")
pass_through = not strict
Expand Down

0 comments on commit 7a19378

Please sign in to comment.