profile
viewpoint
Bruno P. Kinoshita kinow Auckland, New Zealand https://kinoshita.eti.br From Casa Verde, São Paulo . Now in CBD, Auckland .

jenkinsci/testlink-plugin 44

Jenkins testlink plugin

jenkinsci/nunit-plugin 40

Jenkins nunit plugin

jenkinsci/tap-plugin 24

Jenkins TAP Plug-in

imoutsatsos/uno-choice-plugin 9

a.k.a. Active-Choices: A Jenkins dynamic parameter/UI plugin for highly interactive Jenkins build forms

jenkinsci/ccm-plugin 4

Jenkins ccm plugin

darkrift/selenium-plugin 3

Jenkins selenium plugin

kinow/aboriginal-flag-cv-model 1

A tutorial and trained model that can identify Aboriginal flags in images using PyTorch and Detecto

kinow/angularjs-typeahead-dropdown 1

AngularJS Typeahead Dropdown

push eventkinow/wdl-cwl-translator

Bruno P. Kinoshita

commit sha 18f9b2eed724fc8db912f71d0daeeb321e0461b5

Separate conversion and serialization, print to stdout by default

view details

Bruno P. Kinoshita

commit sha 75d2a97fb0c3639aac812f5bda2f29a65812f10b

Make wdl-cwl-translator script accessible in PATH

view details

Bruno P. Kinoshita

commit sha f289f0c26baf595c49357de00d5f9f1d369cefbb

Ignore files generated when running make and tox

view details

push time in an hour

pull request commentcommon-workflow-lab/wdl-cwl-translator

Use a convert function like the former main file

Fixing CI...

kinow

comment created time in an hour

Pull request review commentcommon-workflow-lab/wdl-cwl-translator

Use a convert function like the former main file

 )  -class Converter:-    """Object that handles WDL Workflows and task conversion to CWL."""+def convert(doc: str) -> cwl.CommandLineTool:

@mr-c this function was doing the conversion and handling serialization too. So I would have to pass the output parameter to choose between stdout or file output... I thought it simpler to make it do just the conversion (as per its own name) and leave the serialization up to the user. Now it returns a CWL object.

kinow

comment created time in an hour

Pull request review commentcommon-workflow-lab/wdl-cwl-translator

Use a convert function like the former main file

 include_trailing_comma = True force_grid_wrap = 0 use_parentheses = True line_length = 88++[options.entry_points]+console_scripts=+    wdl-cwl-translator = wdl2cwl.main_oop:main

I thought it would be useful to have the command in the $PATH of the virtual environment to test workflows? I was calling the main_oop directly or editing tests. But I think ultimately we want to give a tool to users? WDYT @mr-c ?

kinow

comment created time in an hour

PullRequestReviewEvent
PullRequestReviewEvent

push eventkinow/wdl-cwl-translator

Bruno P. Kinoshita

commit sha 34030979751e61ddefcbbc24b0f20037489c17a9

Separate conversion and serialization, print to stdout by default

view details

Bruno P. Kinoshita

commit sha 89529b5b6c33914033ed05e842582879a5d3c6a7

Make wdl-cwl-translator script accessible in PATH

view details

push time in an hour

push eventkinow/wdl-cwl-translator

Bruno P. Kinoshita

commit sha a4a4e014d194ee7a68164ece43e88cf2f715eb5b

Separate conversion and serialization, print to stdout by default

view details

push time in an hour

push eventkinow/wdl-cwl-translator

Michael R. Crusoe

commit sha 0180c2a3afb7170c3d27d321e9a47bbb31f1e727

Use cache results to speed up cwltest{,_big}

view details

Bruno P. Kinoshita

commit sha 71374e668a6b0a139262fbe594d3f9380c2a3fb1

Use a convert function like the former main file

view details

Bruno P. Kinoshita

commit sha 665079e62ac283cdd8a22abbfd294dfdbbad82c7

Separate conversion and serialization, print to stdout by default

view details

push time in an hour

PullRequestReviewEvent

push eventkinow/kinoshita.eti.br

kinow

commit sha 13b36a0ccb3e7264897c9c44a3869872ec67f506

deploy: e655a251a8b2e82697ef6fa4a4d096519a059fc4

