mirror of
https://github.com/Rhinemann/IoT-Systems.git
synced 2026-03-14 20:50:39 +02:00
fixes in imports and schemas
This commit is contained in:
parent
f9ef916331
commit
af94c007a2
22
agent/src/data/parking.csv
Normal file
22
agent/src/data/parking.csv
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
longitude,latitude,empty_count
|
||||||
|
50.450386085935094,30.524547100067142,10
|
||||||
|
50.450386085935094,30.524547100067142,11
|
||||||
|
50.450386085935094,30.524547100067142,13
|
||||||
|
50.450386085935094,30.524547100067142,15
|
||||||
|
50.450386085935094,30.524547100067142,7
|
||||||
|
50.450386085935094,30.524547100067142,9
|
||||||
|
50.450386085935094,30.524547100067142,4
|
||||||
|
50.450386085935094,30.524547100067142,0
|
||||||
|
50.450386085935094,30.524547100067142,0
|
||||||
|
50.450386085935094,30.524547100067142,3
|
||||||
|
50.450386085935094,30.524547100067142,4
|
||||||
|
50.450069433207545,30.52406822530458,16
|
||||||
|
50.450069433207545,30.52406822530458,20
|
||||||
|
50.450069433207545,30.52406822530458,25
|
||||||
|
50.450069433207545,30.52406822530458,30
|
||||||
|
50.450069433207545,30.52406822530458,29
|
||||||
|
50.450069433207545,30.52406822530458,12
|
||||||
|
50.450069433207545,30.52406822530458,10
|
||||||
|
50.450069433207545,30.52406822530458,14
|
||||||
|
50.450069433207545,30.52406822530458,3
|
||||||
|
50.450069433207545,30.52406822530458,2
|
||||||
|
@ -2,9 +2,9 @@ from dataclasses import dataclass
|
|||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from agent.src.domain.accelerometer import Accelerometer
|
from domain.accelerometer import Accelerometer
|
||||||
from agent.src.domain.gps import Gps
|
from domain.gps import Gps
|
||||||
from agent.src.domain.parking import Parking
|
from domain.parking import Parking
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from agent.src.domain.gps import Gps
|
from domain.gps import Gps
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|||||||
@ -192,5 +192,5 @@ class FileDatasource:
|
|||||||
|
|
||||||
return Parking(
|
return Parking(
|
||||||
gps=Gps(longitude=lon, latitude=lat),
|
gps=Gps(longitude=lon, latitude=lat),
|
||||||
empty_count=empty_count,
|
empty_count=empty_count
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
from marshmallow import Schema, fields
|
from marshmallow import Schema, fields
|
||||||
from schema.accelerometer_schema import AccelerometerSchema
|
from schema.accelerometer_schema import AccelerometerSchema
|
||||||
from schema.gps_schema import GpsSchema
|
from schema.gps_schema import GpsSchema
|
||||||
|
from schema.parking_schema import ParkingSchema
|
||||||
|
|
||||||
|
|
||||||
class AggregatedDataSchema(Schema):
|
class AggregatedDataSchema(Schema):
|
||||||
accelerometer = fields.Nested(AccelerometerSchema)
|
accelerometer = fields.Nested(AccelerometerSchema)
|
||||||
gps = fields.Nested(GpsSchema)
|
gps = fields.Nested(GpsSchema)
|
||||||
|
parking = fields.Nested(ParkingSchema)
|
||||||
timestamp = fields.DateTime("iso")
|
timestamp = fields.DateTime("iso")
|
||||||
user_id = fields.Int()
|
user_id = fields.Int()
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from marshmallow import Schema, fields
|
from marshmallow import Schema, fields
|
||||||
|
|
||||||
from agent.src.schema.gps_schema import GpsSchema
|
from schema.gps_schema import GpsSchema
|
||||||
|
|
||||||
|
|
||||||
class ParkingSchema(Schema):
|
class ParkingSchema(Schema):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user