5 Commits

Author SHA1 Message Date
hasslesstech 29196ba400 test
Test Agent / test-agent-run (push) Successful in 5m47s
2026-02-24 14:55:54 +02:00
bacant150 72e9f65b27 Add mosquitto runtime folders to gitignore
Test Agent / test-agent-run (push) Successful in 5m23s
2026-02-24 14:47:21 +02:00
bacant150 2b6bed70d8 Fix timestamp field in AggregatedData 2026-02-24 14:47:21 +02:00
bacant150 21ee14ccd1 Реалізовую базовий FileReader та переношу sleep до FileDatasource.read() 2026-02-24 14:47:17 +02:00
hasslesstech b330180909 lab1: add CI/CD testing
Test Agent / test-agent-run (push) Successful in 5m24s
2026-02-24 10:16:28 +02:00
3 changed files with 9 additions and 7 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
name: Test Agent
on: [push]
on: [push, workflow_dispatch]
jobs:
test-agent-run:
runs-on: debian-x86_64
runs-on: arch-x86_64
steps:
- name: Fetch the repository
run: git clone --branch ${{ gitea.ref_name }} --depth 1 ${{ gitea.server_url }}/${{ gitea.repository }}
+2
View File
@@ -0,0 +1,2 @@
agent/docker/mosquitto/data/
agent/docker/mosquitto/log/
+5 -5
View File
@@ -68,7 +68,7 @@ class FileDatasource:
return AggregatedData(
accelerometer=acc,
gps=gps,
time=datetime.utcnow(),
timestamp=datetime.utcnow(),
user_id=config.USER_ID,
)
@@ -203,9 +203,9 @@ class FileDatasource:
def _parse_acc(row: List[str]) -> Accelerometer:
if len(row) < 3:
raise ValueError(f"Accelerometer row must have 3 values (x,y,z). Got: {row}")
x = int(float(row[0]))
y = int(float(row[1]))
z = int(float(row[2]))
x = int(row[0])
y = int(row[1])
z = int(row[2])
return Accelerometer(x=x, y=y, z=z)
@staticmethod
@@ -222,4 +222,4 @@ class FileDatasource:
float(s)
return True
except Exception:
return False
return False