From 6c4c644791a99be4511653b81a77bb0270ca471a Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Thu, 18 Jul 2019 10:16:19 -0400 Subject: [PATCH 01/28] initalize dev, changelog, bump version --- docs/changelog.md | 7 +++++++ looper/_version.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index 12d56d144..0704ce03b 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,6 +2,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format. +## [0.12.5] -- unreleased +### Added + +### Changed + +### Fixed + ## [0.12.4] -- 2019-07-18 ### Added - Ability to declare `required_executables` in a `PipelineInterface`, to trigger a naive "runnability" check for a sample submission diff --git a/looper/_version.py b/looper/_version.py index 6dd4954d0..8e377d6b3 100644 --- a/looper/_version.py +++ b/looper/_version.py @@ -1 +1 @@ -__version__ = "0.12.4" +__version__ = "0.12.5" From 3c7fea3f0cc8d97ad9326ec197803722f07a7621 Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Thu, 18 Jul 2019 10:17:38 -0400 Subject: [PATCH 02/28] version to dev --- looper/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/looper/_version.py b/looper/_version.py index 8e377d6b3..2e33434bc 100644 --- a/looper/_version.py +++ b/looper/_version.py @@ -1 +1 @@ -__version__ = "0.12.5" +__version__ = "0.12.5-dev" From 94a44c4f318cc571acd880958826f70e281b1b0b Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Thu, 18 Jul 2019 11:10:56 -0400 Subject: [PATCH 03/28] update authors --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7ac606c3c..f2287aead 100644 --- a/setup.py +++ b/setup.py @@ -79,7 +79,7 @@ def get_static(name, condition=None): ], keywords="bioinformatics, sequencing, ngs", url="https://github.com/pepkit/looper", - author=u"Nathan Sheffield, Vince Reuter, Johanna Klughammer, Andre Rendeiro", + author=u"Nathan Sheffield, Vince Reuter, Michal Stolarczyk, Johanna Klughammer, Andre Rendeiro", license="BSD2", entry_points={ "console_scripts": [ From 7acfc8db52455d8efcf68bda11410b7d61c57927 Mon Sep 17 00:00:00 2001 From: nsheff Date: Fri, 19 Jul 2019 14:35:36 -0400 Subject: [PATCH 04/28] Reduce verbosity of missing options. See #174 --- looper/pipeline_interface.py | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/looper/pipeline_interface.py b/looper/pipeline_interface.py index 26b7d8d72..b284d7796 100644 --- a/looper/pipeline_interface.py +++ b/looper/pipeline_interface.py @@ -366,6 +366,7 @@ def update_argtext(argtext, option, argument): if "optional_arguments" in config: _LOGGER.debug("Processing options") args = config["optional_arguments"] + missing_optional_args = [] for pipe_opt, sample_attr in args.iteritems(): _LOGGER.debug("Option '%s' maps to sample attribute '%s'", pipe_opt, sample_attr) @@ -376,14 +377,33 @@ def update_argtext(argtext, option, argument): try: arg = getattr(sample, sample_attr) except AttributeError: - _LOGGER.warning( - "> Note (missing optional attribute): '%s' requests " - "sample attribute '%s' for option '%s'", - pipeline_name, sample_attr, pipe_opt) + missing_optional_args.append((pipeline_name, sample_attr, pipe_opt)) continue argstring = update_argtext( argstring, option=pipe_opt, argument=arg) + + if len(missing_optional_args) > 0: + warning_msg = {} + for pipeline_name, sample_attr, pipe_opt in missing_optional_args: + msg = "{arg}: '{attr}';".format(attr=sample_attr, + arg=pipe_opt) + if not pipeline_name in warning_msg.keys(): + warning_msg[pipeline_name] = [msg] + else: + warning_msg[pipeline_name].append(msg) + + for pipeline_name, msg in warning_msg.items(): + n_missing = len(msg) + if n_missing > 5: + _LOGGER.info( + "> NOTE: {} missing optional attributes for pipeline '{}'.".format(n_missing, + pipeline_name)) + else: + _LOGGER.info( + "> NOTE: {} missing optional attributes for pipeline '{}': {}".format(n_missing, + pipeline_name, " ".join(msg))) + _LOGGER.debug("Script args: '%s'", argstring) return argstring From 5cc88d2a5cdfc13a850def8f5b0f0c32604813a0 Mon Sep 17 00:00:00 2001 From: nsheff Date: Fri, 19 Jul 2019 17:22:41 -0400 Subject: [PATCH 05/28] downgrade skipped samples msg --- looper/looper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/looper/looper.py b/looper/looper.py index 64c5e3da0..e41fbbc75 100755 --- a/looper/looper.py +++ b/looper/looper.py @@ -417,7 +417,7 @@ def __call__(self, args, remaining_args, rerun=False, **compute_kwargs): cmd_sub_total += conductor.num_cmd_submissions skipped_sample_scripts = conductor.write_skipped_sample_scripts() if skipped_sample_scripts: - _LOGGER.info( + _LOGGER.debug( "{} script(s) for skipped samples:\n{}". format(len(skipped_sample_scripts), "\n".join(skipped_sample_scripts))) From 97dc83fc4fcf68293b63eb0c5d64a0d578a628d7 Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Wed, 24 Jul 2019 10:19:50 -0400 Subject: [PATCH 06/28] add possible project input paths accession method in Project --- looper/pipeline_interface.py | 21 +++++++++++++++++++++ looper/project.py | 12 ++++++++++++ 2 files changed, 33 insertions(+) diff --git a/looper/pipeline_interface.py b/looper/pipeline_interface.py index 26b7d8d72..bc83aa62a 100644 --- a/looper/pipeline_interface.py +++ b/looper/pipeline_interface.py @@ -288,6 +288,27 @@ def finalize_pipeline_key_and_paths(self, pipeline_key): return strict_pipeline_key, script_path_only, script_path_with_flags + def get_sample_inputs(self, sample): + """ + Get a list of possible input files for a sample. + This method returns all the files that exist and are listed in the arguments section of the pipeline interface + for the pipeline associated with the sample in question + + :param peppy.Sample sample: a sample object + :return list[str]: possible input files for the sample + """ + inputs = [] + pipeline_name = self.fetch_pipelines(sample.protocol) + config = self.select_pipeline(pipeline_name) + if "arguments" not in config: + _LOGGER.info("No arguments found for '{}' in '{}'".format(pipeline_name, self.pipe_iface_file)) + args = config["arguments"] + for _, sample_attr in args.iteritems(): + input = getattr(sample, sample_attr, False) + if os.path.isfile(input): + inputs.append(input) + return inputs + def get_arg_string(self, pipeline_name, sample, submission_folder_path="", **null_replacements): """ diff --git a/looper/project.py b/looper/project.py index 3d1926232..5c6794f21 100644 --- a/looper/project.py +++ b/looper/project.py @@ -227,6 +227,18 @@ def get_interfaces(self, protocol): """ return self.interfaces[protocol] + def get_inputs(self): + """ + Get all the file paths that exist and are used to construct the commands for looper run in this project + + :return list[str]: list of file paths + """ + project_inputs = [] + for pi in self.interfaces: + for s in self.samples: + project_inputs += pi.get_sample_inputs(s) + return project_inputs + def get_outputs(self, skip_sample_less=True): """ Map pipeline identifier to collection of output specifications. From ff290476d55d77b1309f30ccfc38e7d649b3d43d Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Wed, 31 Jul 2019 12:41:30 -0400 Subject: [PATCH 07/28] correct indentation --- looper/pipeline_interface.py | 41 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/looper/pipeline_interface.py b/looper/pipeline_interface.py index b86897fc1..45785f384 100644 --- a/looper/pipeline_interface.py +++ b/looper/pipeline_interface.py @@ -403,27 +403,26 @@ def update_argtext(argtext, option, argument): argstring = update_argtext( argstring, option=pipe_opt, argument=arg) - - if len(missing_optional_args) > 0: - warning_msg = {} - for pipeline_name, sample_attr, pipe_opt in missing_optional_args: - msg = "{arg}: '{attr}';".format(attr=sample_attr, - arg=pipe_opt) - if not pipeline_name in warning_msg.keys(): - warning_msg[pipeline_name] = [msg] - else: - warning_msg[pipeline_name].append(msg) - - for pipeline_name, msg in warning_msg.items(): - n_missing = len(msg) - if n_missing > 5: - _LOGGER.info( - "> NOTE: {} missing optional attributes for pipeline '{}'.".format(n_missing, - pipeline_name)) - else: - _LOGGER.info( - "> NOTE: {} missing optional attributes for pipeline '{}': {}".format(n_missing, - pipeline_name, " ".join(msg))) + if len(missing_optional_args) > 0: + warning_msg = {} + for pipeline_name, sample_attr, pipe_opt in missing_optional_args: + msg = "{arg}: '{attr}';".format(attr=sample_attr, + arg=pipe_opt) + if not pipeline_name in warning_msg.keys(): + warning_msg[pipeline_name] = [msg] + else: + warning_msg[pipeline_name].append(msg) + + for pipeline_name, msg in warning_msg.items(): + n_missing = len(msg) + if n_missing > 5: + _LOGGER.info( + "> NOTE: {} missing optional attributes for pipeline '{}'.".format(n_missing, + pipeline_name)) + else: + _LOGGER.info( + "> NOTE: {} missing optional attributes for pipeline '{}': {}".format(n_missing, + pipeline_name, " ".join(msg))) _LOGGER.debug("Script args: '%s'", argstring) From 923c932ab49f57737e62f1466a141d2dafe5d361 Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Thu, 8 Aug 2019 10:39:44 -0400 Subject: [PATCH 08/28] changelog, version --- docs/changelog.md | 2 ++ looper/_version.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index 0704ce03b..14f49c267 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -4,6 +4,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [0.12.5] -- unreleased ### Added +- `PipelineInterface.get_sample_inputs` method for listing the paths to the declared inputs for a sample +- `Project.get_inputs` method for listing input paths that exist ### Changed diff --git a/looper/_version.py b/looper/_version.py index 2e33434bc..8e377d6b3 100644 --- a/looper/_version.py +++ b/looper/_version.py @@ -1 +1 @@ -__version__ = "0.12.5-dev" +__version__ = "0.12.5" From 533a990e4563ce8b63361b7d2ba0fceae9f75371 Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Thu, 8 Aug 2019 10:41:51 -0400 Subject: [PATCH 09/28] update changelog --- docs/changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.md b/docs/changelog.md index 14f49c267..9a32f511d 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - `Project.get_inputs` method for listing input paths that exist ### Changed +- reduce verbosity of missing options; [Issue 174](https://github.com/pepkit/looper/issues/174) ### Fixed From 07a6d3813337be81e3157704a38d195fd2af872f Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Fri, 9 Aug 2019 11:22:00 -0400 Subject: [PATCH 10/28] revert input file sizes determination --- docs/changelog.md | 4 ---- looper/pipeline_interface.py | 21 --------------------- looper/project.py | 12 ------------ 3 files changed, 37 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 9a32f511d..8afc910fe 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -3,10 +3,6 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format. ## [0.12.5] -- unreleased -### Added -- `PipelineInterface.get_sample_inputs` method for listing the paths to the declared inputs for a sample -- `Project.get_inputs` method for listing input paths that exist - ### Changed - reduce verbosity of missing options; [Issue 174](https://github.com/pepkit/looper/issues/174) diff --git a/looper/pipeline_interface.py b/looper/pipeline_interface.py index 45785f384..c68627e28 100644 --- a/looper/pipeline_interface.py +++ b/looper/pipeline_interface.py @@ -288,27 +288,6 @@ def finalize_pipeline_key_and_paths(self, pipeline_key): return strict_pipeline_key, script_path_only, script_path_with_flags - def get_sample_inputs(self, sample): - """ - Get a list of possible input files for a sample. - This method returns all the files that exist and are listed in the arguments section of the pipeline interface - for the pipeline associated with the sample in question - - :param peppy.Sample sample: a sample object - :return list[str]: possible input files for the sample - """ - inputs = [] - pipeline_name = self.fetch_pipelines(sample.protocol) - config = self.select_pipeline(pipeline_name) - if "arguments" not in config: - _LOGGER.info("No arguments found for '{}' in '{}'".format(pipeline_name, self.pipe_iface_file)) - args = config["arguments"] - for _, sample_attr in args.iteritems(): - input = getattr(sample, sample_attr, False) - if os.path.isfile(input): - inputs.append(input) - return inputs - def get_arg_string(self, pipeline_name, sample, submission_folder_path="", **null_replacements): """ diff --git a/looper/project.py b/looper/project.py index 5c6794f21..3d1926232 100644 --- a/looper/project.py +++ b/looper/project.py @@ -227,18 +227,6 @@ def get_interfaces(self, protocol): """ return self.interfaces[protocol] - def get_inputs(self): - """ - Get all the file paths that exist and are used to construct the commands for looper run in this project - - :return list[str]: list of file paths - """ - project_inputs = [] - for pi in self.interfaces: - for s in self.samples: - project_inputs += pi.get_sample_inputs(s) - return project_inputs - def get_outputs(self, skip_sample_less=True): """ Map pipeline identifier to collection of output specifications. From 64cba43217538acc469ccdf1bb47776e71d25afa Mon Sep 17 00:00:00 2001 From: nsheff Date: Fri, 9 Aug 2019 16:15:53 -0400 Subject: [PATCH 11/28] check anchor image instead of filename. Fix #213 --- looper/html_reports.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/looper/html_reports.py b/looper/html_reports.py index 87554da3c..6ea27b3fb 100644 --- a/looper/html_reports.py +++ b/looper/html_reports.py @@ -211,7 +211,7 @@ def create_object_html(self, single_object, navbar, footer): # Set the PATH to the image/file. Catch any errors. # Check if the object is an HTML document - if not str(row['filename']).lower().endswith(IMAGE_EXTS): + if not str(row['anchor_image']).lower().endswith(IMAGE_EXTS): image_path = page_path else: try: @@ -231,10 +231,12 @@ def create_object_html(self, single_object, navbar, footer): if os.path.isfile(image_path) and os.path.isfile(page_path): image_relpath = os.path.relpath(image_path, self.reports_dir) # If the object has a valid image, use it! + _LOGGER.debug("Checking image path: {}".format(image_path)) if str(image_path).lower().endswith(IMAGE_EXTS): figures.append([page_relpath, str(row['sample_name']), image_relpath]) # Or if that "image" is not an image, treat it as a link elif not str(image_path).lower().endswith(IMAGE_EXTS): + _LOGGER.debug("Got link") links.append([str(row['sample_name']), image_relpath]) else: warnings.append(str(row['filename'])) From bc0d6458bd4f7865549fbb8a856248264a196dd5 Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Mon, 12 Aug 2019 11:36:41 -0400 Subject: [PATCH 12/28] correct layout; #214 --- looper/jinja_templates/head.html | 5 ++ looper/jinja_templates/object.html | 62 +++++++++++----------- looper/jinja_templates/project_object.html | 4 +- 3 files changed, 36 insertions(+), 35 deletions(-) diff --git a/looper/jinja_templates/head.html b/looper/jinja_templates/head.html index ee169abfb..d0e621283 100644 --- a/looper/jinja_templates/head.html +++ b/looper/jinja_templates/head.html @@ -52,8 +52,13 @@ .container { overflow: auto; padding-bottom: 40px; + padding-left: 25px; margin-top: 20px; min-height: 100%; + margin-left: 0px; + margin-right: 0px; + max-width: none; + min-width: none; /* must be same height as the footer */ } diff --git a/looper/jinja_templates/object.html b/looper/jinja_templates/object.html index c104164bf..43281cdda 100644 --- a/looper/jinja_templates/object.html +++ b/looper/jinja_templates/object.html @@ -8,38 +8,36 @@
-
- {% if links[0] is defined or figures[0] is defined %} -

