oh-my-batch 0.5.4__py3-none-any.whl → 0.5.5__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.
oh_my_batch/combo.py CHANGED
@@ -152,6 +152,19 @@ class ComboMaker:
152
152
  raise ValueError(f"Variable {key} not found")
153
153
  return self
154
154
 
155
+ def sort(self, *keys: str, reverse=False):
156
+ """
157
+ Sort variables
158
+ :param keys: Variable names to sort
159
+ :param reverse: If True, sort in descending order, default is False
160
+ """
161
+ for key in keys:
162
+ if key in self._vars:
163
+ self._vars[key].sort(reverse=reverse)
164
+ else:
165
+ raise ValueError(f"Variable {key} not found")
166
+ return self
167
+
155
168
  def set_broadcast(self, *keys: str):
156
169
  """
157
170
  Specify variables use broadcast strategy instead of cartesian product
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: oh-my-batch
3
- Version: 0.5.4
3
+ Version: 0.5.5
4
4
  Summary:
5
5
  License: GPL
6
6
  Author: weihong.xu
@@ -4,12 +4,12 @@ oh_my_batch/assets/__init__.py,sha256=Exub46UbQaz2V2eXpQeiVfnThQpXaNeuyjlGY6gBSZ
4
4
  oh_my_batch/assets/functions.sh,sha256=LaiavZBu84D7C1r-dWhf91vPTuHXCMV1DQZUIPVQnjE,1001
5
5
  oh_my_batch/batch.py,sha256=i3q1zY2li-YyN_99zjlpNJlZqqF5PSO3hwW1e0_N2VE,3958
6
6
  oh_my_batch/cli.py,sha256=Jyz8q2pUYke3mfJS6F_G9S9hApddgXxQw1BsN6Kfkjc,553
7
- oh_my_batch/combo.py,sha256=2d-vbKnn_UGKfnOp85le2vxiqj_qJXoIB4dAYJ8So_4,10885
7
+ oh_my_batch/combo.py,sha256=ZtIJ8O3532ynV5jxlBHmn0T3l8eV6cMxjikumr8u-Ek,11313
8
8
  oh_my_batch/job.py,sha256=Va-l24R6GxyqX2Ca5w6tr7hWgmJgQQRMHLjnlPAWkR4,7224
9
9
  oh_my_batch/misc.py,sha256=G_iOovRCrShBJJCc82QLN0CvMqW4adOefEoY1GedEiw,452
10
10
  oh_my_batch/util.py,sha256=5ve2QcviuF0UHFLrsXmjMTj0ogXJ4g05q1y-yWCFuOk,2409
11
- oh_my_batch-0.5.4.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
12
- oh_my_batch-0.5.4.dist-info/METADATA,sha256=diLWMY_cgqxHdh48i9YxBgx11eCM12L2FMJJM2ujjIQ,5468
13
- oh_my_batch-0.5.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
14
- oh_my_batch-0.5.4.dist-info/entry_points.txt,sha256=ZY2GutSoNjjSyJ4qO2pTeseKUFgoTYdvmgkuZZkwi68,77
15
- oh_my_batch-0.5.4.dist-info/RECORD,,
11
+ oh_my_batch-0.5.5.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
12
+ oh_my_batch-0.5.5.dist-info/METADATA,sha256=GwlZIh-NreNXLGxR0WrVS9s0_vmmF6toYeH_bmwSAI0,5468
13
+ oh_my_batch-0.5.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
14
+ oh_my_batch-0.5.5.dist-info/entry_points.txt,sha256=ZY2GutSoNjjSyJ4qO2pTeseKUFgoTYdvmgkuZZkwi68,77
15
+ oh_my_batch-0.5.5.dist-info/RECORD,,