found an oopsie
This commit is contained in:
		
							parent
							
								
									a38c64914f
								
							
						
					
					
						commit
						595a4d7e31
					
				| @ -258,6 +258,9 @@ class Plant(object): | |||||||
|         timestamp_diffs = [(j-i)/86400.0 for i, j in zip(all_timestamps[:-1], all_timestamps[1:])] |         timestamp_diffs = [(j-i)/86400.0 for i, j in zip(all_timestamps[:-1], all_timestamps[1:])] | ||||||
|         # plant's latest timestamp should be set to last timestamp before a |         # plant's latest timestamp should be set to last timestamp before a | ||||||
|         # gap of 5 days |         # gap of 5 days | ||||||
|  |         # TODO: this considers a plant watered only on day 1 and day 4 to be | ||||||
|  |         # watered for all 4 days - need to figure out how to only add score | ||||||
|  |         # from 24h after each watered timestamp | ||||||
|         last_valid_element = next((x for x in timestamp_diffs if x > 5), None) |         last_valid_element = next((x for x in timestamp_diffs if x > 5), None) | ||||||
|         if not last_valid_element: |         if not last_valid_element: | ||||||
|             # all timestamps are within a 5 day range, can just use latest one |             # all timestamps are within a 5 day range, can just use latest one | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user