pybiolib 1.1.1629__py3-none-any.whl → 1.1.1641__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.
@@ -551,7 +551,7 @@ class DockerExecutor:
551
551
  'Docker UpperDir not available. Falling back to container.get_archive() for file extraction'
552
552
  )
553
553
 
554
- logger.debug(f'overlay_upper_dir_path={overlay_upper_dir_path}')
554
+ logger_no_user_data.debug(f'overlay_upper_dir_path={overlay_upper_dir_path}')
555
555
 
556
556
  files_and_empty_dirs: List[FileInContainer] = []
557
557
  for path in run_diff_paths:
biolib/utils/seq_util.py CHANGED
@@ -1,4 +1,5 @@
1
- from biolib.typing_utils import List, Optional
1
+ import re
2
+ from biolib.typing_utils import List, Optional, Dict
2
3
 
3
4
  allowed_sequence_chars = set("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.")
4
5
  def find_invalid_sequence_characters(sequence):
@@ -6,11 +7,24 @@ def find_invalid_sequence_characters(sequence):
6
7
  return invalid_chars
7
8
 
8
9
  class SeqUtilRecord:
9
- def __init__(self, sequence: str, sequence_id: str, description: Optional['str']):
10
+ def __init__(self,
11
+ sequence: str,
12
+ sequence_id: str,
13
+ description: Optional['str'],
14
+ properties: Optional[Dict[str, str]] = None):
10
15
  self.sequence = sequence
11
16
  self.id = sequence_id # pylint: disable=invalid-name
12
17
  self.description = description
13
18
 
19
+ if properties:
20
+ disallowed_pattern = re.compile(r"[=\[\]\n]")
21
+ for key, value in properties.items():
22
+ assert not bool(disallowed_pattern.search(key)), "Key cannot contain characters =[] and newline"
23
+ assert not bool(disallowed_pattern.search(value)), "Value cannot contain characters =[] and newline"
24
+ self.properties = properties
25
+ else:
26
+ self.properties = {}
27
+
14
28
  def __repr__(self) -> str:
15
29
  return f'{self.__class__.__name__} ({self.id})'
16
30
 
@@ -78,5 +92,8 @@ class SeqUtil:
78
92
  with open(file_name, mode='w') as file_handle:
79
93
  for record in records:
80
94
  optional_description = f' {record.description}' if record.description else ''
95
+ if record.properties:
96
+ for key, value in record.properties.items():
97
+ optional_description += f' [{key}={value}]'
81
98
  sequence = '\n'.join(record.sequence[i:i + 80] for i in range(0, len(record.sequence), 80))
82
99
  file_handle.write(f'>{record.id}{optional_description}\n{sequence}\n')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pybiolib
3
- Version: 1.1.1629
3
+ Version: 1.1.1641
4
4
  Summary: BioLib Python Client
5
5
  Home-page: https://github.com/biolib
6
6
  License: MIT
@@ -54,7 +54,7 @@ biolib/compute_node/job_worker/cache_state.py,sha256=N2AxvvgfizKx9P_ysM0GDCmueMU
54
54
  biolib/compute_node/job_worker/cache_types.py,sha256=ajpLy8i09QeQS9dEqTn3T6NVNMY_YsHQkSD5nvIHccQ,818
55
55
  biolib/compute_node/job_worker/docker_image_cache.py,sha256=ansHIkJIq_EMW1nZNlW-RRLVVeKWTbzNICYaOHpKiRE,7460
56
56
  biolib/compute_node/job_worker/executors/__init__.py,sha256=bW6t1qi3PZTlHM4quaTLa8EI4ALTCk83cqcVJfJfJfE,145
57
- biolib/compute_node/job_worker/executors/docker_executor.py,sha256=74wUy5piILgCY-eFu2LuEOWDqmuYkaijy-ZW83S6WKw,26335
57
+ biolib/compute_node/job_worker/executors/docker_executor.py,sha256=vXL2Y7bemwjcICbq78m3K8DsNHkImYl1fgQhnWMYQOs,26348
58
58
  biolib/compute_node/job_worker/executors/docker_types.py,sha256=VhsU1DKtJjx_BbCkVmiPZPH4ROiL1ygW1Y_s1Kbpa2o,216
59
59
  biolib/compute_node/job_worker/executors/tars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
60
  biolib/compute_node/job_worker/executors/types.py,sha256=yP5gG39hr-DLnw9bOE--VHi-1arDbIYiGuV1rlTbbHI,1466
@@ -99,10 +99,10 @@ biolib/utils/__init__.py,sha256=RxXoO8sLfmv5UIdkYAX7p5K03UUIUzss_A5vtb8CLlw,6897
99
99
  biolib/utils/app_uri.py,sha256=hOFsTQfA7QbyQyg9ItGdD8VDWBJw0vYMqzLdSiJXmqQ,1857
100
100
  biolib/utils/cache_state.py,sha256=BFrZlV4XZIueIFzAFiPidX4hmwADKY5Y5ZuqlerF5l0,3060
101
101
  biolib/utils/multipart_uploader.py,sha256=PEorMsTNg5f72e3Y-KA3LrI-F6EAnsD9vENV-5EuiX0,9896
102
- biolib/utils/seq_util.py,sha256=hudZ7o1LI7xdpjb1OFKPBZvGVxjiqKez8zMwjtWT0TY,3269
102
+ biolib/utils/seq_util.py,sha256=7EwBNJ0yFAfX1lTOwf5IpcbjdNZ8u0TeHf8gW9n28IA,4019
103
103
  biolib/utils/zip/remote_zip.py,sha256=NCdUnVbGCv7SfXCI-yVU-is_OnyWmLAnVpIdSvo-W4k,23500
104
- pybiolib-1.1.1629.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
105
- pybiolib-1.1.1629.dist-info/METADATA,sha256=grvWM24XHQjGcGXpjHv79ba0vY8PzvyTce4CUjkQ3wk,1543
106
- pybiolib-1.1.1629.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
107
- pybiolib-1.1.1629.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
108
- pybiolib-1.1.1629.dist-info/RECORD,,
104
+ pybiolib-1.1.1641.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
105
+ pybiolib-1.1.1641.dist-info/METADATA,sha256=QAbbPvjHwCp16EXECXjNiVJalta7-_lvrSjrFuF2COw,1543
106
+ pybiolib-1.1.1641.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
107
+ pybiolib-1.1.1641.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
108
+ pybiolib-1.1.1641.dist-info/RECORD,,