Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5ca072e

Browse files
committedJun 11, 2024
Merge branch 'master' into 71-support-more-top-level-messages
2 parents 788666b + b6e642a commit 5ca072e

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed
 

‎.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,5 @@ jobs:
7878
run: |
7979
source .venv/bin/activate
8080
pip install .
81-
osivalidator --data data/20240221T141700Z_sv_300_2112_10_one_moving_object.osi -r rules
82-
osivalidator --data data/20240221T141700Z_sv_300_2112_10_one_moving_object.osi -r rules --parallel
81+
osivalidator --data data/20240604T065310Z_sv_370_244_20_generic_valid_sensor_view.osi -r rules
82+
osivalidator --data data/20240604T065310Z_sv_370_244_20_generic_valid_sensor_view.osi -r rules --parallel
Binary file not shown.

‎doc/usage.adoc

+3
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ Ranges of timestamps Message
118118
[START_TIMESTAMP, END_TIMESTAMP] PATH_TO_RULE(VALUE) does not comply in PATH_TO_OSI_FIELD
119119
----
120120

121+
The osivalidator will end the execution with the exit code 1, if warnings or errors are generated.
122+
If the trace file is valid and no warning or errors occurred, the execution is ended with exit code 0.
123+
121124
== Understanding Validation Output
122125

123126
To better understand the validation output let us use the example

‎osivalidator/osi_general_validator.py

+6
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ def main():
212212

213213
trace.close()
214214
display_results()
215+
if get_num_logs() > 0:
216+
exit(1)
215217

216218

217219
def process_message(message, timestep, data_type):
@@ -237,5 +239,9 @@ def display_results():
237239
return LOGGER.synthetize_results(LOGS)
238240

239241

242+
def get_num_logs():
243+
return len(LOGS)
244+
245+
240246
if __name__ == "__main__":
241247
main()

0 commit comments

Comments
 (0)
Please sign in to comment.