Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/validator #48

Merged
merged 43 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
43aa90b
Update osi validator
vkresch Dec 5, 2023
e671a6e
Delete txt
vkresch Dec 5, 2023
c5ab159
Remove kpi folder and keep decoded trace
vkresch Dec 13, 2023
a7e5b78
Test workflow file
vkresch Dec 13, 2023
64f3fe7
Only install prot compiler
vkresch Dec 13, 2023
102887a
Install git-lfs
vkresch Dec 13, 2023
b4ce30a
Remove lfs
vkresch Dec 13, 2023
75dc7cf
Checkout with lfs
vkresch Dec 13, 2023
cb90eee
lfs pull
vkresch Dec 13, 2023
4201f04
Fix syntax
vkresch Dec 13, 2023
cccc241
Untrack files
vkresch Dec 13, 2023
ef941bc
Fix rules 2 yaml
vkresch Dec 13, 2023
cfb0595
Install cli
vkresch Dec 13, 2023
ccceb16
Source in each step
vkresch Dec 13, 2023
d033087
wip
vkresch Dec 13, 2023
e2b56fb
Add source
vkresch Dec 13, 2023
106b89a
Fix typo
vkresch Dec 13, 2023
a59b161
Fix osi files validation
vkresch Dec 13, 2023
8b5857b
Remove lzma from docs
vkresch Dec 13, 2023
535ea2c
Do not test convert
vkresch Dec 13, 2023
d293d91
Update trace file name
Dec 15, 2023
aac46d4
Fix black
vkresch Dec 15, 2023
76d86f7
Replace rules folder in docs
vkresch Dec 15, 2023
3c0c72a
Fix relative imports
vkresch Dec 20, 2023
63d96f3
Fix instance check
vkresch Dec 21, 2023
6d91298
Add message
vkresch Dec 21, 2023
144ef5c
Fix black format
vkresch Dec 21, 2023
5d13f87
Port rst to adoc
vkresch Dec 21, 2023
c7bb6cc
Update links readme
vkresch Dec 21, 2023
6d312d9
Added example command
vkresch Dec 21, 2023
645b3b7
Update README.md
jdsika Jan 8, 2024
e87dc00
Created requirements_develop.txt for workflow. Pinned package version…
jdsika Jan 9, 2024
e2c8ba7
bump actions versions
jdsika Jan 9, 2024
a40427e
pin black to black==23.12.1
jdsika Jan 9, 2024
5f80f94
removed unused packages
jdsika Jan 9, 2024
630ba8e
Update OSI submodule to version 3.6.0 (#54)
jdsika Jan 9, 2024
d6671d7
Fix workflos, remove rules folder, add correct installation commands.…
jdsika Jan 10, 2024
99c8e79
fix black
jdsika Jan 10, 2024
d7fbbfd
fix workflow requirements installation and refine readme installation…
jdsika Jan 10, 2024
231684b
use protobuf 3.20.1 in ci workflow and pin version to the same versio…
jdsika Jan 11, 2024
dd457e7
remove optional installation method, allow higher package versions, b…
jdsika Jan 11, 2024
89cbc38
add osi dependency to requirements.txt, add note about OSI CCB
jdsika Jan 15, 2024
a6e917d
Fix parallel run
vkresch Jan 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .gitattributes

This file was deleted.

106 changes: 106 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: CI

on:
workflow_dispatch:
pull_request:
push:
branches:
- master

jobs:
linter:
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: Upgrade pip
run: python -m pip install --upgrade pip

- name: Install dependencies
run: pip install -r requirements_develop.txt

- name: Check black format
run: black --check --diff --exclude "(open-simulation-interface|proto2cpp|.venv)" .

- name: Check dead code with vulture
run: vulture *.py tests/ osivalidator/ --min-confidence 100

build-validator:
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

name: "🐍 ${{ matrix.python-version }} • ${{ matrix.runs-on }}"
runs-on: ${{ matrix.runs-on }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true

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

- name: Cache Dependencies
id: cache-depends
uses: actions/cache@v3
with:
path: protobuf-3.20.1
key: ${{ runner.os }}-v2-depends

- name: Download ProtoBuf
if: steps.cache-depends.outputs.cache-hit != 'true'
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

- name: Build ProtoBuf
if: steps.cache-depends.outputs.cache-hit != 'true'
working-directory: protobuf-3.20.1
run: ./configure DIST_LANG=cpp --prefix=/usr && make

- name: Install ProtoBuf
working-directory: protobuf-3.20.1
run: sudo make install && sudo ldconfig

- name: Install Open Simulation Interface
shell: bash
run: |
git submodule update --init
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements_develop.txt
cd open-simulation-interface && pip install . && cd ..

- name: Generate parsed rules
run: |
source .venv/bin/activate
pip install -r requirements.txt
python rules2yml.py -d rules

- name: Check rule correctness with unittests
run: |
source .venv/bin/activate
python -m unittest discover tests

- name: Run osi-validator
run: |
source .venv/bin/activate
pip install .
osivalidator --data data/20210818T150542Z_sv_312_50_one_moving_object.txt -r rules
osivalidator --data data/20210818T150542Z_sv_312_50_one_moving_object.txt -r rules --parallel
osivalidator --data data/20210818T150542Z_sv_312_50_one_moving_object.osi -r rules
osivalidator --data data/20210818T150542Z_sv_312_50_one_moving_object.osi -r rules --parallel
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ celerybeat-schedule
.venv
env/
venv/
.venv/
ENV/
env.bak/
venv.bak/
Expand Down Expand Up @@ -117,4 +118,7 @@ output_logs/
tests/overtake_right_straight_SensorView.txt

# OSI Data Messages
osi_message_data/
osi_message_data/

# OSI Rules
rules/
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "open-simulation-interface"]
path = open-simulation-interface
url = https://github.com/OpenSimulationInterface/open-simulation-interface.git

[submodule "proto2cpp"]
path = proto2cpp
url = https://github.com/OpenSimulationInterface/proto2cpp.git
90 changes: 0 additions & 90 deletions .travis.yml

This file was deleted.

Loading