{{ name }}

- {% else %} -

No objects to display for: {{ name }}

- {% endif %} - - {% if links[0] is defined %} -

Links
-
- {% for link in links %} - {{ link[0] }} - {% endfor %} -
- {% endif %} - {% if figures[0] is defined %} -
Figures
-
- {% for figure in figures %} - {% set i = loop.index - 1 %} -
- - - - -
Fig.{{ i }} {{ figure[1] }}
-
-
- {% endfor %} -
- {% endif %} -
+ {% if links[0] is defined or figures[0] is defined %} +

{{ name }}

+ {% else %} +

No objects to display for: {{ name }}

+ {% endif %} + + {% if links[0] is defined %} +

Links
+
+ {% for link in links %} + {{ link[0] }} + {% endfor %} +
+ {% endif %} + {% if figures[0] is defined %} +
Figures
+
+ {% for figure in figures %} + {% set i = loop.index - 1 %} +
+ + + + +
Fig.{{ i }} {{ figure[1] }}
+
+
+ {% endfor %} +
+ {% endif %}

diff --git a/looper/jinja_templates/project_object.html b/looper/jinja_templates/project_object.html index 8ef640be1..fdc9ff931 100644 --- a/looper/jinja_templates/project_object.html +++ b/looper/jinja_templates/project_object.html @@ -1,4 +1,3 @@ -
{% if links[0] is defined or figures[0] is defined %}

