Skip to content

Commit f91b0f2

Browse files
Merge branch 'master' into 64-validating-a-yml-rule
Signed-off-by: ClemensLinnhoff <[email protected]>
2 parents 4c32a7b + a1a9c8b commit f91b0f2

16 files changed

+169
-1085
lines changed

.github/workflows/ci.yml

+4-28
Original file line numberDiff line numberDiff line change
@@ -48,42 +48,20 @@ jobs:
4848
- name: Checkout
4949
uses: actions/checkout@v4
5050
with:
51+
submodules: recursive
5152
lfs: true
5253

5354
- name: Set up Python ${{ matrix.python-version }}
5455
uses: actions/setup-python@v5
5556
with:
5657
python-version: ${{ matrix.python-version }}
5758

58-
- name: Cache Dependencies
59-
id: cache-depends
60-
uses: actions/cache@v3
61-
with:
62-
path: protobuf-3.20.1
63-
key: ${{ runner.os }}-v2-depends
64-
65-
- name: Download ProtoBuf
66-
if: steps.cache-depends.outputs.cache-hit != 'true'
67-
run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.20.1/protobuf-all-3.20.1.tar.gz && tar xzvf protobuf-all-3.20.1.tar.gz
68-
69-
- name: Build ProtoBuf
70-
if: steps.cache-depends.outputs.cache-hit != 'true'
71-
working-directory: protobuf-3.20.1
72-
run: ./configure DIST_LANG=cpp --prefix=/usr && make
73-
74-
- name: Install ProtoBuf
75-
working-directory: protobuf-3.20.1
76-
run: sudo make install && sudo ldconfig
77-
78-
- name: Install Open Simulation Interface
79-
shell: bash
59+
- name: Set up Virtual Environment
8060
run: |
81-
git submodule update --init
8261
python -m venv .venv
8362
source .venv/bin/activate
8463
python -m pip install --upgrade pip
8564
pip install -r requirements_develop.txt
86-
cd open-simulation-interface && pip install . && cd ..
8765
8866
- name: Generate parsed rules
8967
run: |
@@ -100,7 +78,5 @@ jobs:
10078
run: |
10179
source .venv/bin/activate
10280
pip install .
103-
osivalidator --data data/20210818T150542Z_sv_312_50_one_moving_object.txt -r rules
104-
osivalidator --data data/20210818T150542Z_sv_312_50_one_moving_object.txt -r rules --parallel
105-
osivalidator --data data/20210818T150542Z_sv_312_50_one_moving_object.osi -r rules
106-
osivalidator --data data/20210818T150542Z_sv_312_50_one_moving_object.osi -r rules --parallel
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

README.md

+11-8
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33

44
> **_NOTE:_** This tool is not part of the official OSI standard. It has its own release schedule. The OSI CCB is not responsible for this software but MUST be notified about pull requests.
55
6-
OSI Validator checks the compliance of OSI messages with predefined [rules](https://github.com/OpenSimulationInterface/osi-validation/tree/master/rules). The full documentation on the validator and customization of the rules is available [here](https://github.com/OpenSimulationInterface/osi-validation/tree/master/doc).
6+
OSI Validator checks the compliance of OSI messages with predefined rules.
7+
These rules can be generated from the OSI .proto files with [rules2yml.py](https://github.com/OpenSimulationInterface/osi-validation/blob/master/rules2yml.py).
8+
After the rules are generated, they can be customized by the user.
9+
The full documentation on the validator and customization of the rules is available [here](https://github.com/OpenSimulationInterface/osi-validation/tree/master/doc).
710

811
## Usage
912

1013
```bash
11-
usage: osivalidator [-h] [--data DATA] [--rules RULES] [--type {SensorView,GroundTruth,SensorData}] [--output OUTPUT] [--timesteps TIMESTEPS] [--debug] [--verbose] [--parallel] [--format {separated,None}]
14+
usage: osivalidator [-h] --data DATA [--rules RULES] [--type {SensorView,GroundTruth,SensorData}] [--output OUTPUT] [--timesteps TIMESTEPS] [--debug] [--verbose] [--parallel] [--format {None}]
1215
[--blast BLAST] [--buffer BUFFER]
1316

1417
Validate data defined at the input
@@ -26,13 +29,13 @@ optional arguments:
2629
Number of timesteps to analyze. If -1, all.
2730
--debug Set the debug mode to ON.
2831
--verbose, -v Set the verbose mode to ON.
29-
--parallel, -p Set parallel mode to ON.
30-
--format {separated,None}, -f {separated,None}
31-
Set the format type of the trace.
32+
--parallel, -p (Ignored) Set parallel mode to ON.
33+
--format {None}, -f {None}
34+
(Ignored) Set the format type of the trace.
3235
--blast BLAST, -bl BLAST
33-
Set the in-memory storage count of OSI messages during validation.
36+
Set the maximum in-memory storage count of OSI messages during validation.
3437
--buffer BUFFER, -bu BUFFER
35-
Set the buffer size to retrieve OSI messages from trace file. Set it to 0 if you do not want to use buffering at all.
38+
(Ignored) Set the buffer size to retrieve OSI messages from trace file. Set it to 0 if you do not want to use buffering at all.
3639
```
3740
3841
## Installation
@@ -77,5 +80,5 @@ $ source .venv/Scripts/activate
7780
## Example command
7881
7982
```bash
80-
$ osivalidator --data data/20210818T150542Z_sv_312_50_one_moving_object.txt --rules rules/
83+
$ osivalidator --data data/20240221T141700Z_sv_300_2112_10_one_moving_object.osi --rules rules/
8184
```
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)