Skip to content
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

[WIP] Tool linting fixes and proper exit_code detection #361

Closed
wants to merge 21 commits into from

Conversation

hexylena
Copy link
Member

I'm linting all of the tools in the tool directory with planemo and identifying and fixing issues. I'm opening this PR very early into the process so I can track some discussion questions.

The primary purpose of the PR is to use #117 throughout so tools don't die on any stderr, as that's really poor behaviour. This is specifically in response to a UserWarning showing up during upload, a warning which causes the job to unnecessarily error.

  • can we nix import.py or replace it with a cp command?
  • removed echo.py
  • there are at least a couple of tools with the same ID
    • ucsc_proxy for ucsc_archaea.xml and ucsc_proxy.xml
    • Grep1 for grep.xml and fileGrep.xml
  • access_libraries.xml? Is this still a thing? It seems like an API call, but no idea if it's even functional.
  • Making use of Implement detect_errors attribute on command of tool XML. #117
  • liftOver_wrapper has disabled test cases. 77b167b
  • Historical behaviour question on this, does format="input" imply format_source="first_input_dataset"?
  • how do we feel about test-data again? Some tools are easy to add tests for (e.g. commWrapper.xml/pl)
  • should joiner2.xml be removed? when joiner.xml exists?
  • command line parameters in maf_* were re-arranged as part of the rewrite to de-duplicate CLI strings.
  • is this intentional?
  • could someone provide documentation for https://github.com/galaxyproject/galaxy/blob/dev/tools/validation/fix_errors.xml ?

Related TODOs

@hexylena hexylena added the wip label Jun 17, 2015
@hexylena hexylena changed the title [WIP] Tool linting fixes Tool linting fixes and proper exit_code detection Jun 17, 2015
@jmchilton
Copy link
Member

I don't know if it would work but I feel like the data source tools should essentially all have citations. The data source tools should assign a tool id to the outputs and those ids will resolve to tools in the toolbox - so I feel like say building a citation list for a history should work for these outputs. At very least I wouldn't add empty citation tags to please planemo thereby making it more likely we would forget to add citations and make them work in the future.

@jmchilton
Copy link
Member

I do like adding help text though - because this will probably come through in the API for instance.

@nsoranzo
Copy link
Member

is this intentional?

I think so, the ' is opened at https://github.com/galaxyproject/galaxy/blob/dev/tools/meme/fimo.xml#L4 .

@hexylena
Copy link
Member Author

@nsoranzo great, thanks. I couldn't seem to see where that was.

@jmchilton absolutely makes sense. Should they cite the "Blankenberg et al. in preparation" or whatever that citation was that got applied to so many tools?

@martenson
Copy link
Member

this is great, especially proper exit code detection is a tremendous improvement


</help>
<citations />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10.1093/bioinformatics/bts286

@hexylena
Copy link
Member Author

@jmchilton amazing, doing my citation lookup work for me, much appreciated!!

@jmchilton
Copy link
Member

No - we are both doing @blankenberg's work for him :) - what do we get out of this.

There are a ton though - so unless you want to track everyone down - I would just eliminate the empty citations blocks and run planemo with that check excluded. We can come back to this some other day. If you are in the mood to track them all down though - I won't complain :).

@hexylena
Copy link
Member Author

Agreed, I'll remove the citation blocks so we can keep generating warnings until that date

(I had hoped that we'd be able to add planemo linting to the travis job, but without citations for everything, without test cases for everything, there's no sense in turning linting on)

@jmchilton
Copy link
Member

I understand the desire to add those checks to travis - though I don't think we will be modifying these tools frequently so it is probably better to spend our Travis time on something like including some integration testing or API tests.

@hexylena
Copy link
Member Author

Eh, fair point. I just want to test ALL the things :P

@jmchilton
Copy link
Member

Historical behaviour question on this, does format="input" imply format_source="first_input_dataset"?

If I recall correctly, I actually think format="input" implies format_source="random_input_dataset" - since this stuff is set by iterating over dict and just keeping the variable set to the last element encountered. This is why planemo discourages it.

@hexylena
Copy link
Member Author

Gotcha, that was the assumption I was working under. Thanks for the confirmation.

I replaced a lot of format and format_source with fixed datatypes, because most of the time that was used, the input was hardcoded to tabular.

@jmchilton
Copy link
Member

I want to test all the things also - but IMO travis is only a place to test the most usefully and quickly tested things.

@hexylena
Copy link
Member Author

Yep, fair enough. Wish travis had a better concept of "what's changed since last time", and it didn't require ugly hacks in Jenkins to do those sort of tests.

@jmchilton
Copy link
Member

how do we feel about test-data again? Some tools are easy to add tests for (e.g. commWrapper.xml/pl)

Would love to see a tests added - just commit the test-data to https://github.com/galaxyproject/galaxy-test-data instead of here. It will be fetched dynamically as needed by the test framework.

@jmchilton
Copy link
Member

I replaced a lot of format and format_source with fixed datatypes, because most of the time that was used, the input was hardcoded to tabular.

That is probably a mistake - many tabular tools when operating a bed file for instance should produce another bed file. The inputs are polymorphic - and so the output datatypes should be inherited instead of hardcoded.

@hexylena
Copy link
Member Author

.... eww. That's...wow, okay. I didn't remember that bed datatypes subclassed tabular and could be accepted as inputs there. The rest of the format tree is so flat...

@hexylena
Copy link
Member Author

Note to self from #524:

Note separately that if the first dataset is considered as a bed file, then the output file is also considered bed, and this appears to wrongly mark column c6 (description) as strand.

So whenever I go back to refactor the datatypes I mistakenly hardcoded to tabular, there are cases when format_source isn't appropriate.

@hexylena hexylena added the wip label Aug 19, 2015
@hexylena hexylena changed the title Tool linting fixes and proper exit_code detection [WIP] Tool linting fixes and proper exit_code detection Aug 25, 2015
@jmchilton
Copy link
Member

New oldest PR, I'm thinking i going to try to unwind into smaller PRs and then convert what is left into an issue - is that okay @erasche or were you super eager to return to this mega effort?

@jmchilton
Copy link
Member

xref #846

@hexylena
Copy link
Member Author

hexylena commented Oct 5, 2015

@jmchilton you are absolutely welcome to. I may likewise try and find time to unwind a task or two out of this. Thanks for reviving this zombie :)

jmchilton added a commit to jmchilton/galaxy that referenced this pull request Oct 5, 2015
@jmchilton
Copy link
Member

Okay - I have transitioned all my DOI comments into PRs. Maybe it would be best to just remove all the empty citations blocks in this PR.

@hexylena
Copy link
Member Author

hexylena commented Oct 5, 2015

@jmchilton it may be best to just kill this PR and use the smaller ones you've been opening. This PR did a couple things very wrong (i.e. removing format_from statements)

@jmchilton
Copy link
Member

@erasche - there is good stuff in there, but yeah I agree lets just kill it for now and try to pull out the good stuff in small doses going forward.

@jmchilton jmchilton closed this Oct 6, 2015
@hexylena hexylena deleted the tool-linting branch August 21, 2017 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants