Skip to content

Commit

Permalink
Adjust documentation
Browse files Browse the repository at this point in the history
Signed-off-by: ClemensLinnhoff <[email protected]>
  • Loading branch information
ClemensLinnhoff committed May 27, 2024
1 parent ff35ca2 commit 873c57d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions doc/usage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,16 @@ python rules2yml.py # Generates the rule directory
osivalidator --data data/20240221T141700Z_sv_300_2112_10_one_moving_object.osi --rules rules -p
----

The rules2yml.py generates yml files for all OSI proto files containing the rules specified in OSI.
It also generated respective yml schema files to validate the rule yml files.
The schema files are located in <rules_folder>/schema.
The rules2yml.py generates a yml file for each OSI proto file containing the rules specified in OSI.
The yml files are located in the specified rules folder given as an input parameter.
Additionally, the script generates respective yml schema files to validate the rule yml files in <rules_folder>/schema.
The schema files contain the message names of the original OSI proto file and a list of applicable rules.
If a rule has an associated value, e.g. a string or a number, the type of the value is also checked.
When executing osivalidator, all rule files are validated against their respective schema.

If needed, the rules folder can be copied and modified for specific use cases, e.g. by adding or removing certain rules.
This way, osivalidation can be used with different sets of rules.

After successfully running the validation the following output is
generated:

Expand Down
2 changes: 1 addition & 1 deletion osivalidator/osi_general_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def command_line_arguments():
parser.add_argument(
"--rules",
"-r",
help="Directory with text files containig rules. ",
help="Directory with yml files containing rules. ",
default=os.path.join(dir_path, "rules"),
type=str,
)
Expand Down

0 comments on commit 873c57d

Please sign in to comment.