zea.set_data_paths

zea.set_data_paths(user_config=None, local=True, verify=True)[source]

Get data paths (absolute paths to location of data).

Parameters:
  • user_config (Union[str, dict]) – Path to a YAML file with user info. If None, uses ./users.yaml as the default file. Can also be a dictionary structured as shown below.

  • local (bool) – Use local dataset or get from NAS.

  • verify (bool) – Verify that the paths exist and are directories. Default is True.

Example YAML structure:

data_root: ...
output: ...

You can also specify different data_root for different users and machines:

my_username:
  my_hostname:
    system: windows
    data_root: ...
    output: ...
  other_hostname:
    system: linux
    data_root:
      local: ...
      remote: ...
  # If both my_hostname and other_hostname are not matching, fallback to:
  system: linux
  data_root: ...

other_username:
  data_root: ...

These will take precedence over the data_root that is userless and machineless.

Returns:

Absolute paths to location of data. Stores the following parameters:

data_root, zea_root, output, system, username, hostname

Return type:

dict