Skip to content

Commit 0032159

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into ci/testing-env
2 parents 2405a07 + fe9fa5a commit 0032159

File tree

4 files changed

+16
-17
lines changed

4 files changed

+16
-17
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
- [TST] Compat with macos and window, to fix `FailedHealthCheck` Issue #1181 @Zeroto521
3333
- [INF] Merge two docs CIs (`docs-preview.yml` and `docs.yml`) to one. And add `documentation` pytest mark. PR #1183 @Zeroto521
3434
- [INF] Merge `codecov.yml` (only works for the dev branch pushing event) into `tests.yml` (only works for PR event). PR #1185 @Zeroto521
35+
- [TST] Fix failure for test/timeseries/test_fill_missing_timestamp. Issue #1184 @samukweku
36+
- [BUG] Import `DataDescription` to fix: `AttributeError: 'DataFrame' object has no attribute 'data_description'`. PR #1191 @Zeroto521
3537
- [INF] Set a series of complete testing envs. Issue #1127 @Zeroto521
3638

3739
## [v0.23.1] - 2022-05-03

janitor/accessors/__init__.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
"""Miscellaneous mathematical operators.
1+
"""Miscellaneous mathematical operators."""
22

3-
Lazy loading used here to speed up imports.
4-
"""
5-
6-
import warnings
7-
from typing import Tuple
8-
9-
10-
import lazy_loader as lazy
11-
12-
scipy_special = lazy.load("scipy.special")
13-
ss = lazy.load("scipy.stats")
14-
pf = lazy.load("pandas_flavor")
15-
pd = lazy.load("pandas")
16-
np = lazy.load("numpy")
17-
pdtypes = lazy.load("pandas.api.types")
3+
from janitor.accessors.data_description import DataDescription # noqa: F401

tests/math/test_ecdf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import numpy as np
22
import pytest
33
from hypothesis import given
4+
from hypothesis import settings
45
from hypothesis.extra.pandas import series
56

67

78
@given(s=series(dtype=np.number))
9+
@settings(deadline=None)
810
def test_ecdf(s):
911
"""A simple execution test."""
1012
if s.isna().sum() > 0:

tests/timeseries/test_fill_missing_timestamps.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,16 @@ def test_fill_missing_timestamps(timeseries_dataframe):
2626
df1 = timeseries_dataframe.drop(timeseries_dataframe.index[random_number])
2727

2828
# Fill missing timestamps
29-
result = fill_missing_timestamps(df1, frequency="1H")
29+
# fix for GH#1184 is to use the start and end from
30+
# timeseries_dataframe
31+
# imagine that the last row of df1 is removed, or the first entry
32+
# the length check in the assert line will fail
33+
result = fill_missing_timestamps(
34+
df1,
35+
frequency="1H",
36+
first_time_stamp=timeseries_dataframe.index.min(),
37+
last_time_stamp=timeseries_dataframe.index.max(),
38+
)
3039

3140
# Testing if the missing timestamp has been filled
3241
assert len(result) == len(timeseries_dataframe)

0 commit comments

Comments
 (0)