Skip to content

Commit 4eb8048

Browse files
committed
fix active_percent for consistent_end_date
1 parent 351241c commit 4eb8048

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Unless noted, iglu-r test is considered successful if it achieves precision of 0
6161
| sd_measures ||
6262
| sd_roc || |||
6363
| process_data ||
64-
| summary_glu | |
64+
| summary_glu | |
6565
| CGMS2DayByDay ||
6666

6767
# Installation

iglu_python/active_percent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def active_percent(
3737
Number of days to consider in the calculation.
3838
consistent_end_date : Optional[Union[str, datetime]], default=None
3939
End date to be used for every subject. If None, each subject will have their own end date.
40+
Used only in range_type=='manual' mode
4041
4142
Returns
4243
-------

tests/test_active_percent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def test_active_percent_consistent_end_date():
145145
)
146146

147147
end_date = datetime(2020, 1, 1, 1, 0) # 1 hour after start
148-
result = iglu.active_percent(data, consistent_end_date=end_date)
148+
result = iglu.active_percent(data, range_type='manual', consistent_end_date=end_date)
149149
assert all(result["end_date"].dt.tz_localize(None) == pd.to_datetime(end_date).tz_localize(None))
150150

151151
def test_active_percent_timezone():

0 commit comments

Comments
 (0)