From acfbde61d2724ae38c47edeeb00f04e8a6064bb9 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Thu, 5 Sep 2024 17:00:08 -0400 Subject: [PATCH] Re-generate galaxy.xsd with assertion parameters. --- lib/galaxy/tool_util/xsd/galaxy.xsd | 981 ++++++++++++++++++++++++++++ 1 file changed, 981 insertions(+) diff --git a/lib/galaxy/tool_util/xsd/galaxy.xsd b/lib/galaxy/tool_util/xsd/galaxy.xsd index a3c9d00afd9a..c13550ff807a 100644 --- a/lib/galaxy/tool_util/xsd/galaxy.xsd +++ b/lib/galaxy/tool_util/xsd/galaxy.xsd @@ -2171,6 +2171,987 @@ module. An individual test assertion definition. + + + Asserts the specified output contains the line specified by the + argument line. The exact number of occurrences can be optionally + specified by the argument n + + + + + The full line of text to search for in the output. + + + + + Desired number, can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Allowed difference with respect to n (default: 0), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Minimum number (default: -infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Maximum number (default: infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Asserts the specified output contains a line matching the + regular expression specified by the argument expression. If n is given + the assertion checks for exactly n occurences. + + + + + The regular expressions to attempt match in the output. + + + + + Desired number, can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Allowed difference with respect to n (default: 0), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Minimum number (default: -infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Maximum number (default: infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Asserts the specified output contains ``n`` lines allowing + for a difference in the number of lines (delta) + or relative differebce in the number of lines + + + + + Desired number, can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Allowed difference with respect to n (default: 0), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Minimum number (default: -infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Maximum number (default: infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Asserts specified output contains the substring specified by + the argument text. The exact number of occurrences can be + optionally specified by the argument n + + + + + The text to search for in the output. + + + + + Desired number, can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Allowed difference with respect to n (default: 0), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Minimum number (default: -infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Maximum number (default: infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Asserts the specified output contains text matching the + regular expression specified by the argument expression. + If n is given the assertion checks for exacly n (nonoverlapping) + occurences. + + + + + + The regular expressions to attempt match in the output. + + + + + Desired number, can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Allowed difference with respect to n (default: 0), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Minimum number (default: -infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Maximum number (default: infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Asserts specified output does not contain the substring + specified by the argument text + + + + + The text to search for in the output. + + + + + + + Asserts tabular output contains the specified +number (``n``) of columns. + +For instance, ``<has_n_columns n="3"/>``. The assertion tests only the first line. +Number of columns can optionally also be specified with ``delta``. Alternatively the +range of expected occurences can be specified by ``min`` and/or ``max``. + +Optionally a column separator (``sep``, default is `` ``) `and comment character(s) +can be specified (``comment``, default is empty string). The first non-comment +line is used for determining the number of columns. + + + + + + Desired number, can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Allowed difference with respect to n (default: 0), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Minimum number (default: -infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Maximum number (default: infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Separator defining columns, default: tab + + + + + Comment character(s) used to skip comment lines (which should not be used for counting columns) + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Asserts the specified attribute of the first element matching + the specified path matches exactly the specified text. + + + + + The Python xpath-like expression to find the target element. + + + + + The XML attribute name to test against from the target XML element. + + + + + The expected attribute value to test against on the target XML element + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Asserts the specified attribute of the first element matching + the specified path matches the specified regular expression. + + + + + The Python xpath-like expression to find the target element. + + + + + The XML attribute name to test against from the target XML element. + + + + + The regular expressions to apply against the named attribute on the target XML element. + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Recursively checks the specified assertions against the text of + the first element matching the specified path. + + + + + + + + The Python xpath-like expression to find the target element. + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Asserts the text of the first element matching the specified + path matches exactly the specified text. + + + + + The Python xpath-like expression to find the target element. + + + + + The expected element text (body of the XML tag) to test against on the target XML element + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Asserts the text of the first element matching the specified + path matches the specified regular expression. + + + + + The Python xpath-like expression to find the target element. + + + + + The regular expressions to apply against the target element. + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Asserts the specified output has at least one XML element with a + path matching the specified path argument. Valid paths are the + simplified subsets of XPath implemented by lxml.etree; + https://lxml.de/xpathxslt.html for more information. + + + + + The Python xpath-like expression to find the target element. + + + + + + + + + + + + Asserts the specified output has exactly n elements matching the + path specified. + + + + + The Python xpath-like expression to find the target element. + + + + + Desired number, can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Allowed difference with respect to n (default: 0), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Minimum number (default: -infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Maximum number (default: infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Simple assertion that just verifies the specified output + is valid XML. + + + + + + + Check if path occurs in the xml. If n and delta or min and max are given + also the number of occurences is checked. + If there are any sub assertions then check them against + - the element's text if attribute is None + - the content of the attribute + If all is True then the sub assertions are checked for all occurences. + + + + + + + + + The Python xpath-like expression to find the target element. + + + + + + + + + + + + + + + Desired number, can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Allowed difference with respect to n (default: 0), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Minimum number (default: -infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Maximum number (default: infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Asserts the JSON document contains a property or key with the specified text (i.e. string) value. + +```xml +<has_json_property_with_text property="color" text="red" /> +``` + + + + + + The property name to search the JSON document for. + + + + + The expected text value of the target JSON attribute. + + + + + + + Asserts the JSON document contains a property or key with the specified JSON value. + +```xml +<has_json_property_with_value property="skipped_columns" value="[1, 3, 5]" /> +``` + + + + + + The property name to search the JSON document for. + + + + + The expected JSON value of the target JSON attribute (as a JSON encoded string). + + + + + + + Asserts HDF5 output contains the specified ``value`` for an attribute (``key``), e.g. + + ```xml + <has_h5_attribute key="nchroms" value="15" /> + ``` + + + + + + HDF5 attribute to check value of. + + + + + Expected value of HDF5 attribute to check. + + + + + + + Asserts the specified HDF5 output has the given keys. + + + + + HDF5 attributes to check value of as a comma-separated string. + + + + + + + This tag allows to check if ``path`` is contained in a compressed file. + + The path is a regular expression that is matched against the full paths of the objects in + the compressed file (remember that "matching" means it is checked if a prefix of + the full path of an archive member is described by the regular expression). + Valid archive formats include ``.zip``, ``.tar``, and ``.tar.gz``. Note that + depending on the archive creation method: + + - full paths of the members may be prefixed with ``./`` + - directories may be treated as empty files + + ```xml + <has_archive_member path="./path/to/my-file.txt"/> + ``` + + With ``n`` and ``delta`` (or ``min`` and ``max``) assertions on the number of + archive members matching ``path`` can be expressed. The following could be used, + e.g., to assert an archive containing n&plusmn;1 elements out of which at least + 4 need to have a ``txt`` extension. + + ```xml + <has_archive_member path=".*" n="10" delta="1"/> + <has_archive_member path=".*\.txt" min="4"/> + ``` + + In addition the tag can contain additional assertions as child elements about + the first member in the archive matching the regular expression ``path``. For + instance + + ```xml + <has_archive_member path=".*/my-file.txt"> + <not_has_text text="EDK72998.1"/> + </has_archive_member> + ``` + + If the ``all`` attribute is set to ``true`` then all archive members are subject + to the assertions. Note that, archive members matching the ``path`` are sorted + alphabetically. + + The ``negate`` attribute of the ``has_archive_member`` assertion only affects + the asserts on the presence and number of matching archive members, but not any + sub-assertions (which can offer the ``negate`` attribute on their own). The + check if the file is an archive at all, which is also done by the function, is + not affected. + + + + + + + + The regular expression specifying the archive member. + + + + + Check the sub-assertions for all paths matching the path. Default: false, i.e. only the first + + + + + Desired number, can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Allowed difference with respect to n (default: 0), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Minimum number (default: -infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Maximum number (default: infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Asserts the specified output has a size of the specified value + +Attributes size and value or synonyms though value is considered deprecated. +The size optionally allows for absolute (``delta``) difference. + + + + + + Deprecated alias for `size` + + + + + Desired size of the output (in bytes), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Allowed difference with respect to n (default: 0), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Minimum number (default: -infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Maximum number (default: infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Asserts the specified output is an image and has the specified center of mass. + + Asserts the output is an image and has a specific center of mass, + or has an Euclidean distance of ``eps`` or less to that point (e.g., + ``<has_image_center_of_mass center_of_mass="511.07, 223.34" />``). + + + + + + The required center of mass of the image intensities (horizontal and vertical coordinate, separated by a comma). + + + + + Restricts the assertion to a specific channel of the image (where ``0`` corresponds to the first image channel). + + + + + The maximum allowed Euclidean distance to the required center of mass (defaults to ``0.01``). + + + + + + + Asserts the output is an image and has a specific number of channels. + +The number of channels is plus/minus ``delta`` (e.g., ``<has_image_channels channels="3" />``). + +Alternatively the range of the expected number of channels can be specified by ``min`` and/or ``max``. + + + + + + Expected number of channels of the image. + + + + + Maximum allowed difference of the number of channels (default is 0). The observed number of channels has to be in the range ``value +- delta``. + + + + + Minimum allowed number of channels. + + + + + Maximum allowed number of channels. + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Asserts the output is an image and has a specific height (in pixels). + + The height is plus/minus ``delta`` (e.g., ``<has_image_height height="512" delta="2" />``). + Alternatively the range of the expected height can be specified by ``min`` and/or ``max``. + + + + + + Expected height of the image (in pixels). + + + + + Maximum allowed difference of the image height (in pixels, default is 0). The observed height has to be in the range ``value +- delta``. + + + + + Minimum allowed height of the image (in pixels). + + + + + Maximum allowed height of the image (in pixels). + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Asserts the output is an image and has a specific mean intensity value. + + The mean intensity value is plus/minus ``eps`` (e.g., ``<has_image_mean_intensity mean_intensity="0.83" />``). + Alternatively the range of the expected mean intensity value can be specified by ``min`` and/or ``max``. + + + + + + Restricts the assertion to a specific channel of the image (where ``0`` corresponds to the first image channel). + + + + + The required mean value of the image intensities. + + + + + The absolute tolerance to be used for ``value`` (defaults to ``0.01``). The observed mean value of the image intensities has to be in the range ``value +- eps``. + + + + + A lower bound of the required mean value of the image intensities. + + + + + An upper bound of the required mean value of the image intensities. + + + + + + + Asserts the output is an image with labeled objects which have the specified mean size (number of pixels), + +The mean size is plus/minus ``eps`` (e.g., ``<has_image_mean_object_size mean_object_size="111.87" exclude_labels="0" />``). + +The labels must be unique. + + + + + + Restricts the assertion to a specific channel of the image (where ``0`` corresponds to the first image channel). + + + + + List of labels, separated by a comma. Labels *not* on this list will be excluded from consideration. Cannot be used in combination with ``exclude_labels``. + + + + + List of labels to be excluded from consideration, separated by a comma. The primary usage of this attribute is to exclude the background of a label image. Cannot be used in combination with ``labels``. + + + + + + + + + + The absolute tolerance to be used for ``value`` (defaults to ``0.01``). The observed mean size of the uniquely labeled objects has to be in the range ``value +- eps``. + + + + + A lower bound of the required mean size of the uniquely labeled objects. + + + + + An upper bound of the required mean size of the uniquely labeled objects. + + + + + + + Asserts the output is an image and has the specified labels. + +Labels can be a number of labels or unique values (e.g., +``<has_image_n_labels n="187" exclude_labels="0" />``). + +The primary usage of this assertion is to verify the number of objects in images with uniquely labeled objects. + + + + + + Restricts the assertion to a specific channel of the image (where ``0`` corresponds to the first image channel). + + + + + List of labels, separated by a comma. Labels *not* on this list will be excluded from consideration. Cannot be used in combination with ``exclude_labels``. + + + + + List of labels to be excluded from consideration, separated by a comma. The primary usage of this attribute is to exclude the background of a label image. Cannot be used in combination with ``labels``. + + + + + Expected number of labels. + + + + + Maximum allowed difference of the number of labels (default is 0). The observed number of labels has to be in the range ``value +- delta``. + + + + + Minimum allowed number of labels. + + + + + Maximum allowed number of labels. + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + + + + + Asserts the output is an image and has a specific width (in pixels). + + The width is plus/minus ``delta`` (e.g., ``<has_image_width width="512" delta="2" />``). + Alternatively the range of the expected width can be specified by ``min`` and/or ``max``. + + + + + + Expected width of the image (in pixels). + + + + + Allowed difference with respect to n (default: 0), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Minimum number (default: -infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + Maximum number (default: infinity), can be suffixed by ``(k|M|G|T|P|E)i?`` + + + + + A boolean that can be set to true to negate the outcome of the assertion. + + + +