Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Oct 23, 2021
1 parent 573477f commit 486a86b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -35,5 +35,6 @@ jobs:
echo '<meta http-equiv=refresh content=0;url=polars/index.html>' > target/doc/index.html && \
mkdir target/doc/py-polars
cp -r py-polars/docs/build/html target/doc/py-polars
echo ghp-import step
ghp-import -n target/doc && \
git push -qf https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git gh-pages
2 changes: 0 additions & 2 deletions py-polars/docs/source/reference/dataframe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ This namespace comes available by calling `DataFrame.groupby(..)`.
GroupBy.tail
GroupBy.get_group
GroupBy.groups
GroupBy.select
GroupBy.select_all
GroupBy.pivot
GroupBy.first
GroupBy.last
Expand Down
2 changes: 1 addition & 1 deletion py-polars/docs/source/reference/series.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Attributes
Series.dtype
Series.name
Series.shape
Series.dtyskew
Series.skew
Series.dt
Series.str

Expand Down
41 changes: 21 additions & 20 deletions py-polars/polars/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ def numpy_type_to_constructor(dtype: Type[np.dtype]) -> Callable[..., "PySeries"
return PySeries.new_object


# watch out putting stuff in this branch, it may break the docs build
if not _DOCUMENTING:
_PY_TYPE_TO_CONSTRUCTOR = {
float: PySeries.new_opt_f64,
Expand All @@ -287,27 +288,27 @@ def numpy_type_to_constructor(dtype: Type[np.dtype]) -> Callable[..., "PySeries"
bool: PySeries.new_opt_bool,
}

_PY_TYPE_TO_DTYPE = {
float: Float64,
int: Int64,
str: Utf8,
bool: Boolean,
}
_PY_TYPE_TO_DTYPE = {
float: Float64,
int: Int64,
str: Utf8,
bool: Boolean,
}

_DTYPE_TO_PY_TYPE = {
Float64: float,
Float32: float,
Int64: int,
Int32: int,
Int16: int,
Int8: int,
Utf8: str,
UInt8: int,
UInt16: int,
UInt32: int,
UInt64: int,
Boolean: bool,
}
_DTYPE_TO_PY_TYPE = {
Float64: float,
Float32: float,
Int64: int,
Int32: int,
Int16: int,
Int8: int,
Utf8: str,
UInt8: int,
UInt16: int,
UInt32: int,
UInt64: int,
Boolean: bool,
}


def py_type_to_constructor(dtype: Type[Any]) -> Callable[..., "PySeries"]:
Expand Down

0 comments on commit 486a86b

Please sign in to comment.