Skip to content

Commit

Permalink
remove reset, add updated notebook for quick check
Browse files Browse the repository at this point in the history
  • Loading branch information
eroell committed Mar 9, 2024
1 parent ee0b68f commit 7472eaa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 162 deletions.
151 changes: 11 additions & 140 deletions cohort_tracking.ipynb

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions ehrapy/tools/cohort_tracking/_cohort_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,6 @@ def _get_cat_dicts(self, table_one, col):
def _get_num_dicts(self, table_one, col):
return table_one.cont_table["Overall"].loc[(col, "")]

def reset(self) -> None:
"""Resets the `CohortTracker` object.
A full reset of the `CohortTracker` object.
"""
self._tracked_steps = 0
self._track_t1 = []
self._tracked_text = []
self._tracked_operations = []

@property
def tracked_steps(self):
"""Number of tracked steps."""
Expand Down
12 changes: 0 additions & 12 deletions tests/tools/cohort_tracking/test_cohort_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,6 @@ def test_CohortTracker_call(adata_mini):
assert ct._tracked_text == ["Cohort 0\n (n=12)", "Cohort 1\n (n=12)"]


def test_CohortTracker_reset(adata_mini):
ct = ep.tl.CohortTracker(adata_mini)

ct(adata_mini)
ct(adata_mini)

ct.reset()
assert ct.tracked_steps == 0
assert ct._tracked_text == []
assert ct._tracked_operations == []


def test_CohortTracker_plot_cohort_change_test_sensitivity(adata_mini, check_same_image):
ct = ep.tl.CohortTracker(adata_mini)

Expand Down

0 comments on commit 7472eaa

Please sign in to comment.