diff --git a/setup.cfg b/setup.cfg index 04c9f2e..b783d73 100644 --- a/setup.cfg +++ b/setup.cfg @@ -55,6 +55,7 @@ dev = pytest-cov pytest-snapshot vetiver[typecheck] + polars docs = quartodoc diff --git a/vetiver/prototype.py b/vetiver/prototype.py index a3629b0..d00cb70 100644 --- a/vetiver/prototype.py +++ b/vetiver/prototype.py @@ -8,12 +8,18 @@ import pandas as pd import numpy as np -import polars as pl import pydantic +import typing from pydantic import Field from warnings import warn from .types import create_prototype +if typing.TYPE_CHECKING: + try: + import polars as pl + except ImportError: + pl = None + class InvalidPTypeError(Exception): """