-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement automatic tool generation based on the source code of the tool #1263
Conversation
Hi @Kulivox are you aware of https://github.com/hexylena/argparse2tool |
Hi, no, I didn't know such project already exists |
@bernt-matthias I met with @Kulivox @biomonika and discussed a bit how to proceed, what to do with argparse2tool. They discussed their methods, it seems a bit safer/cleaner than my fake argparse method and I'm happy to support this being in planemo, instead of a2t, and instead of attempting to merge the two as I think the two of us are the primary users. So we'll let them co-exist rather than spending the time to try and merge. It would be nice to have a2t's functionality with both cwl + galaxy export, but I think that's not a priority, we can always direct people to use a2t instead if they need that functionality, just means I'll probably do less maintenance of it. @Kulivox's implement is more complete it seems, a2t is missing argparse command groups currently. And TIL planemo has a text tool template inside, maybe that's a use case for our galaxyxml (but maybe that's also not worth the return on investment?) @Kulivox would you be open to handling |
@hexylena Sure, I'll add the type mapping in, and thanks; I think I'll also use the tool examples you provided to create tests |
I'll be doing a final pass over the functionality of autpygen during the next few days, but I don't think I'll be changing much, maybe adding support for some very specific argument types and some cleanup of the output. The PR is IMHO ready for review, I have updated automatically generated docs, but I won't be adding custom docs until the functionality is finalised. Would it be possible for you @bernt-matthias to take a look at this PR? Or should I contact someone else? |
@Kulivox will you be at the EGD in Freiburg next week? |
@bernt-matthias No, unfortunately |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here some first comments. So far I have only checked the test case.
Wondering if https://github.com/hexylena/galaxyxml/ would be of any use. But I guess you already discussed this with @hexylena .
sounds good.
…On 04-10-2022 11:21, M Bernt wrote:
Hey @Kulivox <https://github.com/Kulivox> would you be available for a
VC on Thursday or Friday? I guess the easiest for a review would be if
you could walk us through your code.
Maybe @hexylena <https://github.com/hexylena> and @nsoranzo
<https://github.com/nsoranzo> would like to join?
—
Reply to this email directly, view it on GitHub
<#1263 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADP7O5EPPB7HU5RY55TZ7LWBPZKRANCNFSM57IE7DKQ>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi, I should be available on Friday after 4 pm CET. Does that work for you too? @bernt-matthias @hexylena |
Hi @Kulivox I will be on the train from approx 2pm. So unfortunately, 4pm won't work for me. |
Ah, that is unfortunate. I'll be at work from 7-15 on Friday, so I can't do the call earlier. What about some later date? I should be available anytime during the weekend and after 4pm on weekdays @bernt-matthias |
Hi, @hexylena @nsoranzo, would it be possible to arrange a VC where we take a look at the PR as @bernt-matthias suggested? I should be available any day apart from Tuesday. |
Hi @bernt-matthias , I hope you have had a great time away. If you're up for it, could we please continue the review? Thanks a lot for your help! |
@bernt-matthias I am free on Monday afternoon (16:30 + CET), Tuesday evening (18:00+) and then on any day from 7-9 AM CET and from 16:15-23:59 CET |
Monday afternoon (16:30 + CET) would be cool for me. |
I can make that as well
…On Tue, 8 Nov 2022, 17:18 M Bernt, ***@***.***> wrote:
Monday afternoon (16:30 + CET) would be cool for me.
—
Reply to this email directly, view it on GitHub
<#1263 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADP7O4UDZMRBXRZJOVE5KDWHJ4IXANCNFSM57IE7DKQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@hexylena @bernt-matthias Alright then, I'll set up a meeting starting at 17:00 because I might not be ready at 16:30 (train journey home) |
Wonderful. |
e.g. numbers
of subparser select
Currently testing another tool. If I find some things that might be improved I will add them here: If there is a command line boolean flag: Use it in the command just as Or wouldn't this work for:
? |
This is good to go in my opinion. Not sure about docs: Obviously a good idea, but I don't know where it would fit best and what the extent/form should be. |
Yes, at least a small example would be nice, maybe in writing_standalone.rst ? This is nicely isolated and looking good. |
Thanks for your work @Kulivox! I've pushed a new planemo version to https://pypi.org/project/planemo/0.75.11/ |
Hello,
A few months ago I had to implement a bunch of tool wrappers for an open source toolkit and realised how much time could be saved if there was an option of automatic generation of parts of the wrapper in tool_init. That lead me to develop PyGalGen, my take on the functionality of tool_init. I have shown the tool to @martenson, and he has agreed that migration of the part of the functionality that generates the wrapper file is worthwhile.
This pull request contains the prototype of the functionality. The generator is capable of extracting inputs and generating a command section for tools written in Python3 that use the ArgumentParser module.
There is still some work to be done, mainly in testing and documentation.
Current functionality:
Parser information can be extracted if the following conditions are met:
TODO:
Example input: url
Example output: https://pastebin.com/v9z4ZMAD
Suggestions are welcome!