-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added initial interface for fetching inferred section modes #937
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,10 +36,12 @@ def setUp(self): | |
etc.setupRealExample(self, "emission/tests/data/real_examples/shankari_2015-aug-27") | ||
|
||
def tearDown(self): | ||
edb.get_timeseries_db().delete_many({"user_id": self.testUUID1}) | ||
edb.get_timeseries_db().delete_many({"user_id": self.testUUID}) | ||
edb.get_analysis_timeseries_db().delete_many({"user_id": self.testUUID1}) | ||
edb.get_analysis_timeseries_db().delete_many({"user_id": self.testUUID}) | ||
Comment on lines
+41
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good job cleaning this up. I am not going to insist on it this time, but in the future, you should really put these unrelated changes into a separate commit to keep the commit history clean. You can have multiple commits in a PR, and having separate commits will keep the "git blame" more relevant. |
||
edb.get_uuid_db().delete_one({"user_email": "user1"}) | ||
edb.get_uuid_db().delete_one({"user_email": "user2"}) | ||
edb.get_analysis_timeseries_db().delete_many({"user_id": self.testUUID}) | ||
|
||
def testGetUUIDList(self): | ||
uuid_list = esta.TimeSeries.get_uuid_list() | ||
|
@@ -165,20 +167,14 @@ def testFindEntriesCount(self): | |
count_ts7 = ts_agg.find_entries_count(key_list=key_list1) | ||
self.assertEqual(count_ts7, 2128) | ||
|
||
|
||
# TODO: Update conversation in PR #935 | ||
# Code cleanup pending once debugging was complete for failing assertion | ||
# Removed try/catch block -> code present in issue #933 | ||
# Test case: Aggregate timeseries DB User data passed as input with empty key_list | ||
try: | ||
ts_agg = esta.TimeSeries.get_aggregate_time_series() | ||
count_ts8 = ts_agg.find_entries_count(key_list=key_list4) | ||
self.assertEqual(count_ts8, 3607) | ||
except AssertionError as e: | ||
print(f"Assertion failed for 3607...") | ||
for ct in count_ts8: | ||
cte = ecwe.Entry(ct) | ||
print(f"CTE = ") | ||
print(cte.user_id) | ||
print(cte.metadata.key) | ||
print(cte) | ||
print("=== Trip:", cte.data.start_loc, "->", cte.data.end_loc) | ||
ts_agg = esta.TimeSeries.get_aggregate_time_series() | ||
count_ts8 = ts_agg.find_entries_count(key_list=key_list4) | ||
self.assertEqual(count_ts8, 3607) | ||
|
||
# Test case: New User created with no data to check | ||
self.testEmail = None | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for clarification: this doesn't actually fetch the user entries - it just fetches the appropriate access layer.