Looper project objects

@@ -28,5 +27,4 @@
Links
{{ link[0] }} {% endfor %}
- {% endif %} - \ No newline at end of file + {% endif %} \ No newline at end of file From cf92996b973ec09fd475fd699d08a48694164c7d Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Mon, 12 Aug 2019 11:59:41 -0400 Subject: [PATCH 13/28] switch to bootstrap tables, resolve sticky name col issues --- looper/jinja_templates/index.html | 110 ++++++++++++++++-------------- 1 file changed, 60 insertions(+), 50 deletions(-) diff --git a/looper/jinja_templates/index.html b/looper/jinja_templates/index.html index e90ded69e..9cd77ce1b 100644 --- a/looper/jinja_templates/index.html +++ b/looper/jinja_templates/index.html @@ -2,69 +2,79 @@ {% include "head.html" %} + + + + + + + Looper: {{ project_name }} summary {{ navbar }}
-

Looper {{ project_name }} summary

- Stats summary file +
+

Looper {{ project_name }} summary

+
+
-
- - - - {% for column in columns %} - - {% endfor %} - - - - {% for table_cell_data in table_row_data %} - - {% for values in table_cell_data %} - {% if values is not string %} - - {% else %} - - {% endif %} +
+
+
{{ column }}
- {{ values[1] }} - - {{ values }} -
+ + + {% for column in columns %} + + {% endfor %} + + + + {% for table_cell_data in table_row_data %} + + {% for values in table_cell_data %} + {% if values is not string %} + + {% else %} + + {% endif %} + {% endfor %} + {% endfor %} - - {% endfor %} - -
{{ column }}
+ {{ values[1] }} + + {{ values }} +
-
- -
- -
- -
-
- -
-
-

