pybiolib 1.1.2023__py3-none-any.whl → 1.1.2025__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,11 +22,6 @@ PathFilter = Union[str, Callable[[str], bool]]
22
22
  class DataRecord:
23
23
  def __init__(self, uri: str):
24
24
  self._uri = uri
25
- uri_parsed = parse_app_uri(uri, use_account_as_name_default=False)
26
- if not uri_parsed['app_name']:
27
- raise ValueError('Expected parameter "uri" to contain resource name')
28
-
29
- self._name = uri_parsed['app_name']
30
25
 
31
26
  def __repr__(self):
32
27
  return f'DataRecord: {self._uri}'
@@ -37,7 +32,11 @@ class DataRecord:
37
32
 
38
33
  @property
39
34
  def name(self) -> str:
40
- return self._name
35
+ uri_parsed = parse_app_uri(self.uri, use_account_as_name_default=False)
36
+ if not uri_parsed['app_name']:
37
+ raise ValueError('Expected parameter "uri" to contain resource name')
38
+
39
+ return uri_parsed['app_name']
41
40
 
42
41
  def list_files(self, path_filter: Optional[PathFilter] = None) -> List[LazyLoadedFile]:
43
42
  app_response: AppGetResponse = api_client.get(path='/app/', params={'uri': self._uri}).json()
@@ -76,6 +75,10 @@ class DataRecord:
76
75
  def save_files(self, output_dir: str, path_filter: Optional[PathFilter] = None) -> None:
77
76
  self.download_files(output_dir=output_dir, path_filter=path_filter)
78
77
 
78
+ def update(self, data_path: str) -> None:
79
+ assert os.path.isdir(data_path), f'The path "{data_path}" is not a directory.'
80
+ self._uri = lfs.push_large_file_system(lfs_uri=self._uri, input_dir=data_path)
81
+
79
82
  @staticmethod
80
83
  def create(destination: str, data_path: str, name: Optional[str] = None) -> 'DataRecord':
81
84
  assert os.path.isdir(data_path), f'The path "{data_path}" is not a directory.'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pybiolib
3
- Version: 1.1.2023
3
+ Version: 1.1.2025
4
4
  Summary: BioLib Python Client
5
5
  Home-page: https://github.com/biolib
6
6
  License: MIT
@@ -3,7 +3,7 @@ README.md,sha256=_IH7pxFiqy2bIAmaVeA-iVTyUwWRjMIlfgtUbYTtmls,368
3
3
  biolib/__init__.py,sha256=nfZvVkrHZLvjvvlAvFzhvem9NMfqgmw8NWaCH9HGzew,4045
4
4
  biolib/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  biolib/_internal/data_record/__init__.py,sha256=1Bk303i3rFet9veS56fIsrBYtT5X3n9vcsYMA6T6c5o,36
6
- biolib/_internal/data_record/data_record.py,sha256=ctijrrZ-LfUxtwzS8PEVa1VBuBLVWEhmo2yHcEDkC0A,7178
6
+ biolib/_internal/data_record/data_record.py,sha256=NLzeyzqtzB9QOVUDcEiOn2WbMdMijbjZGYgy_p592_c,7372
7
7
  biolib/_internal/data_record/remote_storage_endpoint.py,sha256=hILu0TmFx-ZyDYbWPC4QEPogP0RRVEqwgJc8OEHYp50,1742
8
8
  biolib/_internal/fuse_mount/__init__.py,sha256=B_tM6RM2dBw-vbpoHJC4X3tOAaN1H2RDvqYJOw3xFwg,55
9
9
  biolib/_internal/fuse_mount/experiment_fuse_mount.py,sha256=08aUdEq_bvqLBft_gSLjOClKDy5sBnMts1RfJf7AP_U,7012
@@ -109,8 +109,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
109
109
  biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
110
110
  biolib/utils/seq_util.py,sha256=jC5WhH63FTD7SLFJbxQGA2hOt9NTwq9zHl_BEec1Z0c,4907
111
111
  biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
112
- pybiolib-1.1.2023.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
113
- pybiolib-1.1.2023.dist-info/METADATA,sha256=70NFyEQo2lxFDn7DMiflWXEjB58w7HtD0bQHgQ5ORDc,1508
114
- pybiolib-1.1.2023.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
115
- pybiolib-1.1.2023.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
116
- pybiolib-1.1.2023.dist-info/RECORD,,
112
+ pybiolib-1.1.2025.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
113
+ pybiolib-1.1.2025.dist-info/METADATA,sha256=6lmW6PO_BxMu1HXkuURGnOWspzomoeU21nIvSVBemDg,1508
114
+ pybiolib-1.1.2025.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
115
+ pybiolib-1.1.2025.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
116
+ pybiolib-1.1.2025.dist-info/RECORD,,