Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions workrate/readers/environment_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
from getmetrics.dto.environmental_variable import EnvironmentalVariable


def get_reading(path='../resources/input.csv'):
def get_readings(path='../resources/input.csv'):
environmental_variables = []
with open(path, newline='') as csvfile:
environment_reader = csv.reader(csvfile, delimiter=';', quotechar='|')
environment_reader = csv.reader(csvfile, delimiter=',', quotechar='|')
next(environment_reader)

for row in environment_reader:
date_time_str = row[0] + ' ' + row[1]
date_time_obj = datetime.datetime.strptime(date_time_str, '%d/%m/%y %H:%M')
date_time_obj = datetime.datetime.strptime(date_time_str, '%Y-%m-%d %H:%M:%S')
environmental_variables.append(EnvironmentalVariable(date_time_obj, float(row[2]), float(row[3])))
return environmental_variables
2 changes: 1 addition & 1 deletion workrate/readers/settings_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from workrate.dto.work_type import WorkType


def get_settings(path='../resources/settings.csv'):
def get_settings(path='resources/settings.csv'):
work_settings = []
with open(path, newline='') as csvfile:
settings_reader = csv.reader(csvfile, delimiter=';', quotechar='|')
Expand Down
364 changes: 361 additions & 3 deletions workrate/resources/input.csv
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file should be on the .gitignore so it won't be committed and pushed

