From c0ccf35813a4f536b19e19044db6b41a70e7d1bf Mon Sep 17 00:00:00 2001 From: isabelizimm Date: Wed, 18 Jan 2023 18:00:24 -0500 Subject: [PATCH 1/2] example -> examples for docstrings --- vetiver/monitor.py | 6 +++--- vetiver/pin_read_write.py | 2 +- vetiver/rsconnect.py | 4 ++-- vetiver/server.py | 10 +++++----- vetiver/vetiver_model.py | 2 +- vetiver/write_docker.py | 2 +- vetiver/write_fastapi.py | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/vetiver/monitor.py b/vetiver/monitor.py index 161f4f47..648bd6e9 100644 --- a/vetiver/monitor.py +++ b/vetiver/monitor.py @@ -31,7 +31,7 @@ def compute_metrics( estimate: Column name for predicted results - Example + Examples ------- >>> from datetime import timedelta >>> import pandas as pd @@ -115,7 +115,7 @@ def pin_metrics( If False, error when the new metrics contain overlapping dates with the existing pin. - Example + Examples ------- >>> import pins >>> import vetiver @@ -215,7 +215,7 @@ def plot_metrics( n: str Column in `df_metrics` containing number of observations - Example + Examples ------- >>> import vetiver >>> import pandas as pd diff --git a/vetiver/pin_read_write.py b/vetiver/pin_read_write.py index 42c8c216..8da5c872 100644 --- a/vetiver/pin_read_write.py +++ b/vetiver/pin_read_write.py @@ -32,7 +32,7 @@ def vetiver_pin_write(board, model: VetiverModel, versioned: bool = True): versioned: bool Whether or not the pin should be versioned - Example + Examples ------- >>> import vetiver >>> from pins import board_temp diff --git a/vetiver/rsconnect.py b/vetiver/rsconnect.py index ed62299c..df7f8917 100644 --- a/vetiver/rsconnect.py +++ b/vetiver/rsconnect.py @@ -54,8 +54,8 @@ def deploy_rsconnect( image : str Docker image to be specified for off-host execution - Example - ------- + Examples + ------ >>> import vetiver >>> import pins >>> import rsconnect diff --git a/vetiver/server.py b/vetiver/server.py index 9d148916..33d2463b 100644 --- a/vetiver/server.py +++ b/vetiver/server.py @@ -29,7 +29,7 @@ class VetiverAPI: **kwargs: dict Deprecated parameters. - Example + Examples ------- >>> import vetiver as vt >>> X, y = vt.get_mock_data() @@ -150,7 +150,7 @@ def vetiver_post(self, endpoint_fx: Callable, endpoint_name: str = None, **kw): endpoint_name : str Name of endpoint - Example + Examples ------- >>> import vetiver as vt >>> X, y = vt.get_mock_data() @@ -199,7 +199,7 @@ def run(self, port: int = 8000, host: str = "127.0.0.1", **kw): host : str A valid IPv4 or IPv6 address, which the application will listen on. - Example + Examples ------- >>> import vetiver as vt >>> X, y = vt.get_mock_data() @@ -244,7 +244,7 @@ def predict(endpoint, data: Union[dict, pd.DataFrame, pd.Series], **kw) -> pd.Da dict Endpoint_name and list of endpoint_fx output - Example + Examples ------- >>> import vetiver >>> X, y = vetiver.get_mock_data() @@ -316,7 +316,7 @@ def vetiver_endpoint(url: str = "http://127.0.0.1:8000/predict") -> str: url : str URI path to endpoint - Example + Examples ------- >>> import vetiver >>> endpoint = vetiver.vetiver_endpoint(url='http://127.0.0.1:8000/predict') diff --git a/vetiver/vetiver_model.py b/vetiver/vetiver_model.py index f01e7a3f..9cef84c5 100644 --- a/vetiver/vetiver_model.py +++ b/vetiver/vetiver_model.py @@ -54,7 +54,7 @@ class VetiverModel: - Example + Examples ------- >>> from vetiver import mock, VetiverModel >>> X, y = mock.get_mock_data() diff --git a/vetiver/write_docker.py b/vetiver/write_docker.py index 225edd86..4a3b1b69 100644 --- a/vetiver/write_docker.py +++ b/vetiver/write_docker.py @@ -47,7 +47,7 @@ def write_docker( port: str Port to run VetiverAPI from Dockerfile - Example + Examples ------- >>> import vetiver >>> import tempfile diff --git a/vetiver/write_fastapi.py b/vetiver/write_fastapi.py index 60ffb992..48b750c4 100644 --- a/vetiver/write_fastapi.py +++ b/vetiver/write_fastapi.py @@ -67,7 +67,7 @@ def write_app( file : Name of file - Example + Examples ------- >>> import vetiver >>> import tempfile From df01ddd1cf81f669ad77338e4b1a44c3f0bd429c Mon Sep 17 00:00:00 2001 From: isabelizimm Date: Wed, 18 Jan 2023 18:04:44 -0500 Subject: [PATCH 2/2] example -> examples --- vetiver/rsconnect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vetiver/rsconnect.py b/vetiver/rsconnect.py index df7f8917..9c5f067f 100644 --- a/vetiver/rsconnect.py +++ b/vetiver/rsconnect.py @@ -55,7 +55,7 @@ def deploy_rsconnect( Docker image to be specified for off-host execution Examples - ------ + ------- >>> import vetiver >>> import pins >>> import rsconnect