AFL.automation.APIServer.Driver#
Functions
Classes
|
|
|
|
|
A dictionary-like class that serializes changes to disk |
- class AFL.automation.APIServer.Driver.Driver(name, defaults=None, overrides=None, useful_links=None)[source]#
- unqueued()#
- queued()#
- quickbar()#
- static_dirs = {'tiled_browser_css': PosixPath('/github/workspace/AFL/automation/apps/tiled_browser/css'), 'tiled_browser_js': PosixPath('/github/workspace/AFL/automation/apps/tiled_browser/js')}#
- classmethod gather_defaults()[source]#
Gather all inherited static class-level dictionaries called default.
- classmethod gather_static_dirs()[source]#
Gather all inherited class-level dictionaries named static_dirs.
This method walks through the Method Resolution Order (MRO) to collect static_dirs definitions from all parent classes. Child class definitions override parent definitions for the same subpath key.
- Returns:
Dictionary mapping subpaths to pathlib.Path objects for directories containing static files to be served by the API server.
- Return type:
- clean_config()[source]#
Remove any config keys that are not present in defaults.
This method gathers all defaults from the class hierarchy, makes a copy of the current config, and removes any keys that don’t exist in the defaults. The cleaned config is then saved back to the persistent config.
- Returns:
Dictionary containing the keys that were removed from config
- Return type:
- pre_execute(**kwargs)[source]#
Executed before each call to execute
All of the kwargs passed to execute are also pass to this method. It is expected that this method be overridden by subclasses.
- post_execute(**kwargs)[source]#
Executed after each call to execute
All of the kwargs passed to execute are also pass to this method. It is expected that this method be overridden by subclasses.
- set_data(data: dict)[source]#
Set data in the DataPacket object
- Parameters:
data (dict) – Dictionary of data to store in the driver object
variables (Note! if the keys in data are not system or sample)
:param : :param they will be erased at the end of this function call.:
- retrieve_obj(uid, delete=True)[source]#
Retrieve an object from the dropbox
- Parameters:
uid (str) – The uuid of the file to retrieve
- tiled_search(queries='', filters='', sort='', fields='', offset=0, limit=50, **kwargs)[source]#
Proxy endpoint for Tiled metadata search to avoid CORS issues.
- tiled_get_data(entry_id, **kwargs)[source]#
Proxy endpoint to get xarray HTML representation from Tiled.
- tiled_get_distinct_values(field, **kwargs)[source]#
Get distinct values for a metadata field from Tiled.
- tiled_get_plot_manifest(entry_ids, **kwargs)[source]#
Return lightweight plotting manifest without eager data materialization.
- tiled_get_plot_variable_data(entry_ids, var_name, cast_float32='true', **kwargs)[source]#
Return one variable payload for plotting, fetched lazily.
- tiled_get_combined_plot_data(entry_ids, **kwargs)[source]#
Legacy eager endpoint for combined plot payloads.
- tiled_get_gantt_metadata(entry_ids, **kwargs)[source]#
Get metadata for Gantt chart from multiple Tiled entries.