Skip to content

Commit

Permalink
Fix HDF5 test assert docs
Browse files Browse the repository at this point in the history
Alternative to #7382, fix documentation without giving up better validation one gets with actual types for assertion XML elements.
  • Loading branch information
jmchilton committed Feb 18, 2019
1 parent b67dc2b commit 2033535
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 5 additions & 1 deletion doc/parse_gx_xsd.py
Expand Up @@ -83,7 +83,11 @@ def _build_tag(tag, hide_attributes):
assertions_buffer.write("--- | ---\n")
elements = assertion_tag.findall("{http://www.w3.org/2001/XMLSchema}choice/{http://www.w3.org/2001/XMLSchema}element")
for element in elements:
doc = _doc_or_none(element).strip()
doc = _doc_or_none(element)
if doc is None:
doc = _doc_or_none(_type_el(element))
assert doc is not None, "Documentation for %s is empty" % element.attrib["name"]
doc = doc.strip()
assertions_buffer.write("``%s`` | %s\n" % (element.attrib["name"], doc))
text = text.replace(line, assertions_buffer.getvalue())
tag_help.write(text)
Expand Down
10 changes: 5 additions & 5 deletions lib/galaxy/tools/xsd/galaxy.xsd
Expand Up @@ -1243,7 +1243,7 @@ $assertions
### Examples
The following demonstrtes a wide variety of text-based and tabular
The following demonstrates a wide variety of text-based and tabular
assertion statements.
```xml
Expand All @@ -1260,7 +1260,7 @@ assertion statements.
</output>
```
The following demonstrtes a wide variety of XML assertion statements.
The following demonstrates a wide variety of XML assertion statements.
```xml
<output name="out_file1">
Expand All @@ -1278,7 +1278,7 @@ The following demonstrtes a wide variety of XML assertion statements.
</output>
```
The following demonstrtes verifying XML content with XPath-like expressions.
The following demonstrates verifying XML content with XPath-like expressions.
```xml
<output name="out_file1">
Expand Down Expand Up @@ -1584,8 +1584,8 @@ module.
<xs:element name="has_text_matching" type="xs:anyType">
<xs:annotation>
<xs:documentation><![CDATA[Asserts text matching the specified regular expression (``expression``) appears in the output (e.g. ``<has_text_matching expression="1274\d+53" />`` ).]]>
</xs:documentation>
</xs:annotation>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="has_line" type="xs:anyType">
<xs:annotation>
Expand Down

0 comments on commit 2033535

Please sign in to comment.