Skip to content

Commit

Permalink
more test fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
BaptisteVandecrux committed Aug 15, 2024
1 parent 885fae3 commit 1978de1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pypromice/postprocess/create_bufr_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def create_bufr_files(
Suffix for the compiled output file
"""
periods = pd.date_range(period_start, period_end, freq="H")
periods = pd.date_range(period_start, period_end, freq="h")
output_individual_root = output_root / "individual"
output_compiled_root = output_root / "compiled"
output_individual_root.mkdir(parents=True, exist_ok=True)
Expand Down
2 changes: 1 addition & 1 deletion src/pypromice/process/write.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def addMeta(ds, meta):
time_diff = pd.Timedelta((ds['time'][1] - ds['time'][0]).values)
if time_diff == pd.Timedelta('10min'):
sample_rate = "10min"
elif time_diff == pd.Timedelta('1H'):
elif time_diff == pd.Timedelta('1h'):
sample_rate = "hourly"
elif time_diff == pd.Timedelta('1D'):
sample_rate = "daily"
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/qc/test_persistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_persistent_period_longer_than_period_threshold(self):
input_series = pd.Series(index=time_range, data=np.arange(0, len(time_range)))
input_series.iloc[index_start:index_end] = input_series.iloc[index_start]
expected_output = input_series.map(lambda _: False)
expected_output[expected_filter_start:expected_filter_end] = True
expected_output.iloc[expected_filter_start:expected_filter_end] = True

persistent_mask = find_persistent_regions(
input_series, min_repeats=min_repeats, max_diff=0.001
Expand Down

0 comments on commit 1978de1

Please sign in to comment.