Skip to content

Commit

Permalink
Integrate new CLI
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Jaegervall <[email protected]>
  • Loading branch information
erikbosch committed Jul 24, 2024
1 parent 1b97c70 commit de8ef60
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 65 deletions.
39 changes: 8 additions & 31 deletions .github/workflows/buildcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,53 +15,30 @@ jobs:
with:
submodules: true

- name: Install pyenv
run: |
# Needed for using exact python version, which is
# required in `Pipfile`.
# Make sure it is aligned with vss-tools/Pipfile
curl https://pyenv.run | bash
export PATH="$HOME/.pyenv/bin:$PATH"
pyenv install 3.10.6
- name: Install vss-tools dependencies
run: |
python -V
python -m pip --quiet --no-input install --upgrade pip
python -m pip --quiet --no-input install --upgrade pipenv wheel
pipenv --version
pipenv run python --version
python -m pip --quiet --no-input install --upgrade wheel
cd vss-tools
pip install -e .
pip install pytest
# idlc currently used both during python test and later in this script
pip install cyclonedds
sudo apt install -y protobuf-compiler
pipenv install
echo done!
pipenv run python setup.py install
env:
PIPENV_VENV_IN_PROJECT: 1
- name: Test mandatory targets
run: |
pipenv install
pipenv run make mandatory_targets
env:
PIPENV_PIPFILE: ./vss-tools/Pipfile
PIPENV_VENV_IN_PROJECT: 1
make mandatory_targets
- name: Test that ddsidl is correct
run: |
# Ignore vss-tools Pipfile for this use-case
pipenv install --ignore-pipfile cyclonedds
pipenv run idlc *.idl
env:
PIPENV_VENV_IN_PROJECT: 1
idlc vss_rel_*.idl
- name: Test optional targets. NOTE - always succeeds
run: |
pipenv install
pipenv run make -k optional_targets || true
env:
PIPENV_PIPFILE: ./vss-tools/Pipfile
PIPENV_VENV_IN_PROJECT: 1
make -k optional_targets || true
- name: Install hugo
env:
Expand Down
16 changes: 7 additions & 9 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,14 @@ An example to generate CSV from the *.vspec files in your current branch is:

```
user@debian:~/vehicle_signal_specification$ make csv
./vss-tools/vspec2csv.py -I ./spec --uuid -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss_rel_$(cat VERSION).csv
INFO Output to csv format
INFO Known extended attributes:
INFO Added 56 units from ./spec/units.yaml
INFO Loading vspec from ./spec/VehicleSignalSpecification.vspec...
INFO Calling exporter...
INFO Generating CSV output...
INFO All done.
vspec export csv -u ./spec/units.yaml --strict -s ./spec/VehicleSignalSpecification.vspec -o vss_rel_$(cat VERSION).csv
[11:12:40] INFO Added 30 quantities from /home/erik/vehicle_signal_specification/spec/quantities.yaml
INFO Added 63 units from spec/units.yaml
INFO Loading vspec from spec/VehicleSignalSpecification.vspec...
[11:12:41] INFO Check type usage
INFO Generating CSV output...
user@debian:~/vehicle_signal_specification$ ls *.csv
vss_rel_4.1-dev.csv
vss_rel_5.0-dev.csv
```

### Make sure that your changes pass CI checks
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,11 @@ What to do if you as of today use signals from the OBD file:
* If you really need the signals in this file and cannot replace them, then consider using the overlay file in the
`overlays` directory from VSS 6.0 onwards.

### Update tool dependency
### Updated tool dependency

#### CLI updates

The vss-tools CLI has been refactored. Makefile in this repository updated.

#### Overlay Support

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ There are two main methods to propose changes or extensions to VSS:
- If you already have prepared changes or extension that you think would be interesting for COVESA to include in VSS
then you can create a [Pull Request (PR)](https://github.com/COVESA/vehicle_signal_specification/pulls).

All contributions must follow the [COVESA contribution guidelines](https://www.covesa.global/contribute).
All contributions must follow the [COVESA contribution guidelines](https://covesa.global/contribute).

The VSS project has regular meetings on Tuesdays at 16.00 CET and CEST in the summer (see [COVESA VSS Wiki](https://wiki.covesa.global/display/WIK4/VSS+-+Vehicle+Signal+Specification)).
In the meetings Pull Requests (PRs) and Issues are discussed and, if a Pull Request is accepted, a decision to merge the PR will be made.
Expand Down Expand Up @@ -53,7 +53,7 @@ This section includes general guidelines and recommendations for anyone interest

### All contributions must follow COVESA contribution guidelines

COVESA has defined [contribution guidelines](https://www.covesa.global/contribute).
COVESA has defined [contribution guidelines](https://covesa.global/contribute).

Every contribution (commit) must carry the following sign-off line with your real name and email address:

Expand Down
37 changes: 20 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,53 +20,56 @@ optional_targets: clean protobuf ttl

TOOLSDIR?=./vss-tools
COMMON_ARGS=-u ./spec/units.yaml --strict
COMMON_VSPEC_ARG=-s ./spec/VehicleSignalSpecification.vspec

json:
${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).json
vspec export json ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).json

json-noexpand:
${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} --no-expand ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_noexpand.json
vspec export json ${COMMON_ARGS} --no-expand ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION)_noexpand.json

jsonschema:
${TOOLSDIR}/vspec2jsonschema.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).jsonschema
vspec export jsonschema ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).jsonschema

franca:
${TOOLSDIR}/vspec2franca.py --franca-vss-version $$(cat VERSION) ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).fidl
vspec export franca --franca-vss-version $$(cat VERSION) ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).fidl

yaml:
${TOOLSDIR}/vspec2yaml.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).yaml
vspec export yaml ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).yaml