Original file line number Diff line number Diff line change
@@ -1,3 +1,361 @@
day;time;temperature;humidity
10/05/21;10:00;32.52;70.21
10/05/21;10:30;22.62;73.87
update_date,update_time,temperature,humidity
2025-05-08,11:20:00,29.1,20
2025-05-08,11:30:00,28.9,30
2025-05-08,11:40:00,27.4,35
2025-05-08,11:50:00,27.1,32
2025-05-08,12:00:00,27.1,31
2025-05-08,12:10:00,26.5,31
2025-05-08,12:20:00,26.0,32
2025-05-08,12:30:00,25.4,36
2025-05-08,12:40:00,25.1,37
2025-05-08,12:50:00,24.2,41
2025-05-08,13:00:00,23.7,41
2025-05-08,13:10:00,23.3,42
2025-05-08,13:20:00,23.4,44
2025-05-08,13:30:00,23.9,46
2025-05-08,13:40:00,23.9,48
2025-05-08,13:50:00,24.5,48
2025-05-08,14:00:00,24.5,49
2025-05-08,14:10:00,24.9,45
2025-05-08,14:20:00,25.1,45
2025-05-08,14:30:00,25.6,42
2025-05-08,14:40:00,25.5,41
2025-05-08,14:50:00,25.9,37
2025-05-09,11:30:00,30.1,19
2025-05-08,15:20:00,26.5,34
2025-05-08,15:30:00,26.9,33
2025-05-08,15:40:00,27.2,32
2025-05-08,15:50:00,27.7,30
2025-05-08,16:00:00,28.1,28
2025-05-08,16:10:00,28.4,27
2025-05-08,16:20:00,28.6,26
2025-05-08,16:30:00,29.0,25
2025-05-08,16:40:00,28.9,24
2025-05-08,16:50:00,26.8,36
2025-05-08,17:00:00,25.1,43
2025-05-08,17:10:00,24.4,46
2025-05-08,17:20:00,23.9,40
2025-05-08,17:30:00,23.7,41
2025-05-08,17:40:00,23.2,45
2025-05-08,17:50:00,23.1,41
2025-05-09,06:00:00,17.7,31
2025-05-09,06:10:00,17.7,32
2025-05-09,06:20:00,18.1,31
2025-05-09,06:30:00,18.6,31
2025-05-09,06:40:00,19.3,31
2025-05-09,06:50:00,20.2,30
2025-05-09,07:00:00,21.2,28
2025-05-09,07:10:00,22.1,27
2025-05-09,07:20:00,23.2,26
2025-05-09,07:30:00,23.6,26
2025-05-09,07:40:00,23.5,25
2025-05-09,07:50:00,23.6,25
2025-05-09,08:00:00,23.3,26
2025-05-09,08:10:00,23.4,24
2025-05-09,08:20:00,23.9,24
2025-05-09,08:30:00,24.2,24
2025-05-09,08:40:00,24.7,23
2025-05-09,08:50:00,25.2,22
2025-05-09,09:00:00,25.3,22
2025-05-09,09:10:00,25.6,22
2025-05-09,09:20:00,26.0,21
2025-05-09,09:30:00,26.2,22
2025-05-09,09:40:00,26.8,22
2025-05-09,09:50:00,27.1,22
2025-05-09,10:00:00,27.2,22
2025-05-09,10:10:00,27.9,22
2025-05-09,10:20:00,28.0,22
2025-05-09,10:30:00,28.2,22
2025-05-09,10:40:00,28.6,21
2025-05-09,10:50:00,28.5,21
2025-05-09,11:00:00,29.2,20
2025-05-09,11:10:00,29.4,20
2025-05-09,11:20:00,29.8,19
2025-05-09,11:40:00,30.3,18
2025-05-09,11:50:00,30.4,19
2025-05-09,12:00:00,30.8,19
2025-05-09,12:10:00,30.7,19
2025-05-09,12:20:00,30.3,20
2025-05-09,12:30:00,30.0,21
2025-05-09,12:40:00,30.1,21
2025-05-09,12:50:00,29.8,22
2025-05-09,13:00:00,29.6,22
2025-05-09,13:10:00,29.6,22
2025-05-09,13:20:00,29.5,23
2025-05-09,13:30:00,29.0,24
2025-05-09,13:40:00,29.0,25
2025-05-09,13:50:00,29.1,25
2025-05-09,14:00:00,29.0,25
2025-05-09,14:10:00,28.3,27
2025-05-09,14:20:00,27.7,30
2025-05-09,14:30:00,27.3,32
2025-05-09,14:40:00,28.4,29
2025-05-09,14:50:00,28.3,29
2025-05-09,15:00:00,27.4,31
2025-05-09,15:10:00,26.1,38
2025-05-09,15:20:00,26.5,36
2025-05-09,15:30:00,27.1,34
2025-05-09,15:40:00,27.3,34
2025-05-09,15:50:00,27.5,32
2025-05-09,16:00:00,27.4,31
2025-05-09,16:10:00,27.6,29
2025-05-09,16:20:00,27.5,30
2025-05-09,16:30:00,27.4,30
2025-05-09,16:40:00,27.7,29
2025-05-09,16:50:00,27.4,29
2025-05-09,17:00:00,27.2,29
2025-05-09,17:10:00,26.8,32
2025-05-09,17:20:00,26.6,31
2025-05-09,17:30:00,26.4,32
2025-05-09,17:40:00,26.2,32
2025-05-09,17:50:00,26.5,31
2025-05-10,06:00:00,17.1,42
2025-05-10,06:10:00,17.1,42
2025-05-10,06:20:00,17.5,41
2025-05-10,06:30:00,18.3,40
2025-05-10,06:40:00,18.5,41
2025-05-10,06:50:00,19.3,38
2025-05-10,07:00:00,20.3,37
2025-05-10,07:10:00,21.4,35
2025-05-10,07:20:00,22.4,33
2025-05-10,07:30:00,22.9,32
2025-05-10,07:40:00,23.6,30
2025-05-10,07:50:00,25.3,26
2025-05-10,08:00:00,27.0,26
2025-05-10,08:10:00,28.3,21
2025-05-10,08:20:00,29.6,22
2025-05-10,08:30:00,30.1,21
2025-05-10,08:40:00,31.1,18
2025-05-10,08:50:00,31.2,19
2025-05-10,09:00:00,31.4,17
2025-05-10,09:10:00,31.4,18
2025-05-10,09:20:00,31.2,19
2025-05-10,09:30:00,31.3,20
2025-05-10,09:40:00,31.7,18
2025-05-10,09:50:00,31.9,17
2025-05-10,10:00:00,32.1,16
2025-05-10,10:10:00,32.3,17
2025-05-10,10:20:00,32.5,17
2025-05-10,10:30:00,33.0,16
2025-05-10,10:40:00,33.1,16
2025-05-10,10:50:00,33.2,16
2025-05-10,11:00:00,32.5,22
2025-05-10,11:10:00,31.3,24
2025-05-10,11:20:00,31.3,22
2025-05-10,11:30:00,31.4,22
2025-05-10,11:40:00,31.3,25
2025-05-10,11:50:00,30.9,26
2025-05-10,12:00:00,31.1,26
2025-05-10,12:10:00,31.0,28
2025-05-10,12:20:00,30.9,27
2025-05-10,12:30:00,30.1,29
2025-05-10,12:40:00,29.5,28
2025-05-10,12:50:00,29.6,26
2025-05-10,13:00:00,29.5,28
2025-05-10,13:10:00,29.7,29
2025-05-10,13:20:00,29.7,29
2025-05-10,13:30:00,29.6,27
2025-05-10,13:40:00,29.4,28
2025-05-10,13:50:00,29.7,27
2025-05-10,14:00:00,29.6,27
2025-05-10,14:10:00,29.0,30
2025-05-10,14:20:00,28.0,34
2025-05-10,14:30:00,27.3,37
2025-05-10,14:40:00,27.7,35
2025-05-10,14:50:00,27.8,32
2025-05-10,15:00:00,27.9,31
2025-05-10,15:10:00,28.1,30
2025-05-10,15:20:00,28.1,30
2025-05-10,15:30:00,27.3,34
2025-05-10,15:40:00,27.0,34
2025-05-10,15:50:00,27.0,34
2025-05-10,16:00:00,26.7,37
2025-05-10,16:10:00,26.3,42
2025-05-10,16:20:00,26.0,46
2025-05-10,16:30:00,25.9,48
2025-05-10,16:40:00,25.7,49
2025-05-10,16:50:00,26.0,47
2025-05-10,17:00:00,25.7,48
2025-05-10,17:10:00,25.8,49
2025-05-10,17:20:00,25.6,50
2025-05-10,17:30:00,25.6,49
2025-05-10,17:40:00,25.8,48
2025-05-10,17:50:00,25.9,46
2025-05-11,06:00:00,20.3,29
2025-05-11,06:10:00,20.3,28
2025-05-11,06:20:00,19.8,30
2025-05-11,06:30:00,20.6,29
2025-05-11,06:40:00,21.6,27
2025-05-11,06:50:00,22.3,26
2025-05-11,07:00:00,23.2,25
2025-05-11,07:10:00,24.4,24
2025-05-11,07:20:00,25.5,22
2025-05-11,07:30:00,26.5,20
2025-05-11,07:40:00,27.0,20
2025-05-11,07:50:00,27.0,21
2025-05-11,08:00:00,27.2,23
2025-05-11,08:10:00,27.4,21
2025-05-11,08:20:00,28.1,20
2025-05-11,08:30:00,28.3,20
2025-05-11,08:40:00,28.2,20
2025-05-11,08:50:00,28.4,20
2025-05-11,09:00:00,28.6,20
2025-05-11,09:10:00,28.5,20
2025-05-11,09:20:00,28.2,20
2025-05-11,09:30:00,28.0,21
2025-05-11,09:40:00,28.2,20
2025-05-11,09:50:00,28.6,20
2025-05-11,10:00:00,29.1,20
2025-05-11,10:10:00,29.6,21
2025-05-11,10:20:00,29.9,21
2025-05-11,10:30:00,30.0,21
2025-05-11,10:40:00,30.5,19
2025-05-11,10:50:00,31.3,17
2025-05-11,11:00:00,32.1,16
2025-05-11,11:10:00,31.8,17
2025-05-11,11:20:00,31.7,18
2025-05-11,11:30:00,30.6,21
2025-05-11,11:40:00,28.0,27
2025-05-11,11:50:00,27.5,30
2025-05-11,12:00:00,27.3,27
2025-05-11,12:10:00,27.0,28
2025-05-11,12:20:00,27.1,27
2025-05-11,12:30:00,27.4,27
2025-05-11,12:40:00,27.5,27
2025-05-11,12:50:00,27.5,27
2025-05-11,13:00:00,27.6,28
2025-05-11,13:10:00,27.8,27
2025-05-11,13:20:00,28.5,25
2025-05-11,13:30:00,29.3,24
2025-05-11,13:40:00,29.9,23
2025-05-11,13:50:00,31.4,21
2025-05-11,14:00:00,32.2,20
2025-05-11,14:10:00,32.7,18
2025-05-11,14:20:00,34.1,16
2025-05-11,14:30:00,34.5,16
2025-05-11,14:40:00,34.2,16
2025-05-11,14:50:00,34.7,16
2025-05-11,15:00:00,33.6,19
2025-05-11,15:10:00,33.4,20
2025-05-11,15:20:00,32.8,21
2025-05-11,15:30:00,32.0,20
2025-05-11,15:40:00,31.2,21
2025-05-11,15:50:00,30.9,21
2025-05-11,16:00:00,30.8,20
2025-05-11,16:10:00,31.0,20
2025-05-11,16:20:00,31.0,20
2025-05-11,16:30:00,30.8,20
2025-05-11,16:40:00,30.5,21
2025-05-11,16:50:00,29.5,23
2025-05-11,17:00:00,28.9,24
2025-05-11,17:10:00,28.7,25
2025-05-11,17:20:00,28.5,24
2025-05-11,17:30:00,28.4,24
2025-05-11,17:40:00,28.0,24
2025-05-11,17:50:00,27.7,25
2025-05-12,06:00:00,18.6,82
2025-05-12,06:10:00,18.9,83
2025-05-12,06:20:00,19.0,83
2025-05-12,06:30:00,19.2,83
2025-05-12,06:40:00,19.0,83
2025-05-12,06:50:00,18.9,82
2025-05-12,07:00:00,19.4,80
2025-05-12,07:10:00,20.2,80
2025-05-12,07:20:00,20.5,81
2025-05-12,07:30:00,20.6,79
2025-05-12,07:40:00,20.7,76
2025-05-12,07:50:00,21.2,74
2025-05-12,08:00:00,21.4,72
2025-05-12,08:10:00,21.8,70
2025-05-12,08:20:00,22.1,68
2025-05-12,08:30:00,22.3,69
2025-05-12,08:40:00,22.7,67
2025-05-12,08:50:00,22.7,65
2025-05-12,09:00:00,22.8,64
2025-05-12,09:10:00,23.2,63
2025-05-12,09:20:00,23.7,61
2025-05-12,09:30:00,23.9,58
2025-05-12,09:40:00,24.2,56
2025-05-12,09:50:00,24.7,54
2025-05-12,10:00:00,24.9,55
2025-05-12,10:10:00,25.1,53
2025-05-12,10:20:00,25.3,52
2025-05-12,10:30:00,25.8,50
2025-05-12,10:40:00,25.5,54
2025-05-12,10:50:00,24.8,59
2025-05-12,11:00:00,24.7,61
2025-05-12,11:10:00,24.3,63
2025-05-12,11:20:00,24.3,63
2025-05-12,11:30:00,24.2,63
2025-05-12,11:40:00,23.6,64
2025-05-12,11:50:00,23.6,65
2025-05-12,12:00:00,24.1,63
2025-05-12,12:10:00,24.3,62
2025-05-12,12:20:00,24.1,63
2025-05-12,12:30:00,23.9,64
2025-05-12,12:40:00,23.7,63
2025-05-12,12:50:00,23.6,64
2025-05-12,13:00:00,23.3,66
2025-05-12,13:10:00,22.7,67
2025-05-12,13:20:00,22.8,68
2025-05-12,13:30:00,23.2,65
2025-05-12,13:40:00,24.1,62
2025-05-12,13:50:00,24.2,61
2025-05-12,14:00:00,24.2,62
2025-05-12,14:10:00,24.0,63
2025-05-12,14:20:00,24.3,62
2025-05-12,14:30:00,24.5,61
2025-05-12,14:40:00,25.0,57
2025-05-12,14:50:00,25.3,57
2025-05-12,15:00:00,25.4,55
2025-05-12,15:10:00,25.7,53
2025-05-12,15:20:00,25.8,52
2025-05-12,15:30:00,25.7,52
2025-05-12,15:40:00,25.9,48
2025-05-12,15:50:00,25.5,49
2025-05-12,16:00:00,25.2,50
2025-05-12,16:10:00,25.0,51
2025-05-12,16:20:00,25.1,51
2025-05-12,16:30:00,24.8,52
2025-05-12,16:40:00,24.8,54
2025-05-12,16:50:00,24.3,58
2025-05-12,17:00:00,23.9,59
2025-05-12,17:10:00,24.0,57
2025-05-12,17:20:00,23.7,60
2025-05-12,17:30:00,23.2,62
2025-05-12,17:40:00,22.4,66
2025-05-12,17:50:00,21.6,69
2025-05-13,06:00:00,15.8,47
2025-05-13,06:10:00,16.0,45
2025-05-13,06:20:00,16.7,44
2025-05-13,06:30:00,19.0,38
2025-05-13,06:40:00,21.6,31
2025-05-13,06:50:00,22.1,30
2025-05-13,07:00:00,22.5,29
2025-05-13,07:10:00,23.0,29
2025-05-13,07:20:00,23.5,29
2025-05-13,07:30:00,23.9,29
2025-05-13,07:40:00,24.3,27
2025-05-13,07:50:00,24.5,26
2025-05-13,08:00:00,24.5,26
2025-05-13,08:10:00,24.9,25
2025-05-13,08:20:00,25.0,25
2025-05-13,08:30:00,25.3,26
2025-05-13,08:40:00,25.4,27
2025-05-13,08:50:00,25.7,27
2025-05-13,09:00:00,25.9,27
2025-05-13,09:10:00,25.9,26
2025-05-13,09:20:00,26.0,28
2025-05-13,09:30:00,26.1,28
2025-05-13,09:40:00,26.5,27
2025-05-13,09:50:00,26.6,26
2025-05-13,10:40:00,26.2,36
2025-05-13,10:50:00,26.4,34
2025-05-13,11:00:00,26.4,33
2025-05-13,11:10:00,26.2,35
2025-05-13,11:20:00,25.7,38
2025-05-13,11:30:00,25.7,37
2025-05-13,11:40:00,25.6,38
2025-05-13,11:50:00,25.9,38
2025-05-13,12:00:00,25.6,36
2025-05-13,12:10:00,25.5,37
Loading