Skip to content

Commit f2a0b8b

Browse files
vkreschViktor Kreschenskijdsika
authored
Update/validator for Release v1.1.0 (#48)
Resolves #49 Resolves #46 Resolves #45 Resolves #44 Resolves #43 Resolves #42 Resolves #31 # Change Notes: * remove doxygen xml support * remove sqlite log processing only use plaint text for validation log output (simplification) * move default rules into `rules` folder from `requirements-osi-3` folder * replace progressbar with tqdm * remove lzma decoding and encoding (simplification) * bugfix: BaseMoving nested attribute validation * bugfix: update yaml loading ruaml * bugfix: setup.py fix the default rules folder copying into site-packages with different python versions * remove protocpp from osi validator dependency * Migrate pipeline from travisCI -> github workflow * Remove kpi folder * Remove pre-parsed rules in rules folder * Remove lfs * Remove lzma from docs * Update test trace file * Replace rules folder in docs * Port rst to adoc * Update links readme * Added example command * Update README.md * update venv instructions * Created requirements_develop.txt for workflow * Pinned package versions * Used Python 3.8 in workflow * bump actions versions * pin black to black==23.12.1 * removed unused packages * Update OSI submodule to version 3.6.0 (#54) * Use same protobuffer version as in OSI repository * use protobuf 3.20.1 in ci workflow and pin version to the same version in requirements.txt and setup.py * remove optional installation method in README * allow higher package versions * bump year in license * add git+osi requirement * add note about OSI CCB * Fix parallel run --------- Signed-off-by: Carlo van Driesten <[email protected]> Signed-off-by: ClemensLinnhoff <[email protected]> Co-authored-by: Viktor Kreschenski <[email protected]> Co-authored-by: Carlo van Driesten <[email protected]>
1 parent f8edc08 commit f2a0b8b

File tree

119 files changed

+1263
-8612
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+1263
-8612
lines changed

.gitattributes

-4
This file was deleted.

.github/workflows/ci.yml

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- master
9+
10+
jobs:
11+
linter:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python 3.8
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.8"
24+
25+
- name: Upgrade pip
26+
run: python -m pip install --upgrade pip
27+
28+
- name: Install dependencies
29+
run: pip install -r requirements_develop.txt
30+
31+
- name: Check black format
32+
run: black --check --diff --exclude "(open-simulation-interface|proto2cpp|.venv)" .
33+
34+
- name: Check dead code with vulture
35+
run: vulture *.py tests/ osivalidator/ --min-confidence 100
36+
37+
build-validator:
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
runs-on: [ubuntu-latest]
42+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
43+
44+
name: "🐍 ${{ matrix.python-version }} • ${{ matrix.runs-on }}"
45+
runs-on: ${{ matrix.runs-on }}
46+
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v4
50+
with:
51+
lfs: true
52+
53+
- name: Set up Python ${{ matrix.python-version }}
54+
uses: actions/setup-python@v5
55+
with:
56+
python-version: ${{ matrix.python-version }}
57+
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
80+
run: |
81+
git submodule update --init
82+
python -m venv .venv
83+
source .venv/bin/activate
84+
python -m pip install --upgrade pip
85+
pip install -r requirements_develop.txt
86+
cd open-simulation-interface && pip install . && cd ..
87+
88+
- name: Generate parsed rules
89+
run: |
90+
source .venv/bin/activate
91+
pip install -r requirements.txt
92+
python rules2yml.py -d rules
93+
94+
- name: Check rule correctness with unittests
95+
run: |
96+
source .venv/bin/activate
97+
python -m unittest discover tests
98+
99+
- name: Run osi-validator
100+
run: |
101+
source .venv/bin/activate
102+
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

.gitignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ celerybeat-schedule
8787
.venv
8888
env/
8989
venv/
90+
.venv/
9091
ENV/
9192
env.bak/
9293
venv.bak/
@@ -117,4 +118,7 @@ output_logs/
117118
tests/overtake_right_straight_SensorView.txt
118119

119120
# OSI Data Messages
120-
osi_message_data/
121+
osi_message_data/
122+
123+
# OSI Rules
124+
rules/

.gitmodules

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
[submodule "open-simulation-interface"]
22
path = open-simulation-interface
33
url = https://github.com/OpenSimulationInterface/open-simulation-interface.git
4-
5-
[submodule "proto2cpp"]
6-
path = proto2cpp
7-
url = https://github.com/OpenSimulationInterface/proto2cpp.git

.travis.yml

-90
This file was deleted.

0 commit comments

Comments
 (0)