looper 1.6.0a3__py3-none-any.whl → 1.7.0__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.
- looper/_version.py +1 -1
- looper/cli_looper.py +18 -4
- looper/conductor.py +14 -0
- looper/looper.py +11 -4
- {looper-1.6.0a3.dist-info → looper-1.7.0.dist-info}/METADATA +3 -3
- {looper-1.6.0a3.dist-info → looper-1.7.0.dist-info}/RECORD +10 -10
- {looper-1.6.0a3.dist-info → looper-1.7.0.dist-info}/LICENSE.txt +0 -0
- {looper-1.6.0a3.dist-info → looper-1.7.0.dist-info}/WHEEL +0 -0
- {looper-1.6.0a3.dist-info → looper-1.7.0.dist-info}/entry_points.txt +0 -0
- {looper-1.6.0a3.dist-info → looper-1.7.0.dist-info}/top_level.txt +0 -0
looper/_version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "1.
|
1
|
+
__version__ = "1.7.0"
|
looper/cli_looper.py
CHANGED
@@ -219,19 +219,27 @@ def build_parser():
|
|
219
219
|
for subparser in [run_subparser, rerun_subparser]:
|
220
220
|
subparser.add_argument(
|
221
221
|
"-u",
|
222
|
-
"--lump",
|
222
|
+
"--lump-s",
|
223
223
|
default=None,
|
224
224
|
metavar="X",
|
225
225
|
type=html_range(min_val=0, max_val=100, step=0.1, value=0),
|
226
|
-
help="
|
226
|
+
help="Lump by size: total input file size (GB) to batch into one job",
|
227
227
|
)
|
228
228
|
subparser.add_argument(
|
229
229
|
"-n",
|
230
|
-
"--
|
230
|
+
"--lump-n",
|
231
231
|
default=None,
|
232
232
|
metavar="N",
|
233
233
|
type=html_range(min_val=1, max_val="num_samples", value=1),
|
234
|
-
help="
|
234
|
+
help="Lump by number: number of samples to batch into one job",
|
235
|
+
)
|
236
|
+
subparser.add_argument(
|
237
|
+
"-j",
|
238
|
+
"--lump-j",
|
239
|
+
default=None,
|
240
|
+
metavar="J",
|
241
|
+
type=int,
|
242
|
+
help="Lump samples into number of jobs.",
|
235
243
|
)
|
236
244
|
|
237
245
|
check_subparser.add_argument(
|
@@ -501,6 +509,12 @@ def build_parser():
|
|
501
509
|
version="{}".format(" ".join(subparsers.choices.keys())),
|
502
510
|
)
|
503
511
|
|
512
|
+
report_subparser.add_argument(
|
513
|
+
"--portable",
|
514
|
+
help="Makes html report portable.",
|
515
|
+
action="store_true",
|
516
|
+
)
|
517
|
+
|
504
518
|
result.append(parser)
|
505
519
|
return result
|
506
520
|
|
looper/conductor.py
CHANGED
@@ -6,6 +6,7 @@ import os
|
|
6
6
|
import subprocess
|
7
7
|
import time
|
8
8
|
import yaml
|
9
|
+
from math import ceil
|
9
10
|
from copy import copy, deepcopy
|
10
11
|
from json import loads
|
11
12
|
from subprocess import check_output
|
@@ -132,6 +133,7 @@ class SubmissionConductor(object):
|
|
132
133
|
compute_variables=None,
|
133
134
|
max_cmds=None,
|
134
135
|
max_size=None,
|
136
|
+
max_jobs=None,
|
135
137
|
automatic=True,
|
136
138
|
collate=False,
|
137
139
|
):
|
@@ -166,6 +168,8 @@ class SubmissionConductor(object):
|
|
166
168
|
include in a single job script.
|
167
169
|
:param int | float | NoneType max_size: Upper bound on total file
|
168
170
|
size of inputs used by the commands lumped into single job script.
|
171
|
+
:param int | float | NoneType max_jobs: Upper bound on total number of jobs to
|
172
|
+
group samples for submission.
|
169
173
|
:param bool automatic: Whether the submission should be automatic once
|
170
174
|
the pool reaches capacity.
|
171
175
|
:param bool collate: Whether a collate job is to be submitted (runs on
|
@@ -200,6 +204,16 @@ class SubmissionConductor(object):
|
|
200
204
|
"{}".format(self.extra_pipe_args)
|
201
205
|
)
|
202
206
|
|
207
|
+
if max_jobs:
|
208
|
+
if max_jobs == 0 or max_jobs < 0:
|
209
|
+
raise ValueError(
|
210
|
+
"If specified, max job command count must be a positive integer, greater than zero."
|
211
|
+
)
|
212
|
+
|
213
|
+
num_samples = len(self.prj.samples)
|
214
|
+
samples_per_job = num_samples / max_jobs
|
215
|
+
max_cmds = ceil(samples_per_job)
|
216
|
+
|
203
217
|
if not self.collate:
|
204
218
|
self.automatic = automatic
|
205
219
|
if max_cmds is None and max_size is None:
|
looper/looper.py
CHANGED
@@ -404,8 +404,9 @@ class Runner(Executor):
|
|
404
404
|
extra_args=args.command_extra,
|
405
405
|
extra_args_override=args.command_extra_override,
|
406
406
|
ignore_flags=args.ignore_flags,
|
407
|
-
max_cmds=args.
|
408
|
-
max_size=args.
|
407
|
+
max_cmds=args.lump_n,
|
408
|
+
max_size=args.lump_s,
|
409
|
+
max_jobs=args.lump_j,
|
409
410
|
)
|
410
411
|
submission_conductors[piface.pipe_iface_file] = conductor
|
411
412
|
|
@@ -547,12 +548,16 @@ class Reporter(Executor):
|
|
547
548
|
p = self.prj
|
548
549
|
project_level = args.project
|
549
550
|
|
551
|
+
portable = args.portable
|
552
|
+
|
550
553
|
if project_level:
|
551
554
|
psms = self.prj.get_pipestat_managers(project_level=True)
|
552
555
|
print(psms)
|
553
556
|
for name, psm in psms.items():
|
554
557
|
# Summarize will generate the static HTML Report Function
|
555
|
-
report_directory = psm.summarize(
|
558
|
+
report_directory = psm.summarize(
|
559
|
+
looper_samples=self.prj.samples, portable=portable
|
560
|
+
)
|
556
561
|
print(f"Report directory: {report_directory}")
|
557
562
|
else:
|
558
563
|
for piface_source_samples in self.prj._samples_by_piface(
|
@@ -567,7 +572,9 @@ class Reporter(Executor):
|
|
567
572
|
print(psms)
|
568
573
|
for name, psm in psms.items():
|
569
574
|
# Summarize will generate the static HTML Report Function
|
570
|
-
report_directory = psm.summarize(
|
575
|
+
report_directory = psm.summarize(
|
576
|
+
looper_samples=self.prj.samples, portable=portable
|
577
|
+
)
|
571
578
|
print(f"Report directory: {report_directory}")
|
572
579
|
|
573
580
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: looper
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.7.0
|
4
4
|
Summary: A pipeline submission engine that parses sample inputs and submits pipelines for each sample.
|
5
5
|
Home-page: https://github.com/pepkit/looper
|
6
6
|
Author: Nathan Sheffield, Vince Reuter, Michal Stolarczyk, Johanna Klughammer, Andre Rendeiro
|
@@ -22,8 +22,8 @@ Requires-Dist: jinja2
|
|
22
22
|
Requires-Dist: logmuse >=0.2.0
|
23
23
|
Requires-Dist: pandas >=2.0.2
|
24
24
|
Requires-Dist: pephubclient >=0.1.2
|
25
|
-
Requires-Dist: peppy >=0.40.0
|
26
|
-
Requires-Dist: pipestat >=0.
|
25
|
+
Requires-Dist: peppy >=0.40.0
|
26
|
+
Requires-Dist: pipestat >=0.8.0
|
27
27
|
Requires-Dist: pyyaml >=3.12
|
28
28
|
Requires-Dist: rich >=9.10.0
|
29
29
|
Requires-Dist: ubiquerg >=0.5.2
|
@@ -1,13 +1,13 @@
|
|
1
1
|
looper/__init__.py,sha256=f_z9YY4ibOk7eyWoaViH_VaCXMlPQeiftbnibSFj-3E,1333
|
2
2
|
looper/__main__.py,sha256=8CX2ae8mUQNI_Z8pdBT4i5UFqROFX1awyFnuYCKuYXg,238
|
3
|
-
looper/_version.py,sha256=
|
3
|
+
looper/_version.py,sha256=lEEx5lwinUby-YNl7w-VFGUcjcibsJ9EuzgJ2W7ocrU,22
|
4
4
|
looper/cli_divvy.py,sha256=J07x83sqC4jJeu3_yS6KOARPWmwKGAV7JvN33T5zDac,5907
|
5
|
-
looper/cli_looper.py,sha256=
|
6
|
-
looper/conductor.py,sha256=
|
5
|
+
looper/cli_looper.py,sha256=se-EbQ4nucWxMiU0VLnmV0Kss-JMjSmWih6vHaOiLi0,26367
|
6
|
+
looper/conductor.py,sha256=9k0r_vsHCP25MrDjz7GR16_EEdqP9JZELYZJVm6ny1g,30777
|
7
7
|
looper/const.py,sha256=bPj4lTuj2l6gwHROWqj16iHfJFo9ghZAz8THNREWW4U,8558
|
8
8
|
looper/divvy.py,sha256=qa1ebbQTfNupAyDfhfEJ6mbZ_V3zk-D_E-Tck7miJ38,15688
|
9
9
|
looper/exceptions.py,sha256=r6SKKt-m8CXQnXGDnuiwoA6zBJhIZflygBKjX4RCloI,3419
|
10
|
-
looper/looper.py,sha256=
|
10
|
+
looper/looper.py,sha256=U3mNqXRDZRzmFXV26TcPQYKPdY1plPvMraNHTnps4mQ,30448
|
11
11
|
looper/parser_types.py,sha256=d3FHt54f9jo9VZMr5SQkbghcAdABqiYZW2JBGO5EBnw,2327
|
12
12
|
looper/pipeline_interface.py,sha256=y46tB1_73d1FX8N1w4-GGvRBJ7rqhenuUYVtUfIhK5s,14974
|
13
13
|
looper/plugins.py,sha256=MaMdPmK9U_4FkNJE5kccohBbY1i2qj1NTEucubFOJek,5747
|
@@ -55,9 +55,9 @@ looper/schemas/divvy_config_schema.yaml,sha256=7GJfKLc3VX4RGjHnOE1zxwsHXhj_ur9za
|
|
55
55
|
looper/schemas/pipeline_interface_schema_generic.yaml,sha256=D16Rkpj03H9WnvA_N18iNU-hH_HwOuyESJ8Hk5hZSXc,1518
|
56
56
|
looper/schemas/pipeline_interface_schema_project.yaml,sha256=-ZWyA0lKXWik3obuLNVk3IsAZYfbLVbCDvJnD-Fcluo,1567
|
57
57
|
looper/schemas/pipeline_interface_schema_sample.yaml,sha256=x0OwVnijJpvm50DscvvJujdK4UAI7d71pqVemQS-D-0,1564
|
58
|
-
looper-1.
|
59
|
-
looper-1.
|
60
|
-
looper-1.
|
61
|
-
looper-1.
|
62
|
-
looper-1.
|
63
|
-
looper-1.
|
58
|
+
looper-1.7.0.dist-info/LICENSE.txt,sha256=oB6ZGDa4kcznznJKJsLLFFcOZyi8Y6e2Jv0rJozgp-I,1269
|
59
|
+
looper-1.7.0.dist-info/METADATA,sha256=pGYwFxwYKiFtzUuYx4t0q-cMKmCF_fhsKwAFlbwBfP0,1733
|
60
|
+
looper-1.7.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
61
|
+
looper-1.7.0.dist-info/entry_points.txt,sha256=AEL1eb0gPLYvAEUewM35Ng4scXGZIWJK4Mxdj3Hm8Fw,83
|
62
|
+
looper-1.7.0.dist-info/top_level.txt,sha256=I0Yf7djsoQAMzwHBbDiQi9hGtq4Z41_Ma5CX8qXG8Y8,7
|
63
|
+
looper-1.7.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|