galaxy icon indicating copy to clipboard operation
galaxy copied to clipboard

Planemo treats discovered collections and manually collections differently

Open astrovsky01 opened this issue 4 years ago • 3 comments

If a discovered_dataset collection is created, planemo tests treat it as a single output, no matter how many items are inside. This is as opposed to manually-created collections, which act as num_outputs + 1 for the collection itself (as they do in the history).

This test will fail right now, because it should be seeing 10 discovered files + 1 collection + 2 manually created files + 1 collection = 14 items out. Instead, it sees 1 discovered collection out + 2 manually created files + 1 collection = 4 items out.

Either both should act as a single out, or both should be num_outputs + 1

astrovsky01 avatar Oct 04 '20 19:10 astrovsky01

It did indeed fail.

    def _verify_outputs(testdef, history, jobs, tool_id, data_list, data_collection_list, galaxy_interactor, quiet=False):
        assert len(jobs) == 1, "Test framework logic error, somehow tool test resulted in more than one job."
        job = jobs[0]
    
        maxseconds = testdef.maxseconds
        if testdef.num_outputs is not None:
            expected = testdef.num_outputs
            actual = len(data_list) + len(data_collection_list)
            if expected != actual:
                message_template = "Incorrect number of outputs - expected %d, found %s."
                message = message_template % (expected, actual)
>               raise Exception(message)
E               Exception: Incorrect number of outputs - expected 14, found 4.

jmchilton avatar Oct 05 '20 20:10 jmchilton

xref https://github.com/galaxyproject/galaxy/pull/7894

jmchilton avatar Oct 05 '20 20:10 jmchilton

@astrovsky01 do you think that we can close this with the docs added in https://github.com/galaxyproject/galaxy/pull/7894 or is still something missing?

bernt-matthias avatar Apr 07 '22 21:04 bernt-matthias

Checked with @astrovsky01; we can close this one out now.

dannon avatar Oct 18 '22 17:10 dannon