Skip to content

Commit

Permalink
update dtype api reference docs (#1745)
Browse files Browse the repository at this point in the history
* update dtype api reference docs

Signed-off-by: cosmicBboy <niels.bantilan@gmail.com>

* update ci

Signed-off-by: cosmicBboy <niels.bantilan@gmail.com>

* update ci

Signed-off-by: cosmicBboy <niels.bantilan@gmail.com>

---------

Signed-off-by: cosmicBboy <niels.bantilan@gmail.com>
  • Loading branch information
cosmicBboy authored Jul 17, 2024
1 parent 50949b0 commit b86978b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 20 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ on:
env:
DEFAULT_PYTHON: 3.8
CI: "true"
# Increase this value to reset cache if environment.yml has not changed
CACHE_VERSION: 6

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
Expand Down Expand Up @@ -140,9 +138,9 @@ jobs:
${{ runner.os }}-pip-
- name: Install deps
run:
run: |
pip install uv
uv pip install -r requirements.in
uv pip install --system -r requirements.in
- run: |
pip list
Expand Down
2 changes: 1 addition & 1 deletion docs/source/_templates/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{% endif %}

{%- if members and '__call__' in members %}
~{{ name }}.__call__
.. automethod:: __call__
{%- endif %}

{% endblock %}
17 changes: 5 additions & 12 deletions docs/source/_templates/dtype.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,12 @@
{% if methods %}
.. rubric:: Methods

.. autosummary::
:nosignatures:
:toctree: methods

{# Ignore the DateTime alias to avoid `WARNING: document isn't included in any toctree`#}
{% if objname != "DateTime" %}
{% for item in methods %}
~{{ name }}.{{ item }}
{%- endfor %}
{% for item in methods %}
.. automethod:: {{ item }}
{%- endfor %}

{%- if members and '__call__' in members %}
~{{ name }}.__call__
{%- endif %}
{%- if members and '__call__' in members %}
.. automethod:: __call__
{%- endif %}

{%- endif %}
Expand Down
4 changes: 2 additions & 2 deletions docs/source/reference/core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Schemas
:template: class.rst
:nosignatures:

pandera.api.dataframe.container.DataFrameSchema
pandera.api.pandas.container.DataFrameSchema
pandera.api.pandas.array.SeriesSchema
pandera.api.polars.container.DataFrameSchema
pandera.api.pyspark.container.DataFrameSchema
pandera.api.dataframe.container.DataFrameSchema

Schema Components
-----------------
Expand All @@ -25,12 +25,12 @@ Schema Components
:template: class.rst
:nosignatures:

pandera.api.dataframe.components.ComponentSchema
pandera.api.pandas.components.Column
pandera.api.pandas.components.Index
pandera.api.pandas.components.MultiIndex
pandera.api.polars.components.Column
pandera.api.pyspark.components.Column
pandera.api.dataframe.components.ComponentSchema

Checks
------
Expand Down
1 change: 1 addition & 0 deletions docs/source/reference/dataframe_models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ DataFrame Model
pandera.api.pandas.model.DataFrameModel
pandera.api.polars.model.DataFrameModel
pandera.api.pyspark.model.DataFrameModel
pandera.api.dataframe.model.DataFrameModel

Model Components
----------------
Expand Down
2 changes: 2 additions & 0 deletions docs/source/reference/dtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,5 @@ Engines
pandera.engines.engine.Engine
pandera.engines.numpy_engine.Engine
pandera.engines.pandas_engine.Engine
pandera.engines.polars_engine.Engine
pandera.engines.pyspark_engine.Engine
2 changes: 1 addition & 1 deletion pandera/api/dataframe/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def _convert_extras_to_checks(extras: Dict[str, Any]) -> List[Check]:


class DataFrameModel(Generic[TDataFrame, TSchema], BaseModel):
"""Definition of a generic DataFrame model.
"""Base class for the DataFrame model.
See the :ref:`User Guide <dataframe-models>` for more.
"""
Expand Down

0 comments on commit b86978b

Please sign in to comment.