From 7ca360cc480477c5fca9a3fd907cf1b7deaa16ef Mon Sep 17 00:00:00 2001 From: Lennard Geese <lennard.geese@sva.de> Date: Fri, 11 Apr 2025 11:33:37 +0200 Subject: [PATCH] Add documentation --- DataHandler.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/DataHandler.py b/DataHandler.py index b37f5ff..e4f3e4f 100644 --- a/DataHandler.py +++ b/DataHandler.py @@ -1,17 +1,21 @@ from abc import ABC class DataHandler(ABC): + '''Defines variables that are needed for any type of interaction with FastF1's data. Any class utilizing FastF1 + data in any way should be a subclass of the DataHandler class to inherit these variables.''' def __init__(self): self.numberOfDrivers = 20 self.invalidDriverId = "NO_DRIVER" self.activateDebugOvertakeAnalysis = False - self.slickCompounds = ('SOFT', 'MEDIUM', 'HARD') + self.slickCompounds = ("SOFT", "MEDIUM", "HARD") self.validSessionTypes = ("Practice", "Qualifying", "Race") self.countOutPitstops = True self.firstFastF1Year: int = 2018 class SessionIdentifier: + '''Uniquely identifies a single session without having to load or create the Session object''' + year: int event: int | str sessionType: str @@ -23,6 +27,10 @@ class SessionIdentifier: class WeatherChangeWindow: + '''Identifies a window of laps, during which a weather change took place. A WeatherChangeWindow is itself not + associated with a SessionObject or a SessionIdentifier. This association must be made and maintained by whatever + object or function is using an object of this class.''' + firstLap: int lastLap: int -- GitLab