Plot a column

+ + +
+
+
+
+
+
+
+

Plot a column

+
+
+
    +
+
+
-
-
    -
+
+
+
-
-
- -
+
+ {{ project_objects }}
-
- {{ project_objects }} -
+

From bb079de9cf3f08449c7cefc137857c4044e789a0 Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Mon, 12 Aug 2019 12:52:06 -0400 Subject: [PATCH 14/28] remove unused DataTable code, text layout in the table --- looper/jinja_templates/footer_index.html | 63 ------------------------ looper/jinja_templates/index.html | 4 +- 2 files changed, 2 insertions(+), 65 deletions(-) diff --git a/looper/jinja_templates/footer_index.html b/looper/jinja_templates/footer_index.html index b63c6aca1..7aaf87a2b 100644 --- a/looper/jinja_templates/footer_index.html +++ b/looper/jinja_templates/footer_index.html @@ -14,69 +14,6 @@ - \ No newline at end of file diff --git a/looper/jinja_templates/index.html b/looper/jinja_templates/index.html index 478dc72a3..ffd0f4c56 100644 --- a/looper/jinja_templates/index.html +++ b/looper/jinja_templates/index.html @@ -2,7 +2,6 @@ {% include "head.html" %} - diff --git a/looper/jinja_templates/status_table.html b/looper/jinja_templates/status_table.html index 7554fe3c1..88e2d0192 100644 --- a/looper/jinja_templates/status_table.html +++ b/looper/jinja_templates/status_table.html @@ -1,15 +1,15 @@
- - +
+ - - + + {% if not basic %} - - - + + + {% endif %} @@ -40,23 +40,15 @@ {% endfor %} -
Sample nameStatusSample nameStatusLog fileRuntimePeak memory useLog fileRuntimePeak memory use
- - - - - - + + + + + + + \ No newline at end of file diff --git a/looper/jinja_templates/status_table_no_links.html b/looper/jinja_templates/status_table_no_links.html index 22f0cf641..6db3d9724 100644 --- a/looper/jinja_templates/status_table_no_links.html +++ b/looper/jinja_templates/status_table_no_links.html @@ -1,51 +1,55 @@ -
-
-
- - +
+
+
+ + + + + + + + + + {% for element in sample_link_names %} + {% set i = loop.index - 1 %} - - - - + + + + - - - {% for element in sample_link_names %} - {% set i = loop.index - 1 %} - - - - - - - {% endfor %} - - -
Sample nameStatusRuntimePeak memory use
Sample nameStatusRuntimePeak memory use + {{ sample_link_names[i] }} + + {{ flags[i] }} + + {{ times[i] }} + + {{ mems[i] }} +
- {{ sample_link_names[i] }} - - {{ flags[i] }} - - {{ times[i] }} - - {{ mems[i] }} -
-
-
+ {% endfor %} + + +
- - - - - - +
+ + + + + + + + \ No newline at end of file From 4e1ac46f15b109eee9c6caeebb084f28e4afeb7f Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Mon, 12 Aug 2019 14:40:27 -0400 Subject: [PATCH 16/28] update changelog --- docs/changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.md b/docs/changelog.md index 8afc910fe..b46344894 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [0.12.5] -- unreleased ### Changed - reduce verbosity of missing options; [Issue 174](https://github.com/pepkit/looper/issues/174) +- switch to [Bootstrap Table](https://bootstrap-table.com/) in the summary index page table and sampe status tables ### Fixed From 725043486ef0072d738b933eb1b2f17be98afd9b Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Mon, 12 Aug 2019 14:41:40 -0400 Subject: [PATCH 17/28] fix typo --- docs/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index b46344894..a8feb15e8 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -5,7 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [0.12.5] -- unreleased ### Changed - reduce verbosity of missing options; [Issue 174](https://github.com/pepkit/looper/issues/174) -- switch to [Bootstrap Table](https://bootstrap-table.com/) in the summary index page table and sampe status tables +- switch to [Bootstrap Table](https://bootstrap-table.com/) in the summary index page table and sample status tables ### Fixed From d196a7c83e35a658c8c76186fc5d3e0bb11c07e1 Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Mon, 12 Aug 2019 15:04:45 -0400 Subject: [PATCH 18/28] organize jquery imports --- looper/jinja_templates/head.html | 6 ++---- looper/jinja_templates/index.html | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/looper/jinja_templates/head.html b/looper/jinja_templates/head.html index 97ff105f9..b5c2c078f 100644 --- a/looper/jinja_templates/head.html +++ b/looper/jinja_templates/head.html @@ -17,12 +17,10 @@ --> - + + - - - {{ navbar }} @@ -21,11 +34,11 @@

