Skip to content

Commit 7bac497

Browse files
author
Julia Wellmann
committed
Update tagging example and documentations for tags
1 parent 81b7e4f commit 7bac497

File tree

6 files changed

+58
-2
lines changed

6 files changed

+58
-2
lines changed

docs/advanced.rst

+4
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,10 @@ For example:
419419
The ``tag`` attribute can be used within any ``<element>`` within the input file (except the ``<jube>``).
420420
If several different ``tag`` attribute values are used in a script, they can be specified as a list separated by spaces from the command line.
421421

422+
To keep track of all tags, a description for each tag can be defined within the ``<tags>``, where ``<check_tags>`` is also defined, using
423+
``<tag name="...">Description</tag>``. To force a description of all possible tags, the ``forced`` attribute can be set to true,
424+
so that an error is thrown if a tag is not documented.
425+
422426
All ``<elements>`` which contain a special ``tag="..."`` attribute will be hidden if the value of the tag evaluates to ``false``.
423427
This means that JUBE will ignore the elements with these tags in its internal processing.
424428
Caution: This can lead to erroneous execution if you forget to set the necessary tags for execution, as JUBE will ignore e.g. a ``<parameter>`` provided with the corresponding ``tag`` attribute that evaluates to false.

docs/commandline.rst

+20
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,26 @@ Show benchmark status RUNNING or FINISHED.
410410

411411
.. index:: complete
412412

413+
tag
414+
~~~
415+
416+
Show tags description
417+
418+
.. code-block:: none
419+
420+
jube tag [-h] [-i ID [ID ...]] [PATH]
421+
422+
``-h``, ``--help``
423+
show command help information
424+
425+
``-i ID [ID ...]``, ``--id ID [ID ...]``
426+
|ID_DESCRIPTION|
427+
428+
``PATH``
429+
path to input file or directory which contains benchmarks, default: .
430+
431+
.. index:: complete
432+
413433
complete
414434
~~~~~~~~
415435

docs/glossar.rst

+20
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ Glossary
6262
If no benchmark id is given, last benchmark found in directory will be used. If benchmark directory is missing, current
6363
directory will be used.
6464

65+
tag
66+
Show tag description for the given benchmark.
67+
68+
If path to input file or benchmark directory is missing, current directory will be used. If no benchmark id is given,
69+
last benchmark found in directory will be used.
70+
6571
continue
6672
Continue an existing benchmark. Not finished steps will be continued,
6773
if they are leaving pending mode.
@@ -127,6 +133,20 @@ Glossary
127133
128134
<comment>...</comment>
129135
136+
tags_tag
137+
Specify tag description and combination of tags that must be set.
138+
139+
.. code-block:: xml
140+
141+
<tags forced="...">
142+
<check_tags>...</check_tags>
143+
<tag name="...">...</tag>
144+
</tags>
145+
146+
* ``forced`` is optional, if it is set to ``true``, you will be forced to describe every possible tag. (default: ``false``)
147+
* multiple ``<check_tags>`` and ``<tag>`` are allowed
148+
* In the ``<tag>``, you can write a description for the tag with the given name.
149+
130150
check_tags_tag
131151
Specify combination of tags that must be set.
132152

docs/release_notes.rst

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Release notes
2525
~~~~~~~~~~~~~
2626
Release: XXXX-XX-XX
2727

28+
* Added: New `<tags>` tag, which includes the `<tag>` tag to write a description for each tag specified in the input file.
2829
* Added: A new operator `^` (exclusive disjunction (`xor`)) for the `tag` attribute and `<check_tags>`.
2930
* Added: New `primekey` attribute for the `key`-tag of the `database` to define whether this `key` is a primary key of the database or not. Can be set to `true` or `false` (default: `false`).
3031
* Added: New environment variable `JUBE_VERBOSE` to set the verbosity level.
@@ -35,7 +36,9 @@ Release: XXXX-XX-XX
3536
* Changed: The `outpath` attribute of the `<benchmark>` tag no longer needs to be specified if either the command line option `--outpath` is set or the new environment variable `JUBE_BENCHMARK_OUTPATH` is used. The command line option overrides the environment variable, which in turn overrides the attribute in the input file.
3637
* Changed: The convert type warning is only logged to the `analyse.log` file and no longer printed to the console output.
3738
* Changed: If the `title` attribute of a database `key` is set, then this title is used as the name of the database column instead of the parameter or pattern name.
39+
* Changed: The `<check_tags>` tag is now a subelement of the new `<tags>` tag.
3840
* Deprecated: The `primekeys` attribute of the `database` is no longer supported. Use the new `primekey` attribute of the `database` `key` instead.
41+
* Deprecated: `<check_tags>` will no longer be supported on a global level. Instead, it should be specified in the `<tags>` tag.
3942
* Removed: Comma character (`,`) is no longer supported in `check_tags` and `tag` attributes. Instead use `|`, `^` `+` and `!`.
4043
* Fixed: Allow YAML scripts to include a list of nested parametersets with `!include`.
4144
* Fixed: Allow YAML scripts to use the tag attribute in the `<path>` of the `<include-path>`-tag.

examples/tagging/tagging.xml

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<jube>
3-
<check_tags>deu|eng</check_tags> <!-- check if tag deu or eng was set -->
3+
<tags forced="true">
4+
<check_tags>deu|eng</check_tags>
5+
<tag name="deu">For german strings</tag>
6+
<tag name="eng">For english strings</tag>
7+
</tags>
48

59
<benchmark name="tagging" outpath="bench_run">
610
<comment>Tags as logical combination</comment>

examples/tagging/tagging.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
check_tags: deu|eng #check if tag deu or eng was set
1+
tags:
2+
check_tags: deu|eng #check if tag deu or eng was set
3+
forced: True
4+
tag:
5+
- {name: deu, _: For german strings}
6+
- {name: eng, _: For english strings}
27

38
name: tagging
49
outpath: bench_run

0 commit comments

Comments
 (0)