view details

push time in 4 hours

push eventkinow/kinoshita.eti.br

Bruno P. Kinoshita

commit sha e655a251a8b2e82697ef6fa4a4d096519a059fc4

Update books.yml

view details

push time in 4 hours

push eventkinow/kinoshita.eti.br

kinow

commit sha 72b27e95b52609718ff73fcc04362104bcafcb30

deploy: 20fb9a5688e36d698996fa9521ceccc6afe68d53

view details

push time in 7 hours

push eventkinow/kinoshita.eti.br

Bruno P. Kinoshita

commit sha 20fb9a5688e36d698996fa9521ceccc6afe68d53

Update short-stories.yml

view details

push time in 7 hours

startedmatplotlib/ipympl

started time in 9 hours

PullRequestReviewEvent

startedwonderworks-software/PyFlow

started time in a day

issue commentcommon-workflow-lab/wdl-cwl-translator

Make sure no runtime errors if we have more than one `$(` in the WDL command

Thanks @mr-c ! Closed IDE and ran out of :coffee: power for the day. Will try to understand what's being replaced there, and whether the issue can happen or not (was going to use the label "bug?" because I didn't have time to confirm this bug).

kinow

comment created time in a day

startedrabix/cwl-format

started time in a day

issue openedrabix/cwl-format

Avoid JS engine use in string concatenation if possible

From https://github.com/common-workflow-lab/wdl-cwl-translator/issues/127

Whenever something like the following appears: glob: $(inputs.outputVcf + ".tbi") cwl-format could replace it by glob: $(inputs.outputVcf).tbi

created time in a day

issue openedcommon-workflow-lab/wdl-cwl-translator

Make sure no runtime errors if we have more than one `$(` in the WDL command

While reviewing the code today, part of #126 , I noted this line: https://github.com/common-workflow-lab/wdl-cwl-translator/blob/main/wdl2cwl/main_oop.py#L578