Looper {{ project_name }} summary
- +
{% for column in columns %} - + {% endfor %} @@ -38,8 +51,8 @@

Looper {{ project_name }} summary{{ values[1] }} {% else %} -

{% endif %} {% endfor %} From 980e44704ac2378fb20c8a1f8f8ca014b02e83c8 Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Wed, 14 Aug 2019 11:07:36 -0400 Subject: [PATCH 21/28] use jinja to trucate text --- looper/jinja_templates/index.html | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/looper/jinja_templates/index.html b/looper/jinja_templates/index.html index 67e0fed47..fbcc20fac 100644 --- a/looper/jinja_templates/index.html +++ b/looper/jinja_templates/index.html @@ -8,18 +8,6 @@ Looper: {{ project_name }} summary - {{ navbar }} @@ -38,7 +26,7 @@

Looper {{ project_name }} summary

{% for column in columns %} - + {% endfor %} @@ -47,13 +35,11 @@

Looper {{ project_name }} summary {% for values in table_cell_data %} {% if values is not string %} -

{% else %} - + {% endif %} {% endfor %} From ef636e5864465d8bd1205df0aee06d7e59360ddd Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Wed, 14 Aug 2019 11:31:29 -0400 Subject: [PATCH 22/28] less padding in table rows --- looper/jinja_templates/index.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/looper/jinja_templates/index.html b/looper/jinja_templates/index.html index fbcc20fac..3ed0780ca 100644 --- a/looper/jinja_templates/index.html +++ b/looper/jinja_templates/index.html @@ -1,13 +1,18 @@ - + {% include "head.html" %} + - Looper: {{ project_name }} summary + {{ navbar }} From 48fc8caef6efcd764417fda973bd6996774bd0f2 Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Wed, 14 Aug 2019 13:23:02 -0400 Subject: [PATCH 23/28] style dropdown toggle under the table --- looper/jinja_templates/status_table_no_links.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/looper/jinja_templates/status_table_no_links.html b/looper/jinja_templates/status_table_no_links.html index 219e90a3c..ab5fc8f53 100644 --- a/looper/jinja_templates/status_table_no_links.html +++ b/looper/jinja_templates/status_table_no_links.html @@ -1,5 +1,5 @@
-
{{ column }}{{ column }}
- {{ values }} + + {{ values }}
{{ column }}{{ column }}
+ {{ values[1] }} - {{ values }} - {{ values|truncate(60,True) }}
+
@@ -43,11 +43,16 @@ .float-right.search.btn-group { margin-top: 0px !important; } + .btn-secondary.dropdown-toggle { + font-size: 0.6rem !important; + padding: 0.25rem !important; + } + .page-list { + padding-right: 10px !important; + } - - - \ No newline at end of file + \ No newline at end of file From eac2ded755f2c714b4bf8be136f1d1966268be27 Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Wed, 14 Aug 2019 17:10:35 -0400 Subject: [PATCH 24/28] temp fix for the obscured horizontal scrollbar in the index table --- looper/jinja_templates/index.html | 198 +++++++++++++++++++++++++++++- 1 file changed, 194 insertions(+), 4 deletions(-) diff --git a/looper/jinja_templates/index.html b/looper/jinja_templates/index.html index 3ed0780ca..6831916f6 100644 --- a/looper/jinja_templates/index.html +++ b/looper/jinja_templates/index.html @@ -1,12 +1,202 @@ - + {% include "head.html" %} - - - + + + + Looper: {{ project_name }} summary {{ navbar }} @@ -234,7 +243,11 @@

