Buffered file manager module.
Persistent object to append and read numpy arrays to unique keys.
This object is abstractly a key/value pair map where the operations are to append, read, and delete numpy arrays associated with those keys. The object attempts to keep data in RAM as much as possible and saves data to files on disk to manage memory and persist between instantiations.
Append data to the file.
- array_id (int) – unique key to identify the array node
- array_data (numpy.ndarray) – data to append to node.
Delete node array_id from disk and cache.
Method to flush data in memory to disk.
Read the entirety of the file.
Internally this might mean that part of the file is read from disk and the end from the buffer or any combination of those.
Parameters: array_id (string) – unique node id to read Returns: contents of node as a numpy.ndarray.
InVEST recreation workspace fetcher.
Fetch workspace from remote server.
After the call a .zip file exists at args[‘workspace_dir’] named args[‘workspace_id’] + ‘.zip’ and contains the zipped workspace of that model run.
- args['workspace_dir'] (string) – path to workspace directory
- args['hostname'] (string) – FQDN to recreation server
- args['port'] (string or int) – port on hostname for recreation server
- args['workspace_id'] (string) – workspace identifier