csv:
${TOOLSDIR}/vspec2csv.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).csv
vspec export csv ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).csv

ddsidl:
${TOOLSDIR}/vspec2ddsidl.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).idl
vspec export ddsidl ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).idl

# Verifies that supported overlay combinations are syntactically correct.
overlays:
${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} -o overlays/profiles/motorbike.vspec ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_motorbike.json
${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} -o overlays/extensions/dual_wiper_systems.vspec ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_dualwiper.json
${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} -o overlays/extensions/OBD.vspec ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_obd.json
vspec export json ${COMMON_ARGS} -l overlays/profiles/motorbike.vspec ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION)_motorbike.json
vspec export json ${COMMON_ARGS} -l overlays/extensions/dual_wiper_systems.vspec ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION)_dualwiper.json
vspec export json ${COMMON_ARGS} -l overlays/extensions/OBD.vspec ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION)_obd.json

tests:
prepare_binary:
cd ${TOOLSDIR}/binary && $(MAKE)

tests: prepare_binary
PYTHONPATH=${TOOLSDIR} pytest

binary:
cd ${TOOLSDIR}/binary && $(MAKE)
${TOOLSDIR}/vspec2binary.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).binary
binary: prepare_binary
vspec export binary ${COMMON_ARGS} ${COMMON_VSPEC_ARG} --bintool-dll ${TOOLSDIR}/binary/binarytool.so -o vss_rel_$$(cat VERSION).binary

protobuf:
${TOOLSDIR}/vspec2protobuf.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).proto
vspec export protobuf ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).proto

graphql:
${TOOLSDIR}/vspec2graphql.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).graphql.ts
vspec export graphql ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).graphql.ts

# vspec2ttl does not use common generator framework
ttl:
${TOOLSDIR}/contrib/vspec2ttl/vspec2ttl.py -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).ttl

id:
${TOOLSDIR}/vspec2id.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).vspec
vspec export id ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).vspec

clean:
cd ${TOOLSDIR}/binary && $(MAKE) clean
Expand Down
2 changes: 1 addition & 1 deletion docs-gen/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Vehicle Signal Specification"
---
# Vehicle Signal Specification

The Vehicle Signal Specification (VSS) is an initiative by [COVESA](https://www.covesa.global/) to define a syntax and a catalog for vehicle signals.
The Vehicle Signal Specification (VSS) is an initiative by [COVESA](https://covesa.global/) to define a syntax and a catalog for vehicle signals.
The source code and releases can be found in the [VSS github repository](https://github.com/COVESA/vehicle_signal_specification).
Some tools for parsing and converting VSS files can be found in the [VSS-tools github repository](https://github.com/COVESA/vss-tools).

Expand Down
4 changes: 2 additions & 2 deletions docs-gen/content/governance/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ chapter: false

# Governance

The Vehicle Signal Specification (VSS) project is an initiative by [COVESA](https://www.covesa.global/) to define a syntax and a catalog for vehicle signals.
The Vehicle Signal Specification (VSS) project is an initiative by [COVESA](https://covesa.global/) to define a syntax and a catalog for vehicle signals.

The artifacts maintained by the VSS project consist of:

Expand All @@ -22,7 +22,7 @@ Anyone may propose changes to VSS. It is up to the VSS project to decide if the
The VSS project does not have any developers or maintainers paid by COVESA.
Instead, the VSS project relies on voluntary contributions, typically from member organizations.
The maintainers are expected to review incoming pull requests.
All contributions must follow the [COVESA contribution guidelines](https://www.covesa.global/contribute).
All contributions must follow the [COVESA contribution guidelines](https://covesa.global/contribute).

In general, pull requests shall be opened for at least a week before being merged to give time for COVESA members to review the pull request and provide comments.
In case of larger changes or changes that affect backward compatibility pull requests are typically opened for a longer period, to allow for a through review.
Expand Down
2 changes: 1 addition & 1 deletion docs-gen/content/rule_set/data_entry/data_types_struct.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ It is possible to specify that multiple datatype files shall be used, but all da
This means if the first file defines `A.B`, then the seconds file can define `A.C`, but not `X.Y` as that would
result in two roots (`A` and `X`).

For current vss-tools support for structs see [documentation](https://github.com/COVESA/vss-tools/blob/master/docs/vspec2x.md) in the vss-tools repository.
For current vss-tools support for structs see [documentation](https://github.com/COVESA/vss-tools/blob/master/docs/vspec.md) in the vss-tools repository.

## Naming Restrictions

Expand Down
2 changes: 1 addition & 1 deletion vss-tools
Submodule vss-tools updated 109 files

0 comments on commit de8ef60

Please sign in to comment.