lime_tbx.application.coefficients.update module

Module in charge of downloading the updated coefficients from a remote server.

class lime_tbx.application.coefficients.update.Update[source]

Bases: object

Handles the process of checking for and downloading updated coefficient datasets from a remote server.

This class provides methods to verify the existence of updates, download new coefficient files, and validate their integrity before making them available for use in the toolbox.

check_for_updates(timeout=60) bool[source]

Checks for any coefficient updates in the server

Parameters:

timeout (int) – Timeout in seconds for the request that will be sent to the server. The default is 60.

Returns:

are_there_updates – True if there are updates

Return type:

bool

download_coefficients(stopper_checker: Callable, stopper_args: list) Tuple[int, int][source]

Download and update the toolbox coefficients from the server.

Parameters:
  • stopper_checker (callable) – Function that receives ‘*stopper_args’ as the parameters, and returns a boolean value that indicates if the update is still running (True) or if it has been stopped (False).

  • stopper_args (list) – Arguments of the stopper_checker function.

Returns:

  • quant_news (int) – Amount of new coefficients downloaded, included the failed ones.

  • quant_fails (int) – Amount of coefficients that couldn’t be downloaded or updated correctly.