adaptivemd.Location¶
-
class
adaptivemd.Location(location)[source]¶ A representation of a path in adaptiveMD
This is an important part of adaptiveMD. It allows you to specify file paths also relative to certain special folders in adaptiveMD, like the project folder. These special paths will be interpreted by the schedulers when they actually execute tasks
Note that folder names ALWAYS end in
/while filenames NEVERYou can use special prefixes
file://{relative}/{path}references local files. If you want absolute paths you start withfile:///{absolute}/{path}worker://{relative_to_worker}relative to the working directorystaging://relative to staging directorysandbox://relative to the sandbox, the folder that contains worker directoriesshared://relative to the main shared FS folderproject://relative to the specific project folder. Usually inshared://projects/{project-name}/
Variables: location (str) – the full location using special prefixed Methods
__init__(location)args()Return a list of args of the __init__ function of a class base()Return the most parent class actually derived from StorableMixin clone()Make a deep copy of the objects descendants()Return a list of all subclassed objects from_dict(dct)Reconstruct an object from a dictionary representation get_uuid()Create a new unique ID idx(store)Return the index which is used for the object in the given store. named(name)Attach a .name property to an object objects()Returns a dictionary of all storable objects to_dict()Convert object into a dictionary representation Attributes
ACTIVE_LONGCREATION_COUNTINSTANCE_UUIDallowed_drivesbase_clsReturn the base class base_cls_nameReturn the name of the base class basenamereturns: the file basename basename_shortreturns: the basename without extension clsReturn the class name as a string default_drivedirnamereturns: the path of the directory, like os.path.dirname drivereturn the prefix name extensionreturns: the filename extension or ‘’ of non exists is_folderreturns: True if location is a folder is_tempreturns: True when the location is a temporary folder that might be pathreturns: the complete path without prefix shortreturns: a shortened form of the path splitreturns: split_drivereturns: * str – the drive (prefix with ://) urlreturns: return the full form always with a prefix use_absolute_local_paths-
is_temp¶ Returns: True when the location is a temporary folder that might be deleted Return type: bool
-
short¶ Returns: a shortened form of the path Return type: str
-
url¶ Returns: return the full form always with a prefix Return type: str
-
basename¶ Returns: the file basename Return type: str
-
is_folder¶ Returns: True if location is a folder Return type: bool
-
path¶ Returns: the complete path without prefix Return type: str
-
dirname¶ Returns: the path of the directory, like os.path.dirname Return type: str
-
drive¶ return the prefix name
Returns: the prefix name like staging, project, worker, file` Return type: str
-
extension¶ Returns: the filename extension or ‘’ of non exists Return type: str
-
basename_short¶ Returns: the basename without extension Return type: str
-
split_drive¶ Returns: - str – the drive (prefix with ://)
- str – the full path without prefix