Skip to content

Commit

Permalink
feat: add typechecking to profile report (#1139)
Browse files Browse the repository at this point in the history
* feat: add type checking to profile report
  • Loading branch information
alexbarros authored and vascoalramos committed Nov 22, 2022
1 parent 3a5a67a commit 5d62b13
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ seaborn>=0.10.1, <0.13
multimethod>=1.4, <1.10
# metrics
statsmodels>=0.13.2, <0.14
# type checking
typeguard>=2.13.2, <2.14
2 changes: 2 additions & 0 deletions src/pandas_profiling/profile_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import pandas as pd
import yaml
from tqdm.auto import tqdm
from typeguard import typechecked
from visions import VisionsTypeset

from pandas_profiling.config import Config, Settings
Expand All @@ -32,6 +33,7 @@
from pandas_profiling.utils.paths import get_config


@typechecked
class ProfileReport(SerializeReport, ExpectationsReport):
"""Generate a profile report from a Dataset stored as a pandas `DataFrame`.
Expand Down
2 changes: 2 additions & 0 deletions src/pandas_profiling/visualisation/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from matplotlib.patches import Patch
from matplotlib.ticker import FuncFormatter
from statsmodels.graphics.tsaplots import plot_acf, plot_pacf
from typeguard import typechecked

from pandas_profiling.config import Settings
from pandas_profiling.utils.common import convert_timestamp_to_datetime
Expand Down Expand Up @@ -599,6 +600,7 @@ def _create_timeseries_heatmap(
return ax


@typechecked
def timeseries_heatmap(
dataframe: pd.DataFrame,
entity_column: str,
Expand Down

0 comments on commit 5d62b13

Please sign in to comment.