pybiolib 1.1.2153__py3-none-any.whl → 1.1.2155__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.
@@ -98,6 +98,15 @@ class DataRecord:
98
98
  if data_size_in_bytes > 4_500_000_000_000:
99
99
  raise BioLibError('Attempted to push directory with a size larger than the limit of 4.5 TB')
100
100
 
101
+ # validate data record
102
+ detailed_dict: types.DataRecordDetailedDict = self._get_detailed_dict()
103
+ if detailed_dict['type']:
104
+ # only validate if data record has a type
105
+ data_record_type: types.DataRecordTypeDict = detailed_dict['type']
106
+ logger.info(f"Validating data record of type {data_record_type['name']}")
107
+ for rule in data_record_type['validation_rules']:
108
+ logger.info(f"Validating rule {rule['type']} for {rule['path']}...")
109
+
101
110
  min_chunk_size_bytes = 10_000_000
102
111
  chunk_size_in_bytes: int
103
112
  if chunk_size_in_mb:
@@ -110,7 +119,7 @@ class DataRecord:
110
119
  chunk_size_in_bytes = max(min_chunk_size_bytes, int(data_size_in_bytes / 9_000))
111
120
 
112
121
  data_size_in_mb = round(data_size_in_bytes / 10**6)
113
- print(f'Zipping {len(files_to_zip)} files, in total ~{data_size_in_mb}mb of data')
122
+ logger.info(f'Zipping {len(files_to_zip)} files, in total ~{data_size_in_mb}mb of data')
114
123
 
115
124
  response = api.client.post(path='/lfs/versions/', data={'resource_uuid': self._state['resource_uuid']})
116
125
  data_record_version: DataRecordVersion = response.json()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pybiolib
3
- Version: 1.1.2153
3
+ Version: 1.1.2155
4
4
  Summary: BioLib Python Client
5
5
  Home-page: https://github.com/biolib
6
6
  License: MIT
@@ -1,7 +1,7 @@
1
1
  LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
2
2
  README.md,sha256=_IH7pxFiqy2bIAmaVeA-iVTyUwWRjMIlfgtUbYTtmls,368
3
3
  biolib/__init__.py,sha256=_tThyzISH81yS9KXP_X3qEiKXmsIp5XOBcJIODfLVnc,4338
4
- biolib/_data_record/data_record.py,sha256=x5PG-27Wcb63vC5x6Yy5c_v9AUkTCuxbyVOaUYulE_w,11634
4
+ biolib/_data_record/data_record.py,sha256=Sud8yXz7yR6YW4V6OqE7nO6I4a0TdqijmMTZwwU59j8,12152
5
5
  biolib/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  biolib/_internal/data_record/__init__.py,sha256=wLOy3Pb7dWYik5eQtQM00DH2AWC-M5RbTjwh9InPiqo,56
7
7
  biolib/_internal/data_record/data_record.py,sha256=If4SQj-XwKSPzCpaWA01LEGKalZ6DEjD5PJZRtl3Mao,556
@@ -116,8 +116,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
116
116
  biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
117
117
  biolib/utils/seq_util.py,sha256=jC5WhH63FTD7SLFJbxQGA2hOt9NTwq9zHl_BEec1Z0c,4907
118
118
  biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
119
- pybiolib-1.1.2153.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
120
- pybiolib-1.1.2153.dist-info/METADATA,sha256=7oMneze0XK26-3FIj-NoSqIUcSCrFOSYemaRmFOyL0Q,1508
121
- pybiolib-1.1.2153.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
122
- pybiolib-1.1.2153.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
123
- pybiolib-1.1.2153.dist-info/RECORD,,
119
+ pybiolib-1.1.2155.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
120
+ pybiolib-1.1.2155.dist-info/METADATA,sha256=tu73TYRGUjbJ3MfO15gYq2UO81SYCy508-wwmoHN3WQ,1508
121
+ pybiolib-1.1.2155.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
122
+ pybiolib-1.1.2155.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
123
+ pybiolib-1.1.2155.dist-info/RECORD,,