pybiolib 1.2.257__py3-none-any.whl → 1.2.264__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.
@@ -79,6 +79,7 @@ class HttpClient:
79
79
  timeout_in_seconds: Optional[int] = None,
80
80
  response_path: Optional[str] = None,
81
81
  retry_on_http_500: Optional[bool] = False,
82
+ max_content_length_in_bytes: Optional[int] = None,
82
83
  ) -> HttpResponse:
83
84
  if not HttpClient.ssl_context:
84
85
  HttpClient.ssl_context = _create_ssl_context()
@@ -107,6 +108,14 @@ class HttpClient:
107
108
  context=HttpClient.ssl_context,
108
109
  timeout=timeout_in_seconds,
109
110
  ) as response:
111
+ if max_content_length_in_bytes:
112
+ content_length = response.getheader('Content-Length')
113
+ if not content_length:
114
+ raise ValueError('No Content-Length in response headers')
115
+
116
+ if int(content_length) > max_content_length_in_bytes:
117
+ raise ValueError(f'Content-Length exceeds {max_content_length_in_bytes} bytes')
118
+
110
119
  return HttpResponse(response, response_path)
111
120
 
112
121
  except urllib.error.HTTPError as error:
@@ -83,11 +83,14 @@ class DockerExecutor:
83
83
  try:
84
84
  job_uuid = self._options['job']['public_id']
85
85
  send_status_update = self._options['send_status_update']
86
+ logger_no_user_data.debug(f'Reading module input of {job_uuid}.')
86
87
  with open(module_input_path, 'rb') as fp:
87
- module_input = ModuleInput(fp.read()).deserialize()
88
+ module_input_tmp = ModuleInput(fp.read())
89
+ logger_no_user_data.debug(f'Deserialing module input of {job_uuid}...')
90
+ module_input = module_input_tmp.deserialize()
88
91
 
89
92
  send_status_update(StatusUpdate(progress=55, log_message='Pulling images...'))
90
-
93
+ logger_no_user_data.debug(f'Pulling image for {job_uuid}.')
91
94
  self._pull()
92
95
 
93
96
  send_status_update(StatusUpdate(progress=70, log_message='Computing...'))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pybiolib
3
- Version: 1.2.257
3
+ Version: 1.2.264
4
4
  Summary: BioLib Python Client
5
5
  Home-page: https://github.com/biolib
6
6
  License: MIT
@@ -10,7 +10,7 @@ biolib/_internal/data_record/remote_storage_endpoint.py,sha256=eCptuZ4DMAPnaNCVD
10
10
  biolib/_internal/file_utils.py,sha256=4jT6j7bB21c0JNn5BfnyWQib_zt0CVtJ_TiOFOStRcE,2604
11
11
  biolib/_internal/fuse_mount/__init__.py,sha256=B_tM6RM2dBw-vbpoHJC4X3tOAaN1H2RDvqYJOw3xFwg,55
12
12
  biolib/_internal/fuse_mount/experiment_fuse_mount.py,sha256=08aUdEq_bvqLBft_gSLjOClKDy5sBnMts1RfJf7AP_U,7012
13
- biolib/_internal/http_client.py,sha256=C0bHqVrenT3ifZ3k0FdzBZR7ZxDXKBUG148KRxheAyk,5701
13
+ biolib/_internal/http_client.py,sha256=_uop4dwetHA5MvmxVqGzxV9w1Zl4peRVZXFiImuL2BA,6211
14
14
  biolib/_internal/lfs/__init__.py,sha256=gSWo_xg61UniYgD7yNYxeT4I9uaXBCBSi3_nmZjnPpE,35
15
15
  biolib/_internal/lfs/cache.py,sha256=pQS2np21rdJ6I3DpoOutnzPHpLOZgUIS8TMltUJk_k4,2226
16
16
  biolib/_internal/libs/__init__.py,sha256=Jdf4tNPqe_oIIf6zYml6TiqhL_02Vyqwge6IELrAFhw,98
@@ -78,7 +78,7 @@ biolib/compute_node/job_worker/cache_state.py,sha256=MwjSRzcJJ_4jybqvBL4xdgnDYSI
78
78
  biolib/compute_node/job_worker/cache_types.py,sha256=ajpLy8i09QeQS9dEqTn3T6NVNMY_YsHQkSD5nvIHccQ,818
79
79
  biolib/compute_node/job_worker/docker_image_cache.py,sha256=ansHIkJIq_EMW1nZNlW-RRLVVeKWTbzNICYaOHpKiRE,7460
80
80
  biolib/compute_node/job_worker/executors/__init__.py,sha256=bW6t1qi3PZTlHM4quaTLa8EI4ALTCk83cqcVJfJfJfE,145
81
- biolib/compute_node/job_worker/executors/docker_executor.py,sha256=HiAenSATWY7DApAKSBQU74jvA-JF42x5dBV8JxQ_eQ0,28829
81
+ biolib/compute_node/job_worker/executors/docker_executor.py,sha256=97S0FH5cmDVh9k5bMdKw_oTbhlvWNMTYHlCWsMcTVr0,29118
82
82
  biolib/compute_node/job_worker/executors/docker_types.py,sha256=VhsU1DKtJjx_BbCkVmiPZPH4ROiL1ygW1Y_s1Kbpa2o,216
83
83
  biolib/compute_node/job_worker/executors/tars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
84
84
  biolib/compute_node/job_worker/executors/types.py,sha256=yP5gG39hr-DLnw9bOE--VHi-1arDbIYiGuV1rlTbbHI,1466
@@ -120,8 +120,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
120
120
  biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
121
121
  biolib/utils/seq_util.py,sha256=Ozk0blGtPur_D9MwShD02r_mphyQmgZkx-lOHOwnlIM,6730
122
122
  biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
123
- pybiolib-1.2.257.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
124
- pybiolib-1.2.257.dist-info/METADATA,sha256=nxPz1_DHtgQxfOuCZbBy5GzPPJrqjCyZNPwBOzlTods,1558
125
- pybiolib-1.2.257.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
126
- pybiolib-1.2.257.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
127
- pybiolib-1.2.257.dist-info/RECORD,,
123
+ pybiolib-1.2.264.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
124
+ pybiolib-1.2.264.dist-info/METADATA,sha256=pJKjfgwqbhssh25YE8ksBIKSVzRqJ3wFQP7UUXec854,1558
125
+ pybiolib-1.2.264.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
126
+ pybiolib-1.2.264.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
127
+ pybiolib-1.2.264.dist-info/RECORD,,