please refer DataPathManager's __init__ and class doc
(self, freq: Optional[Union[str, Freq]] = None)
| 364 | return QlibConfig.LOCAL_URI |
| 365 | |
| 366 | def get_data_uri(self, freq: Optional[Union[str, Freq]] = None) -> Path: |
| 367 | """ |
| 368 | please refer DataPathManager's __init__ and class doc |
| 369 | """ |
| 370 | if freq is not None: |
| 371 | freq = str(freq) # converting Freq to string |
| 372 | if freq is None or freq not in self.provider_uri: |
| 373 | freq = QlibConfig.DEFAULT_FREQ |
| 374 | _provider_uri = self.provider_uri[freq] |
| 375 | if self.get_uri_type(_provider_uri) == QlibConfig.LOCAL_URI: |
| 376 | return Path(_provider_uri) |
| 377 | elif self.get_uri_type(_provider_uri) == QlibConfig.NFS_URI: |
| 378 | if "win" in platform.system().lower(): |
| 379 | # windows, mount_path is the drive |
| 380 | _path = str(self.mount_path[freq]) |
| 381 | return Path(f"{_path}:\\") if ":" not in _path else Path(_path) |
| 382 | return Path(self.mount_path[freq]) |
| 383 | else: |
| 384 | raise NotImplementedError(f"This type of uri is not supported") |
| 385 | |
| 386 | def set_mode(self, mode): |
| 387 | # raise KeyError |
no test coverage detected