pybiolib 1.1.1984__py3-none-any.whl → 1.1.1988__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.
@@ -21,6 +21,9 @@ class _AttributeDict(TypedDict):
21
21
  st_uid: int
22
22
 
23
23
 
24
+ _SUCCESS_CODE = 0
25
+
26
+
24
27
  class ExperimentFuseMount(Operations):
25
28
  def __init__(self, experiment):
26
29
  self._experiment = experiment
@@ -29,10 +32,10 @@ class ExperimentFuseMount(Operations):
29
32
  self._mounted_at_epoch_seconds: int = int(time())
30
33
 
31
34
  @staticmethod
32
- def mount(experiment, path: str) -> None:
35
+ def mount_experiment(experiment, mount_path: str) -> None:
33
36
  FUSE(
34
37
  operations=ExperimentFuseMount(experiment),
35
- mountpoint=path,
38
+ mountpoint=mount_path,
36
39
  nothreads=True,
37
40
  foreground=True,
38
41
  allow_other=False,
@@ -97,7 +100,7 @@ class ExperimentFuseMount(Operations):
97
100
  # file not found
98
101
  raise FuseOSError(errno.ENOENT) from None
99
102
 
100
- return 0 # return dummy file handle
103
+ return 1234 # dummy file handle
101
104
 
102
105
  def read(self, path: str, size: int, offset: int, fh: int) -> bytes:
103
106
  job, path_in_job = self._parse_path(path)
@@ -108,6 +111,15 @@ class ExperimentFuseMount(Operations):
108
111
 
109
112
  return file.get_data(start=offset, length=size)
110
113
 
114
+ def release(self, path: str, fh: int) -> int:
115
+ return _SUCCESS_CODE
116
+
117
+ def releasedir(self, path: str, fh: int) -> int:
118
+ return _SUCCESS_CODE
119
+
120
+ def flush(self, path: str, fh: int) -> int:
121
+ return _SUCCESS_CODE
122
+
111
123
  @staticmethod
112
124
  def _get_directory_attributes(timestamp_epoch_seconds: int) -> _AttributeDict:
113
125
  return _AttributeDict(
@@ -193,11 +205,5 @@ class ExperimentFuseMount(Operations):
193
205
  def truncate(self, path, length, fh=None):
194
206
  raise FuseOSError(errno.EACCES)
195
207
 
196
- def flush(self, path, fh):
197
- raise FuseOSError(errno.EACCES)
198
-
199
- def release(self, path, fh):
200
- raise FuseOSError(errno.EACCES)
201
-
202
208
  def fsync(self, path, datasync, fh):
203
209
  raise FuseOSError(errno.EACCES)
@@ -73,7 +73,7 @@ class Experiment:
73
73
  def add_job(self, job_id: str) -> None:
74
74
  api.client.patch(path=f'/jobs/{job_id}/', data={'experiment_uuid': self.uuid})
75
75
 
76
- def mount_files(self, path: str) -> None:
76
+ def mount_files(self, mount_path: str) -> None:
77
77
  try:
78
78
  # Only attempt to import FUSE dependencies when strictly necessary
79
79
  from biolib._internal.fuse_mount import ( # pylint: disable=import-outside-toplevel
@@ -84,7 +84,7 @@ class Experiment:
84
84
  'Failed to import FUSE mounting utils. Please ensure FUSE is installed on your system.'
85
85
  ) from error
86
86
 
87
- _ExperimentFuseMount.mount(experiment=self, path=path)
87
+ _ExperimentFuseMount.mount_experiment(experiment=self, mount_path=mount_path)
88
88
 
89
89
  def export_job_list(self, export_format='dicts'):
90
90
  valid_formats = ('dicts', 'dataframe')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pybiolib
3
- Version: 1.1.1984
3
+ Version: 1.1.1988
4
4
  Summary: BioLib Python Client
5
5
  Home-page: https://github.com/biolib
6
6
  License: MIT
@@ -6,7 +6,7 @@ biolib/_internal/data_record/__init__.py,sha256=1Bk303i3rFet9veS56fIsrBYtT5X3n9v
6
6
  biolib/_internal/data_record/data_record.py,sha256=ctijrrZ-LfUxtwzS8PEVa1VBuBLVWEhmo2yHcEDkC0A,7178
7
7
  biolib/_internal/data_record/remote_storage_endpoint.py,sha256=LPq8Lr5FhKF9_o5K-bUdT7TeLe5XFUD0AAeTkNEVZug,1133
8
8
  biolib/_internal/fuse_mount/__init__.py,sha256=B_tM6RM2dBw-vbpoHJC4X3tOAaN1H2RDvqYJOw3xFwg,55
9
- biolib/_internal/fuse_mount/experiment_fuse_mount.py,sha256=DcR2NyUyZYgpsaKM1WBJZChAaD2vvt_vvZCXj-P2UTs,6878
9
+ biolib/_internal/fuse_mount/experiment_fuse_mount.py,sha256=08aUdEq_bvqLBft_gSLjOClKDy5sBnMts1RfJf7AP_U,7012
10
10
  biolib/_internal/http_client.py,sha256=DdooXei93JKGYGV4aQmzue_oFzvHkozg2UCxgk9dfDM,5081
11
11
  biolib/_internal/libs/__init__.py,sha256=Jdf4tNPqe_oIIf6zYml6TiqhL_02Vyqwge6IELrAFhw,98
12
12
  biolib/_internal/libs/fusepy/__init__.py,sha256=AWDzNFS-XV_5yKb0Qx7kggIhPzq1nj_BZS5y2Nso08k,41944
@@ -86,7 +86,7 @@ biolib/compute_node/webserver/webserver_types.py,sha256=Vmt1ZDecYhGBVEYWcW1DVxee
86
86
  biolib/compute_node/webserver/webserver_utils.py,sha256=XWvwYPbWNR3qS0FYbLLp-MDDfVk0QdaAmg3xPrT0H2s,4234
87
87
  biolib/compute_node/webserver/worker_thread.py,sha256=26tG73TADnOcXsAr7Iyf6smrLlCqB4x-vvmpUb8WqnA,11569
88
88
  biolib/experiments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
89
- biolib/experiments/experiment.py,sha256=kUQsH9AGAckPKT_nzaRuTh8Mb2pVUpxnuX9IstRTOEo,6351
89
+ biolib/experiments/experiment.py,sha256=_ied3A3U6NFa6_ewEYn2TCozqeHvDxDqdRhMtZbFL-M,6380
90
90
  biolib/experiments/types.py,sha256=n9GxdFA7cLMfHvLLqLmZzX31ELeSSkMXFoEEdFsdWGY,171
91
91
  biolib/jobs/__init__.py,sha256=aIb2H2DHjQbM2Bs-dysFijhwFcL58Blp0Co0gimED3w,32
92
92
  biolib/jobs/job.py,sha256=aWKnf_2pYdr76gh3hxPiVs2iuXlpwZkKPTK81Pz4G2U,19072
@@ -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.1984.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
113
- pybiolib-1.1.1984.dist-info/METADATA,sha256=PO0Sif5QkYXg1P20p7306bX-CXn6-Mpee7epEsP-1Fo,1508
114
- pybiolib-1.1.1984.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
115
- pybiolib-1.1.1984.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
116
- pybiolib-1.1.1984.dist-info/RECORD,,
112
+ pybiolib-1.1.1988.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
113
+ pybiolib-1.1.1988.dist-info/METADATA,sha256=XIgluZ7kse6hsGgEvV_WuogxaTHLLDbqp-ogSllCZmg,1508
114
+ pybiolib-1.1.1988.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
115
+ pybiolib-1.1.1988.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
116
+ pybiolib-1.1.1988.dist-info/RECORD,,