It doesn't handle if you have more than $( in the string. Looking at the spec, it doesn't say anything about how many $( we can have in a WDL command string. But this workflow has multiple: https://github.com/broadinstitute/viral-pipelines/blob/fa070138543df3b6353a17e1821419eb5bd6e87c/pipes/WDL/tasks/tasks_nextstrain.wdl#L486-L499

created time in a day

push eventkinow/wdl-cwl-translator

Bruno P. Kinoshita

commit sha 4cdb7d07dc2df61ed2214f4b8bd7c6c687ed9bab

WIP

view details

push time in a day

Pull request review commentcommon-workflow-lab/wdl-cwl-translator

Use a convert function like the former main file

 def main() -> None:     # write to a file in oop_cwl_files     if args.output:         with open(args.output, "w") as result:-            result.write(str(Converter.load_wdl_tree(args.workflow)))+            result.write(convert(args.workflow))

I had noticed this in the previous main.py too. Good opportunity to fix that. Should we make he -o mandatory, or by default print to stdout?

kinow

comment created time in a day

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentcommon-workflow-lab/wdl-cwl-translator

complete the adoptation of main.py

 def get_file(path: str) -> str:     "wdl_path,cwl_path",     [         ("wdl_files/bowtie_1.wdl", "oop_cwl_files/bowtie_1.cwl"),+        ("wdl_files/bowtie_2.wdl", "oop_cwl_files/bowtie_2.cwl"),+        ("wdl_files/bowtie_3.wdl", "oop_cwl_files/bowtie_3.cwl"),         ("wdl_files/bcftools_stats.wdl", "oop_cwl_files/bcftools_stats.cwl"),         ("wdl_files/bcftools_annotate.wdl", "oop_cwl_files/bcftools_annotate.cwl"),         ("wdl_files/validateOptimus_1.wdl", "oop_cwl_files/validateOptimus_1.cwl"),         ("wdl_files/validateOptimus_2.wdl", "oop_cwl_files/validateOptimus_2.cwl"),         ("wdl_files/validateOptimus_3.wdl", "oop_cwl_files/validateOptimus_3.cwl"),         ("wdl_files/validateOptimus_4.wdl", "oop_cwl_files/validateOptimus_4.cwl"),         ("wdl_files/validateOptimus_5.wdl", "oop_cwl_files/validateOptimus_5.cwl"),+        ("wdl_files/deepvariant.wdl", "oop_cwl_files/deepvariant.cwl"),+        ("wdl_files/gatk_1.wdl", "oop_cwl_files/gatk_1.cwl"),+        ("wdl_files/hisat2_1.wdl", "oop_cwl_files/hisat2_1.cwl"),+        ("wdl_files/hisat2_2.wdl", "oop_cwl_files/hisat2_2.cwl"),+        ("wdl_files/isoseq3.wdl", "oop_cwl_files/isoseq3.cwl"),+        ("wdl_files/minCores.wdl", "oop_cwl_files/minCores.cwl"),+        ("wdl_files/pbmm2.wdl", "oop_cwl_files/pbmm2.cwl"),+        ("wdl_files/rtg_2.wdl", "oop_cwl_files/rtg_2.cwl"),+        ("wdl_files/rtg.wdl", "oop_cwl_files/rtg.cwl"),+        ("wdl_files/seqtk_1.wdl", "oop_cwl_files/seqtk_1.cwl"),+        ("wdl_files/seqtk_2.wdl", "oop_cwl_files/seqtk_2.cwl"),+        ("wdl_files/smoove.wdl", "oop_cwl_files/smoove.cwl"),+        ("wdl_files/transcriptclean_1.wdl", "oop_cwl_files/transcriptclean_1.cwl"),+        ("wdl_files/UmiCorrection.wdl", "oop_cwl_files/UmiCorrection.cwl"),+        ("wdl_files/vardict.wdl", "oop_cwl_files/vardict.cwl"),+        ("wdl_files/vt.wdl", "oop_cwl_files/vt.cwl"),+        ("wdl_files/TrimAdapters.wdl", "oop_cwl_files/TrimAdapters.cwl"),+        (+            "wdl_files/read_string_cornercase.wdl",+            "oop_cwl_files/read_string_cornercase.cwl",+        ),

:train: That's a lot of workflows! Hooray! :tada:

Th3nn3ss

comment created time in a day

Pull request review commentcommon-workflow-lab/wdl-cwl-translator

complete the adoptation of main.py

 def get_literal_name(      def get_expr_string(self, wdl_expr_string: WDL.Expr.String) -> str:         """Translate WDL String Expressions."""+        if wdl_expr_string.literal is not None:+            return f'"{wdl_expr_string.literal.value}"'         string = ""         parts = wdl_expr_string.parts-        is_placeholder_present = False-        for part in parts[:-1]:+        for index, part in enumerate(parts[1:-1], start=1):             if isinstance(                 part,                 (WDL.Expr.Placeholder, WDL.Expr.Apply, WDL.Expr.Get, WDL.Expr.Ident),             ):-                is_placeholder_present = True                 placeholder = self.get_expr(part)-                part = f"' + {placeholder} +'"+                part = (+                    "" if parts[index - 1] == '"' or parts[index - 1] == "'" else "' + "  # type: ignore+                )+                part += placeholder+                part += (+                    "" if parts[index + 1] == '"' or parts[index + 1] == "'" else " + '"  # type: ignore+                )             string += part-        if is_placeholder_present:-            if string[1] == "+":-                string = string[1:]-            if string[-2] == "+":-                string = string[:-2]-        return (-            f'"{wdl_expr_string.literal.value}"'  # type: ignore-            if not is_placeholder_present-            else f"{string}"-        )+        # condition to determin if the openning and closing quotes should be added to string

s/determin/determine s/openning/opening

Th3nn3ss

comment created time in a day

PullRequestReviewEvent
PullRequestReviewEvent

issue commentcommon-workflow-lab/wdl-cwl-translator

New translator must translate WDL's sub as replaceAll

I think this workflow is using it to replace spaces by underscores (for filename): https://github.com/broadinstitute/viral-pipelines/blob/f009d869ddb75770ae0aa69d9dd8bcaf1390502e/pipes/WDL/tasks/tasks_reports.wdl#L367

That workflow has a lot more than what we need, so we can just extract the test case for a string with spaces, then replace space by _, and that's that :+1:

kinow

comment created time in a day

more