pybiolib 1.2.978__py3-none-any.whl → 1.2.983__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.
@@ -11,9 +11,9 @@ class EnterpriseSettingsDict(TypedDict):
11
11
 
12
12
  class UserDict(TypedDict):
13
13
  uuid: str
14
- email: str
15
14
  account: AccountDict
16
15
 
17
16
 
18
17
  class UserDetailedDict(UserDict):
18
+ email: str
19
19
  enterprise_settings: Optional[EnterpriseSettingsDict]
@@ -86,25 +86,22 @@ def fasta_batch_records(records, work_per_batch_min, work_per_residue=1, verbose
86
86
 
87
87
  batches = []
88
88
  batch = []
89
- current_work_units = 0
90
- total_work_units = 0
89
+ current_longest_seq_len = 0
91
90
  for record in records:
92
91
  # Add to batch
93
92
  batch.append(record)
94
93
 
95
- # Calculate work units
96
- seq = record.sequence
97
- sequence_work_units = len(seq) * work_per_residue
94
+ seq_len = len(record.sequence)
95
+ current_longest_seq_len = max(current_longest_seq_len, seq_len)
98
96
 
99
- # Increase counters
100
- current_work_units += sequence_work_units
101
- total_work_units += sequence_work_units
97
+ # Calculate work units based on longest sequence * number of sequences
98
+ current_work_units = current_longest_seq_len * work_per_residue * len(batch)
102
99
 
103
100
  # If above limit, start a new batch
104
101
  if current_work_units >= work_per_batch_min:
105
102
  batches.append(batch)
106
103
  batch = []
107
- current_work_units = 0
104
+ current_longest_seq_len = 0
108
105
 
109
106
  # Append last batch if present
110
107
  if batch:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pybiolib
3
- Version: 1.2.978
3
+ Version: 1.2.983
4
4
  Summary: BioLib Python Client
5
5
  License: MIT
6
6
  Keywords: biolib
@@ -49,9 +49,9 @@ biolib/_internal/types/resource_permission.py,sha256=ZE7eokpzswAiqe4GdpdxdZ6_jl0
49
49
  biolib/_internal/types/resource_version.py,sha256=cU0YFHqxO-wX_Y6CoeK0Iei61gFwVoyR_kPOSTQ4mCs,304
50
50
  biolib/_internal/types/result.py,sha256=MesSTBXCkaw8HydXgHf1OKGVLzsxhZ1KV5z4w-VI-0M,231
51
51
  biolib/_internal/types/typing.py,sha256=qrsk8hHcGEbDpU1QQFzHAKnhQxkMe7uJ6pxHeAnfv1Y,414
52
- biolib/_internal/types/user.py,sha256=1-ZJqs4Vq8S1cK_0x9LZ0cLH2QqGMupJsoyHZhEhY6k,439
52
+ biolib/_internal/types/user.py,sha256=5_hYG0jrdGxynCCWXGaHZCAlVcRKBqMIEA2EBGrnpiE,439
53
53
  biolib/_internal/utils/__init__.py,sha256=p5vsIFyu-zYqBgdSMfwW9NC_jk7rXvvCbV4Bzd3As7c,630
54
- biolib/_internal/utils/multinode.py,sha256=-J3PEAK3NaOwCn--5T7vWHkA3yu5w9QhmuhkQcH-2wY,8229
54
+ biolib/_internal/utils/multinode.py,sha256=bFj7ucQB0MgGrgtnCbFFcanwdtdBGupJIZB9sFi2Ts8,8244
55
55
  biolib/_runtime/runtime.py,sha256=Z9YVF8e2A1VMdndEf7CIGqvVKHS7FPY0VGmRgLBB7ck,5699
56
56
  biolib/_session/session.py,sha256=US1Y1jfFIAm86-Lq3C7nCXpZXUJXXBVBkND9djMNYxI,1649
57
57
  biolib/api/__init__.py,sha256=mQ4u8FijqyLzjYMezMUUbbBGNB3iFmkNdjXnWPZ7Jlw,138
@@ -146,8 +146,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
146
146
  biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
147
147
  biolib/utils/seq_util.py,sha256=Ozk0blGtPur_D9MwShD02r_mphyQmgZkx-lOHOwnlIM,6730
148
148
  biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
149
- pybiolib-1.2.978.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
150
- pybiolib-1.2.978.dist-info/METADATA,sha256=WnAkVEuNbtQgSRRnb7o0Ohk-GdT53zRcXvE6JirGcnk,1570
151
- pybiolib-1.2.978.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
152
- pybiolib-1.2.978.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
153
- pybiolib-1.2.978.dist-info/RECORD,,
149
+ pybiolib-1.2.983.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
150
+ pybiolib-1.2.983.dist-info/METADATA,sha256=dHtGcD9XEEKaOlFU18U9VLeynB9gYqsBuSle-Q7jKcg,1570
151
+ pybiolib-1.2.983.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
152
+ pybiolib-1.2.983.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
153
+ pybiolib-1.2.983.dist-info/RECORD,,