Looper {{ project_name }} summary{{ values[1] }} {% else %} -

+ {% if values|length > 60 %} + + {% else %} + + {% endif %} {% endif %} {% endfor %} From 5b36da778255f3ed6f318273575bb9dae7f2b650 Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Thu, 12 Sep 2019 15:39:19 -0400 Subject: [PATCH 26/28] future switch to VersionInHelpParser from ubiquerg --- looper/__init__.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/looper/__init__.py b/looper/__init__.py index 4c6ef093a..a47d29286 100644 --- a/looper/__init__.py +++ b/looper/__init__.py @@ -16,6 +16,8 @@ from ._version import __version__ from .parser_types import * +# TODO: uncomment after ubiquerg release: https://github.com/pepkit/ubiquerg/pull/19 +# from ubiquerg import VersionInHelpParser from divvy import DEFAULT_COMPUTE_RESOURCES_NAME, NEW_COMPUTE_KEY as COMPUTE_KEY # Not used here, but make this the main import interface between peppy and # looper, so that other modules within this package need not worry about @@ -55,7 +57,7 @@ def __init__(self, option_strings, dest, type, default, required=False, help=Non option_strings=option_strings, dest=dest, nargs=0, - const=not(default), + const=not default, default=default, type=type, required=required, @@ -74,13 +76,12 @@ def build_parser(): # Main looper program help text messages banner = "%(prog)s - Loop through samples and submit pipelines." - additional_description = "For subcommand-specific options, type: " \ - "'%(prog)s -h'" + additional_description = "For subcommand-specific options, type: '%(prog)s -h'" additional_description += "\nhttps://github.com/pepkit/looper" - parser = _VersionInHelpParser( - description=banner, - epilog=additional_description) + # TODO: uncomment after ubiquerg release: https://github.com/pepkit/ubiquerg/pull/19 and remove add_argument below + # parser = VersionInHelpParser(description=banner, epilog=additional_description, version=__version__) + parser = _VersionInHelpParser(description=banner, epilog=additional_description) parser.add_argument( "-V", "--version", From 9e72dd7f2e584703835209e04d493a2a1987b554 Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Tue, 17 Sep 2019 16:35:29 -0400 Subject: [PATCH 27/28] use VersionInHelpParser from ubiquerg --- looper/__init__.py | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/looper/__init__.py b/looper/__init__.py index a47d29286..69beacfdc 100644 --- a/looper/__init__.py +++ b/looper/__init__.py @@ -16,8 +16,7 @@ from ._version import __version__ from .parser_types import * -# TODO: uncomment after ubiquerg release: https://github.com/pepkit/ubiquerg/pull/19 -# from ubiquerg import VersionInHelpParser +from ubiquerg import VersionInHelpParser from divvy import DEFAULT_COMPUTE_RESOURCES_NAME, NEW_COMPUTE_KEY as COMPUTE_KEY # Not used here, but make this the main import interface between peppy and # looper, so that other modules within this package need not worry about @@ -39,13 +38,6 @@ logging.INFO, logging.DEBUG] -class _VersionInHelpParser(argparse.ArgumentParser): - def format_help(self): - """ Add version information to help text. """ - return "version: {}\n".format(__version__) + \ - super(_VersionInHelpParser, self).format_help() - - class _StoreBoolActionType(argparse.Action): """ Enables the storage of a boolean const and custom type definition needed for systematic html interface generation. @@ -79,14 +71,7 @@ def build_parser(): additional_description = "For subcommand-specific options, type: '%(prog)s -h'" additional_description += "\nhttps://github.com/pepkit/looper" - # TODO: uncomment after ubiquerg release: https://github.com/pepkit/ubiquerg/pull/19 and remove add_argument below - # parser = VersionInHelpParser(description=banner, epilog=additional_description, version=__version__) - parser = _VersionInHelpParser(description=banner, epilog=additional_description) - - parser.add_argument( - "-V", "--version", - action="version", - version="%(prog)s {v}".format(v=__version__)) + parser = VersionInHelpParser(description=banner, epilog=additional_description, version=__version__) # Logging control parser.add_argument( From 3d2a3fa7d73c9f23f711fc372e1f9b8233389c02 Mon Sep 17 00:00:00 2001 From: Michal Stolarczyk Date: Fri, 13 Dec 2019 13:57:03 -0500 Subject: [PATCH 28/28] add release date --- docs/changelog.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index a8feb15e8..92d85ff2c 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,13 +2,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format. -## [0.12.5] -- unreleased +## [0.12.5] -- 2019-12-13 ### Changed - reduce verbosity of missing options; [Issue 174](https://github.com/pepkit/looper/issues/174) - switch to [Bootstrap Table](https://bootstrap-table.com/) in the summary index page table and sample status tables -### Fixed - ## [0.12.4] -- 2019-07-18 ### Added - Ability to declare `required_executables` in a `PipelineInterface`, to trigger a naive "runnability" check for a sample submission
Sample name {{ values|truncate(60,True) }}{{ values|truncate(60,True) }} {{ values }}