From b1361c8e79c829f52c49920c2f74353124f1a00a Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sun, 31 Dec 2023 18:20:43 +0200 Subject: [PATCH] Separate collection and non-collection data element in tool schema. New lxml is more strict when validating the xml schema and fails with ``` lxml.etree.XMLSchemaParseError: complex type 'Output': The content model is not determinist., line 5329 ``` this is because `filter` and `discover_datasets` are present in OutputDataElement and OutputCollectionElement, making ``` ``` not deterministic. In any case this isn't an accurate model of what is allowed and parsed, as you can't use collection-specific discover_datasets options outside of a dataset collection. I **think** that the reason for adding OutputCollectionElement to the sequence is that you can have a `data` element nested in a `collection` element. To continue allowing this and making it more precise I've added an additional `OutputCollectionDataElement` type that is allowed within `collection`. This then should allow us to remove `OutputCollectionElement` from the `OutputData` type. A quick test against IUC and devteam revealed no problem with this approach per se, however it showed that https://github.com/galaxyproject/tools-iuc/blob/aa8360cb3ec9faf1488938a430855977632706ff/tools/krakentools/extract_kraken_reads.xml#L145 uses `change_format` which is not implemented for collections. --- lib/galaxy/tool_util/xsd/galaxy.xsd | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/tool_util/xsd/galaxy.xsd b/lib/galaxy/tool_util/xsd/galaxy.xsd index 01ac39775ac..445dbe1be17 100644 --- a/lib/galaxy/tool_util/xsd/galaxy.xsd +++ b/lib/galaxy/tool_util/xsd/galaxy.xsd @@ -5282,12 +5282,20 @@ on Human (hg18)``. - + + + + + + + + + -