Skip to content

Commit

Permalink
feat: add typechecking to profile report
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbarros committed Nov 9, 2022
1 parent acaa171 commit 8f2b869
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
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 @@ -30,8 +30,10 @@
from pandas_profiling.serialize_report import SerializeReport
from pandas_profiling.utils.dataframe import hash_dataframe
from pandas_profiling.utils.paths import get_config
from typeguard import typechecked


@typechecked
class ProfileReport(SerializeReport, ExpectationsReport):
"""Generate a profile report from a Dataset stored as a pandas `DataFrame`.
Expand Down
3 changes: 2 additions & 1 deletion 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 @@ -598,7 +599,7 @@ def _create_timeseries_heatmap(
ax.invert_yaxis()
return ax


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

0 comments on commit 8f2b869

Please sign in to comment.