nibcq.calibration.Diary ======================= .. py:class:: nibcq.calibration.Diary(file_path: str, settings: Optional[Settings] = None) Manages calibration diary operations for tracking device calibration history. Handles reading, writing, and parsing calibration entries in CSV format. Each entry contains a timestamp and temperature from when calibration was performed. The diary is used to determine when recalibration is needed based on elapsed time and temperature changes. .. attribute:: file_path Path to the calibration diary CSV file :type: str .. rubric:: Examples >>> diary = Diary("/path/to/calibration.csv") >>> entry = diary.last_entry >>> print(f"Last calibrated at {entry.timestamp}") .. py:property:: last_entry Get the most recent calibration entry from the diary. Reads the calibration diary file and returns the latest calibration entry containing timestamp and temperature information. This is used to determine when the device was last calibrated and under what temperature conditions. :returns: The most recent calibration entry with timestamp and temperature :rtype: Entry :raises FileNotFoundError: If the calibration diary file doesn't exist :raises ValueError: If the diary file format is invalid or corrupted :raises PermissionError: If the file cannot be read due to permissions .. rubric:: Examples >>> diary = Diary("calibration.csv") >>> entry = diary.last_entry >>> print(f"Last calibrated: {entry.timestamp} at {entry.temperature}°C") .. py:method:: add_new_entry(entry: Entry) Add a new calibration entry to the diary.